Only apply the Cygwin fix on Windows.

The so called 'cygwin_fix_command' replaces all instances of '/home'
with 'C:/cygwin/home'. This will cause the tests to fail on linux as
this directory does not exist there.
This commit is contained in:
Alexander Buddenbrock 2015-06-27 20:50:10 +02:00 committed by Anton Bachin
parent faf3676fec
commit 54b7a054be

View File

@ -245,15 +245,15 @@ def main():
cxxtest_headers = " ".join(glob.glob(os.path.join("cxxtest", "*.h"))) cxxtest_headers = " ".join(glob.glob(os.path.join("cxxtest", "*.h")))
run("cxxtestgen --error-printer -o %s %s" % run("cxxtestgen --error-printer -o %s %s" %
(CXXTEST_GENERATED, cxxtest_headers)) (CXXTEST_GENERATED, cxxtest_headers))
cygwin_fix_command = \
("sed 's#\"/home#\"C:/cygwin/home#g' %s > $$$$ ; " + \
"mv $$$$ %s") % (CXXTEST_GENERATED, CXXTEST_GENERATED)
os.system(cygwin_fix_command)
if re.search("Windows|CYGWIN", platform.system()) != None: if re.search("Windows|CYGWIN", platform.system()) != None:
full = windows_configurations full = windows_configurations
default = windows_default default = windows_default
windows = True windows = True
cygwin_fix_command = \
("sed 's#\"/home#\"C:/cygwin/home#g' %s > $$$$ ; " + \
"mv $$$$ %s") % (CXXTEST_GENERATED, CXXTEST_GENERATED)
os.system(cygwin_fix_command)
else: else:
full = unix_configurations full = unix_configurations
default = unix_default default = unix_default