diff options
author | William Deegan <bill@baddogconsulting.com> | 2018-09-05 03:12:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-05 03:12:28 (GMT) |
commit | 9ffc1c047ff128db751d8e48faf1f2fdbfd460f5 (patch) | |
tree | ba87f63f57737e8f3e01e1aa59a8a3d4cbfcc099 /test | |
parent | 2915abd83891c89e0302cf3f35e367de55c0abab (diff) | |
parent | c594a4de15f55c1f1d5582c086e3021c589b4c41 (diff) | |
download | SCons-9ffc1c047ff128db751d8e48faf1f2fdbfd460f5.zip SCons-9ffc1c047ff128db751d8e48faf1f2fdbfd460f5.tar.gz SCons-9ffc1c047ff128db751d8e48faf1f2fdbfd460f5.tar.bz2 |
Merge branch 'master' into test-rpmpkg
Diffstat (limited to 'test')
-rw-r--r-- | test/AS/nasm.py | 14 | ||||
-rw-r--r-- | test/MSVS/vs-10.0Exp-exec.py | 8 | ||||
-rw-r--r-- | test/MSVS/vs-11.0-exec.py | 8 | ||||
-rw-r--r-- | test/MSVS/vs-11.0Exp-exec.py | 8 | ||||
-rw-r--r-- | test/MSVS/vs-14.0-exec.py | 8 | ||||
-rw-r--r-- | test/MSVS/vs-6.0-clean.py | 2 | ||||
-rw-r--r-- | test/MSVS/vs-6.0-exec.py | 8 | ||||
-rw-r--r-- | test/MSVS/vs-7.0-exec.py | 8 | ||||
-rw-r--r-- | test/MSVS/vs-7.1-exec.py | 8 | ||||
-rw-r--r-- | test/MSVS/vs-8.0-exec.py | 7 | ||||
-rw-r--r-- | test/MSVS/vs-8.0Exp-exec.py | 8 | ||||
-rw-r--r-- | test/MSVS/vs-9.0-exec.py | 8 | ||||
-rw-r--r-- | test/MSVS/vs-9.0Exp-exec.py | 8 | ||||
-rw-r--r-- | test/SWIG/SWIGOUTDIR-python.py | 6 | ||||
-rw-r--r-- | test/SWIG/build-dir.py | 6 | ||||
-rw-r--r-- | test/SWIG/generated_swigfile.py | 6 | ||||
-rw-r--r-- | test/SWIG/live.py | 11 | ||||
-rw-r--r-- | test/SWIG/module-deduced-name.py | 6 | ||||
-rw-r--r-- | test/SWIG/module-parens.py | 6 | ||||
-rw-r--r-- | test/SWIG/module-quoted.py | 6 | ||||
-rw-r--r-- | test/SWIG/module-spaces.py | 6 | ||||
-rw-r--r-- | test/SWIG/noproxy.py | 6 | ||||
-rw-r--r-- | test/SWIG/recursive-includes-cpp.py | 5 | ||||
-rw-r--r-- | test/SWIG/remove-modules.py | 6 | ||||
-rw-r--r-- | test/SWIG/subdir.py | 6 |
25 files changed, 94 insertions, 85 deletions
diff --git a/test/AS/nasm.py b/test/AS/nasm.py index 1733789..4d93c7f 100644 --- a/test/AS/nasm.py +++ b/test/AS/nasm.py @@ -47,17 +47,18 @@ if sys.platform.find('linux') == -1: test.skip_test("skipping test on non-Linux platform '%s'\n" % sys.platform) try: - import popen2 - stdout = popen2.popen2('nasm -v')[0] + import subprocess + stdout = subprocess.check_output(['nasm','-v']) except OSError: test.skip_test('could not determine nasm version; skipping test\n') else: - version = stdout.read().split()[2] - if version[:4] != '0.98': + stdout = stdout.decode() + version = stdout.split()[2].split('.') + if int(version[0]) ==0 and int(version[1]) < 98: test.skip_test("skipping test of nasm version %s\n" % version) machine = os.uname()[4] - if not machine in ('i386', 'i486', 'i586', 'i686'): + if not machine in ('i386', 'i486', 'i586', 'i686', 'x86_64'): fmt = "skipping test of nasm %s on non-x86 machine '%s'\n" test.skip_test(fmt % (version, machine)) @@ -78,6 +79,8 @@ test.file_fixture('wrapper.py') test.write('SConstruct', """ eee = Environment(tools = ['gcc', 'gnulink', 'nasm'], + CFLAGS = ['-m32'], + LINKFLAGS = '-m32', ASFLAGS = '-f %(nasm_format)s') fff = eee.Clone(AS = r'%(_python_)s wrapper.py ' + WhereIs('nasm')) eee.Program(target = 'eee', source = ['eee.asm', 'eee_main.c']) @@ -99,6 +102,7 @@ name: """) test.write('eee_main.c', r""" +#include <stdio.h> extern char name[]; int diff --git a/test/MSVS/vs-10.0Exp-exec.py b/test/MSVS/vs-10.0Exp-exec.py index a63f6c4..d6114bd 100644 --- a/test/MSVS/vs-10.0Exp-exec.py +++ b/test/MSVS/vs-10.0Exp-exec.py @@ -55,10 +55,14 @@ if not msvs_version in test.msvs_versions(): test.run(arguments = '-n -q -Q -f -', stdin = """\ env = Environment(tools = ['msvc'], MSVS_VERSION='%(msvs_version)s') -sconsEnv = repr(env['ENV']) -print("os.environ.update(" + sconsEnv + ")") +if env.WhereIs('cl'): + print("os.environ.update(%%s)" %% repr(env['ENV'])) """ % locals()) +if(test.stdout() == ""): + msg = "Visual Studio %s missing cl.exe; skipping test.\n" % msvs_version + test.skip_test(msg) + exec(test.stdout()) diff --git a/test/MSVS/vs-11.0-exec.py b/test/MSVS/vs-11.0-exec.py index 21645f5..48acd1c 100644 --- a/test/MSVS/vs-11.0-exec.py +++ b/test/MSVS/vs-11.0-exec.py @@ -55,10 +55,14 @@ if not msvs_version in test.msvs_versions(): test.run(arguments = '-n -q -Q -f -', stdin = """\ env = Environment(tools = ['msvc'], MSVS_VERSION='%(msvs_version)s') -sconsEnv = repr(env['ENV']) -print("os.environ.update(" + sconsEnv + ")") +if env.WhereIs('cl'): + print("os.environ.update(%%s)" %% repr(env['ENV'])) """ % locals()) +if(test.stdout() == ""): + msg = "Visual Studio %s missing cl.exe; skipping test.\n" % msvs_version + test.skip_test(msg) + exec(test.stdout()) diff --git a/test/MSVS/vs-11.0Exp-exec.py b/test/MSVS/vs-11.0Exp-exec.py index be48971..6a288a5 100644 --- a/test/MSVS/vs-11.0Exp-exec.py +++ b/test/MSVS/vs-11.0Exp-exec.py @@ -55,10 +55,14 @@ if not msvs_version in test.msvs_versions(): test.run(arguments = '-n -q -Q -f -', stdin = """\ env = Environment(tools = ['msvc'], MSVS_VERSION='%(msvs_version)s') -sconsEnv = repr(env['ENV']) -print("os.environ.update(" + sconsEnv + ")") +if env.WhereIs('cl'): + print("os.environ.update(%%s)" %% repr(env['ENV'])) """ % locals()) +if(test.stdout() == ""): + msg = "Visual Studio %s missing cl.exe; skipping test.\n" % msvs_version + test.skip_test(msg) + exec(test.stdout()) diff --git a/test/MSVS/vs-14.0-exec.py b/test/MSVS/vs-14.0-exec.py index f2a826c..d2b7112 100644 --- a/test/MSVS/vs-14.0-exec.py +++ b/test/MSVS/vs-14.0-exec.py @@ -55,10 +55,14 @@ if not msvs_version in test.msvs_versions(): test.run(arguments = '-n -q -Q -f -', stdin = """\ env = Environment(tools = ['msvc'], MSVS_VERSION='%(msvs_version)s') -sconsEnv = repr(env['ENV']) -print("os.environ.update(" + sconsEnv + ")") +if env.WhereIs('cl'): + print("os.environ.update(%%s)" %% repr(env['ENV'])) """ % locals()) +if(test.stdout() == ""): + msg = "Visual Studio %s missing cl.exe; skipping test.\n" % msvs_version + test.skip_test(msg) + exec(test.stdout()) diff --git a/test/MSVS/vs-6.0-clean.py b/test/MSVS/vs-6.0-clean.py index 6b9bd98..0cbadba 100644 --- a/test/MSVS/vs-6.0-clean.py +++ b/test/MSVS/vs-6.0-clean.py @@ -72,7 +72,7 @@ env.MSVSSolution(target = 'Test.dsw', variant = 'Release') """%{'HOST_ARCH':host_arch}) -test.run(arguments=".") +test.run() test.must_exist(test.workpath('Test.dsp')) dsp = test.read('Test.dsp', 'r') diff --git a/test/MSVS/vs-6.0-exec.py b/test/MSVS/vs-6.0-exec.py index d017790..0864f76 100644 --- a/test/MSVS/vs-6.0-exec.py +++ b/test/MSVS/vs-6.0-exec.py @@ -54,10 +54,14 @@ if not msvs_version in test.msvs_versions(): test.run(arguments = '-n -q -Q -f -', stdin = """\ env = Environment(tools = ['msvc'], MSVS_VERSION='%(msvs_version)s') -sconsEnv = repr(env['ENV']) -print("os.environ.update(" + sconsEnv + ")") +if env.WhereIs('cl'): + print("os.environ.update(%%s)" %% repr(env['ENV'])) """ % locals()) +if(test.stdout() == ""): + msg = "Visual Studio %s missing cl.exe; skipping test.\n" % msvs_version + test.skip_test(msg) + exec(test.stdout()) diff --git a/test/MSVS/vs-7.0-exec.py b/test/MSVS/vs-7.0-exec.py index e62ee77..e95ca83 100644 --- a/test/MSVS/vs-7.0-exec.py +++ b/test/MSVS/vs-7.0-exec.py @@ -54,10 +54,14 @@ if not msvs_version in test.msvs_versions(): test.run(arguments = '-n -q -Q -f -', stdin = """\ env = Environment(tools = ['msvc'], MSVS_VERSION='%(msvs_version)s') -sconsEnv = repr(env['ENV']) -print("os.environ.update(" + sconsEnv + ")") +if env.WhereIs('cl'): + print("os.environ.update(%%s)" %% repr(env['ENV'])) """ % locals()) +if(test.stdout() == ""): + msg = "Visual Studio %s missing cl.exe; skipping test.\n" % msvs_version + test.skip_test(msg) + exec(test.stdout()) diff --git a/test/MSVS/vs-7.1-exec.py b/test/MSVS/vs-7.1-exec.py index 42f6ae8..11ea617 100644 --- a/test/MSVS/vs-7.1-exec.py +++ b/test/MSVS/vs-7.1-exec.py @@ -54,10 +54,14 @@ if not msvs_version in test.msvs_versions(): test.run(arguments = '-n -q -Q -f -', stdin = """\ env = Environment(tools = ['msvc'], MSVS_VERSION='%(msvs_version)s') -sconsEnv = repr(env['ENV']) -print("os.environ.update(" + sconsEnv + ")") +if env.WhereIs('cl'): + print("os.environ.update(%%s)" %% repr(env['ENV'])) """ % locals()) +if(test.stdout() == ""): + msg = "Visual Studio %s missing cl.exe; skipping test.\n" % msvs_version + test.skip_test(msg) + exec(test.stdout()) diff --git a/test/MSVS/vs-8.0-exec.py b/test/MSVS/vs-8.0-exec.py index 96c4c29..4b0a6dd 100644 --- a/test/MSVS/vs-8.0-exec.py +++ b/test/MSVS/vs-8.0-exec.py @@ -55,9 +55,14 @@ if not msvs_version in test.msvs_versions(): test.run(arguments = '-n -q -Q -f -', stdin = """\ env = Environment(tools = ['msvc'], MSVS_VERSION='%(msvs_version)s') -print("os.environ.update(%%s)" %% repr(env['ENV'])) +if env.WhereIs('cl'): + print("os.environ.update(%%s)" %% repr(env['ENV'])) """ % locals()) +if(test.stdout() == ""): + msg = "Visual Studio %s missing cl.exe; skipping test.\n" % msvs_version + test.skip_test(msg) + exec(test.stdout()) diff --git a/test/MSVS/vs-8.0Exp-exec.py b/test/MSVS/vs-8.0Exp-exec.py index 66196f1..0e4396d 100644 --- a/test/MSVS/vs-8.0Exp-exec.py +++ b/test/MSVS/vs-8.0Exp-exec.py @@ -55,10 +55,14 @@ if not msvs_version in test.msvs_versions(): test.run(arguments = '-n -q -Q -f -', stdin = """\ env = Environment(tools = ['msvc'], MSVS_VERSION='%(msvs_version)s') -sconsEnv = repr(env['ENV']) -print("os.environ.update(" + sconsEnv + ")") +if env.WhereIs('cl'): + print("os.environ.update(%%s)" %% repr(env['ENV'])) """ % locals()) +if(test.stdout() == ""): + msg = "Visual Studio %s missing cl.exe; skipping test.\n" % msvs_version + test.skip_test(msg) + exec(test.stdout()) diff --git a/test/MSVS/vs-9.0-exec.py b/test/MSVS/vs-9.0-exec.py index 7b544aa..3f823fa 100644 --- a/test/MSVS/vs-9.0-exec.py +++ b/test/MSVS/vs-9.0-exec.py @@ -55,10 +55,14 @@ if not msvs_version in test.msvs_versions(): test.run(arguments = '-n -q -Q -f -', stdin = """\ env = Environment(tools = ['msvc'], MSVS_VERSION='%(msvs_version)s') -sconsEnv = repr(env['ENV']) -print("os.environ.update(" + sconsEnv + ")") +if env.WhereIs('cl'): + print("os.environ.update(%%s)" %% repr(env['ENV'])) """ % locals()) +if(test.stdout() == ""): + msg = "Visual Studio %s missing cl.exe; skipping test.\n" % msvs_version + test.skip_test(msg) + exec(test.stdout()) diff --git a/test/MSVS/vs-9.0Exp-exec.py b/test/MSVS/vs-9.0Exp-exec.py index caa763e..5a65faf 100644 --- a/test/MSVS/vs-9.0Exp-exec.py +++ b/test/MSVS/vs-9.0Exp-exec.py @@ -55,10 +55,14 @@ if not msvs_version in test.msvs_versions(): test.run(arguments = '-n -q -Q -f -', stdin = """\ env = Environment(tools = ['msvc'], MSVS_VERSION='%(msvs_version)s') -sconsEnv = repr(env['ENV']) -print("os.environ.update(" + sconsEnv + ")") +if env.WhereIs('cl'): + print("os.environ.update(%%s)" %% repr(env['ENV'])) """ % locals()) +if(test.stdout() == ""): + msg = "Visual Studio %s missing cl.exe; skipping test.\n" % msvs_version + test.skip_test(msg) + exec(test.stdout()) diff --git a/test/SWIG/SWIGOUTDIR-python.py b/test/SWIG/SWIGOUTDIR-python.py index db0cc95..8d6703f 100644 --- a/test/SWIG/SWIGOUTDIR-python.py +++ b/test/SWIG/SWIGOUTDIR-python.py @@ -30,7 +30,6 @@ that Python files are created in the specified output directory. """ import TestSCons -import os import sys test = TestSCons.TestSCons() @@ -40,10 +39,7 @@ if not swig: test.skip_test('Can not find installed "swig", skipping test.\n') python, python_include, python_libpath, python_lib = \ - test.get_platform_python_info() -Python_h = os.path.join(python_include, 'Python.h') -if not os.path.exists(Python_h): - test.skip_test('Can not find %s, skipping test.\n' % Python_h) + test.get_platform_python_info(python_h_required=True) # On Windows, build a 32-bit exe if on 32-bit python. if sys.platform == 'win32' and sys.maxsize <= 2**32: diff --git a/test/SWIG/build-dir.py b/test/SWIG/build-dir.py index eba3fea..d268c87 100644 --- a/test/SWIG/build-dir.py +++ b/test/SWIG/build-dir.py @@ -29,7 +29,6 @@ Make sure SWIG works when a VariantDir (or variant_dir) is used. Test case courtesy Joe Maruszewski. """ -import os.path import sys import TestSCons @@ -50,10 +49,7 @@ else: test.subdir(['source']) python, python_include, python_libpath, python_lib = \ - test.get_platform_python_info() -Python_h = os.path.join(python_include, 'Python.h') -if not os.path.exists(Python_h): - test.skip_test('Can not find %s, skipping test.\n' % Python_h) + test.get_platform_python_info(python_h_required=True) if sys.platform == 'win32' and sys.maxsize <= 2**32: swig_arch_var="TARGET_ARCH='x86'," diff --git a/test/SWIG/generated_swigfile.py b/test/SWIG/generated_swigfile.py index d09b473..145349b 100644 --- a/test/SWIG/generated_swigfile.py +++ b/test/SWIG/generated_swigfile.py @@ -29,7 +29,6 @@ Verify that SCons realizes the -noproxy option means no .py file will be created. """ -import os import sys import TestSCons @@ -55,10 +54,7 @@ if not swig: test.skip_test('Can not find installed "swig", skipping test.\n') python, python_include, python_libpath, python_lib = \ - test.get_platform_python_info() -Python_h = os.path.join(python_include, 'Python.h') -if not os.path.exists(Python_h): - test.skip_test('Can not find %s, skipping test.\n' % Python_h) + test.get_platform_python_info(python_h_required=True) # handle testing on other platforms: ldmodule_prefix = '_' diff --git a/test/SWIG/live.py b/test/SWIG/live.py index 7c4bdce..a64defe 100644 --- a/test/SWIG/live.py +++ b/test/SWIG/live.py @@ -28,7 +28,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" Test SWIG behavior with a live, installed SWIG. """ -import os.path +import os import sys import TestSCons @@ -46,12 +46,9 @@ swig = test.where_is('swig') if not swig: test.skip_test('Can not find installed "swig", skipping test.\n') - python, python_include, python_libpath, python_lib = \ - test.get_platform_python_info() -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) + test.get_platform_python_info(python_h_required=True) + swig = swig.replace('\\','/') python = python.replace('\\','/') python_include = python_include.replace('\\','/') @@ -170,4 +167,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: diff --git a/test/SWIG/module-deduced-name.py b/test/SWIG/module-deduced-name.py index bdaef4f..14d23a2 100644 --- a/test/SWIG/module-deduced-name.py +++ b/test/SWIG/module-deduced-name.py @@ -31,7 +31,6 @@ emitter should return the basename of the module only. """ import TestSCons -import os import sys test = TestSCons.TestSCons() @@ -41,10 +40,7 @@ if not swig: test.skip_test('Cannot find installed "swig", skipping test.\n') python, python_include, python_libpath, python_lib = \ - test.get_platform_python_info() -Python_h = os.path.join(python_include, 'Python.h') -if not os.path.exists(Python_h): - test.skip_test('Cannot find %s, skipping test.\n' % Python_h) + test.get_platform_python_info(python_h_required=True) # On Windows, build a 32-bit exe if on 32-bit python. if sys.platform == 'win32' and sys.maxsize <= 2**32: diff --git a/test/SWIG/module-parens.py b/test/SWIG/module-parens.py index d8c1744..4ce7511 100644 --- a/test/SWIG/module-parens.py +++ b/test/SWIG/module-parens.py @@ -29,7 +29,6 @@ Verify that we handle %module(directors="1") statements, both with and without white space before the opening parenthesis. """ -import os.path import sys import TestSCons @@ -40,10 +39,7 @@ if not swig: test.skip_test('Can not find installed "swig", skipping test.\n') python, python_include, python_libpath, python_lib = \ - test.get_platform_python_info() -Python_h = os.path.join(python_include, 'Python.h') -if not os.path.exists(Python_h): - test.skip_test('Can not find %s, skipping test.\n' % Python_h) + test.get_platform_python_info(python_h_required=True) # swig-python expects specific filenames. # the platform specific suffix won't necessarily work. diff --git a/test/SWIG/module-quoted.py b/test/SWIG/module-quoted.py index 6f4b891..60bc0b0 100644 --- a/test/SWIG/module-quoted.py +++ b/test/SWIG/module-quoted.py @@ -29,7 +29,6 @@ Verify that we correctly parse quoted module names; e.g. %module "test" (SWIG permits double-quoted names but not single-quoted ones.) """ -import os.path import sys import TestSCons @@ -40,10 +39,7 @@ if not swig: test.skip_test('Can not find installed "swig", skipping test.\n') python, python_include, python_libpath, python_lib = \ - test.get_platform_python_info() -Python_h = os.path.join(python_include, 'Python.h') -if not os.path.exists(Python_h): - test.skip_test('Can not find %s, skipping test.\n' % Python_h) + test.get_platform_python_info(python_h_required=True) # swig-python expects specific filenames. # the platform specific suffix won't necessarily work. diff --git a/test/SWIG/module-spaces.py b/test/SWIG/module-spaces.py index 2833dff..6a3f270 100644 --- a/test/SWIG/module-spaces.py +++ b/test/SWIG/module-spaces.py @@ -29,7 +29,6 @@ Verify that we correctly parse module names with spaces on the line after the module name ; e.g. "%module test " """ -import os.path import sys import TestSCons @@ -40,10 +39,7 @@ if not swig: test.skip_test('Can not find installed "swig", skipping test.\n') python, python_include, python_libpath, python_lib = \ - test.get_platform_python_info() -Python_h = os.path.join(python_include, 'Python.h') -if not os.path.exists(Python_h): - test.skip_test('Can not find %s, skipping test.\n' % Python_h) + test.get_platform_python_info(python_h_required=True) # swig-python expects specific filenames. # the platform specific suffix won't necessarily work. diff --git a/test/SWIG/noproxy.py b/test/SWIG/noproxy.py index 1aaeb08..f94f553 100644 --- a/test/SWIG/noproxy.py +++ b/test/SWIG/noproxy.py @@ -29,7 +29,6 @@ Verify that SCons realizes the -noproxy option means no .py file will be created. """ -import os import sys import TestSCons @@ -48,10 +47,7 @@ if not swig: test.skip_test('Can not find installed "swig", skipping test.\n') python, python_include, python_libpath, python_lib = \ - test.get_platform_python_info() -Python_h = os.path.join(python_include, 'Python.h') -if not os.path.exists(Python_h): - test.skip_test('Can not find %s, skipping test.\n' % Python_h) + test.get_platform_python_info(python_h_required=True) # handle testing on other platforms: ldmodule_prefix = '_' diff --git a/test/SWIG/recursive-includes-cpp.py b/test/SWIG/recursive-includes-cpp.py index b943406..3999cc3 100644 --- a/test/SWIG/recursive-includes-cpp.py +++ b/test/SWIG/recursive-includes-cpp.py @@ -44,6 +44,9 @@ 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) +python, python_include, python_libpath, python_lib = \ + test.get_platform_python_info(python_h_required=True) + 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 +153,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: diff --git a/test/SWIG/remove-modules.py b/test/SWIG/remove-modules.py index f5ce60d..a4d7b16 100644 --- a/test/SWIG/remove-modules.py +++ b/test/SWIG/remove-modules.py @@ -29,7 +29,6 @@ Verify that swig-generated modules are removed. The %module directive specifies the module name. """ -import os.path import sys import TestSCons @@ -48,10 +47,7 @@ if not swig: test.skip_test('Can not find installed "swig", skipping test.\n') python, python_include, python_libpath, python_lib = \ - test.get_platform_python_info() -Python_h = os.path.join(python_include, 'Python.h') -if not os.path.exists(Python_h): - test.skip_test('Can not find %s, skipping test.\n' % Python_h) + test.get_platform_python_info(python_h_required=True) # handle testing on other platforms: ldmodule_prefix = '_' diff --git a/test/SWIG/subdir.py b/test/SWIG/subdir.py index e23b858..6951753 100644 --- a/test/SWIG/subdir.py +++ b/test/SWIG/subdir.py @@ -29,7 +29,6 @@ Verify that we expect the .py file created by the -python flag to be in the same subdirectory as the taget. """ -import os import sys import TestSCons @@ -50,10 +49,7 @@ if not swig: test.skip_test('Can not find installed "swig", skipping test.\n') python, python_include, python_libpath, python_lib = \ - test.get_platform_python_info() -Python_h = os.path.join(python_include, 'Python.h') -if not os.path.exists(Python_h): - test.skip_test('Can not find %s, skipping test.\n' % Python_h) + test.get_platform_python_info(python_h_required=True) # handle testing on other platforms: ldmodule_prefix = '_' |