diff options
author | Mats Wichmann <mats@linux.com> | 2018-08-13 16:40:42 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2018-08-13 16:40:42 (GMT) |
commit | 2a39eb278ecca56f66011f2d602e12b924ad0e2c (patch) | |
tree | 2e70d609311cd4c2bec9e20bc32e70bf1df09851 /test/SWIG | |
parent | 5d21b1cac7605f4df43ddc6db30011e6d1006859 (diff) | |
download | SCons-2a39eb278ecca56f66011f2d602e12b924ad0e2c.zip SCons-2a39eb278ecca56f66011f2d602e12b924ad0e2c.tar.gz SCons-2a39eb278ecca56f66011f2d602e12b924ad0e2c.tar.bz2 |
SWIG recursive test checkes for Python.h
The generated code will #include <Python.h>, so skip the test if the
appropriate development support for Python is not installed, the test
will FAIL otherwise. The other SWIG tests do this already.
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test/SWIG')
-rw-r--r-- | test/SWIG/recursive-includes-cpp.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/SWIG/recursive-includes-cpp.py b/test/SWIG/recursive-includes-cpp.py index b943406..34c7d6e 100644 --- a/test/SWIG/recursive-includes-cpp.py +++ b/test/SWIG/recursive-includes-cpp.py @@ -44,6 +44,12 @@ for pre_req in ['swig', 'python']: if not test.where_is(pre_req): test.skip_test('Can not find installed "' + pre_req + '", skipping test.%s' % os.linesep) +# file generated by swig will #include <Python.h>, make sure we have one +python, py_include, py_libpath, py_lib = test.get_platform_python_info() +Python_h = os.path.join(py_include, 'Python.h') +if not os.path.exists(Python_h): + test.skip_test('Can not find %s, skipping test.\n' % Python_h) + if sys.platform == 'win32': python_lib = os.path.dirname(sys.executable) + "/libs/" + ('python%d%d'%(sys.version_info[0],sys.version_info[1])) + '.lib' if( not os.path.isfile(python_lib)): @@ -150,4 +156,4 @@ test.pass_test() # tab-width:4 # indent-tabs-mode:nil # End: -# vim: set expandtab tabstop=4 shiftwidth=4:
\ No newline at end of file +# vim: set expandtab tabstop=4 shiftwidth=4: |