diff options
author | Daniel Moody <dmoody256@gmail.com> | 2017-12-27 22:46:38 (GMT) |
---|---|---|
committer | Daniel Moody <dmoody256@gmail.com> | 2018-05-25 14:49:49 (GMT) |
commit | c299f365221f80e2325d391e9c15f4c1e2632486 (patch) | |
tree | 7f488035cbe9ef862c6b52f61538f7dc4e1df510 /test/SWIG | |
parent | 105cc64306ad8e5af41ba02941576082b6326caf (diff) | |
download | SCons-c299f365221f80e2325d391e9c15f4c1e2632486.zip SCons-c299f365221f80e2325d391e9c15f4c1e2632486.tar.gz SCons-c299f365221f80e2325d391e9c15f4c1e2632486.tar.bz2 |
fixed swig tests to work on windows
Diffstat (limited to 'test/SWIG')
-rw-r--r-- | test/SWIG/SWIGPATH.py | 5 | ||||
-rw-r--r-- | test/SWIG/implicit-dependencies.py | 5 | ||||
-rw-r--r-- | test/SWIG/live.py | 11 | ||||
-rw-r--r-- | test/SWIG/recursive-includes-cpp.py | 6 |
4 files changed, 19 insertions, 8 deletions
diff --git a/test/SWIG/SWIGPATH.py b/test/SWIG/SWIGPATH.py index 55e8d7e..d516c0c 100644 --- a/test/SWIG/SWIGPATH.py +++ b/test/SWIG/SWIGPATH.py @@ -40,7 +40,8 @@ python = test.where_is('python') if not python: test,skip_test('Can not find installed "python", skipping test.\n') - +swig = swig.replace('\\','/') +python = python.replace('\\','/') test.subdir('inc1', 'inc2') test.write(['inc2', 'dependency.i'], """\ @@ -95,4 +96,4 @@ test.pass_test() # tab-width:4 # indent-tabs-mode:nil # End: -# vim: set expandtab tabstop=4 shiftwidth=4: +# vim: set expandtab tabstop=4 shiftwidth=4:
\ No newline at end of file diff --git a/test/SWIG/implicit-dependencies.py b/test/SWIG/implicit-dependencies.py index 465a0d6..8664bf6 100644 --- a/test/SWIG/implicit-dependencies.py +++ b/test/SWIG/implicit-dependencies.py @@ -40,7 +40,8 @@ python = test.where_is('python') if not python: test.skip_test('Can not find installed "python", skipping test.\n') - +swig = swig.replace('\\','/') +python = python.replace('\\','/') test.write("dependency.i", """\ %module dependency """) @@ -75,4 +76,4 @@ test.pass_test() # tab-width:4 # indent-tabs-mode:nil # End: -# vim: set expandtab tabstop=4 shiftwidth=4: +# vim: set expandtab tabstop=4 shiftwidth=4:
\ No newline at end of file diff --git a/test/SWIG/live.py b/test/SWIG/live.py index 05971aa..684cff1 100644 --- a/test/SWIG/live.py +++ b/test/SWIG/live.py @@ -48,9 +48,14 @@ if not swig: python, python_include, python_libpath, python_lib = \ test.get_platform_python_info() -Python_h = os.path.join(python_include, 'Python.h') +Python_h = python_include + '/Python.h' if not os.path.exists(Python_h): test.skip_test('Can not find %s, skipping test.\n' % Python_h) +swig = swig.replace('\\','/') +python = python.replace('\\','/') +python_include = python_include.replace('\\','/') +python_libpath = python_libpath.replace('\\','/') +python_lib = python_lib.replace('\\','/') # handle testing on other platforms: ldmodule_prefix = '_' @@ -142,7 +147,7 @@ test.up_to_date(arguments = ldmodule_prefix+'foo' + _dll) test.run(arguments = ldmodule_prefix+'bar' + _dll) -test.must_match('wrapper.out', "wrapper.py\n") +test.must_match('wrapper.out', "wrapper.py" + os.linesep) test.run(program = python, stdin = """\ from __future__ import print_function @@ -164,4 +169,4 @@ test.pass_test() # tab-width:4 # indent-tabs-mode:nil # End: -# vim: set expandtab tabstop=4 shiftwidth=4: +# vim: set expandtab tabstop=4 shiftwidth=4:
\ No newline at end of file diff --git a/test/SWIG/recursive-includes-cpp.py b/test/SWIG/recursive-includes-cpp.py index dbcac6d..0baa195 100644 --- a/test/SWIG/recursive-includes-cpp.py +++ b/test/SWIG/recursive-includes-cpp.py @@ -30,6 +30,7 @@ in cases of recursive inclusion. """ import os +import sys import TestSCons from SCons.Defaults import DefaultEnvironment @@ -37,6 +38,9 @@ DefaultEnvironment( tools = [ 'swig' ] ) test = TestSCons.TestSCons() +if sys.platform == 'win32': + test.skip_test('test not setup for windows, skipping test') + # Check for prerequisites of this test. for pre_req in ['swig', 'python']: if not test.where_is(pre_req): @@ -124,4 +128,4 @@ test.pass_test() # tab-width:4 # indent-tabs-mode:nil # End: -# vim: set expandtab tabstop=4 shiftwidth=4: +# vim: set expandtab tabstop=4 shiftwidth=4:
\ No newline at end of file |