diff options
author | Steven Knight <knight@baldmt.com> | 2005-08-13 05:42:18 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2005-08-13 05:42:18 (GMT) |
commit | 397834382e9994ed549d7677f30439fbda3fae7c (patch) | |
tree | 7b99184d14e042b4f58b1f2186cbf70f4f05cfc8 /test/Fortran | |
parent | 207ec8b23f6ce0aaf46f24da97bb3e627d12a1f7 (diff) | |
download | SCons-397834382e9994ed549d7677f30439fbda3fae7c.zip SCons-397834382e9994ed549d7677f30439fbda3fae7c.tar.gz SCons-397834382e9994ed549d7677f30439fbda3fae7c.tar.bz2 |
Add a skip_test() method to the infrastructure and use it for test scripts that skip all or part of their tests based on tool availability or test platform.
Diffstat (limited to 'test/Fortran')
-rw-r--r-- | test/Fortran/F77PATH.py | 2 | ||||
-rw-r--r-- | test/Fortran/F90PATH.py | 23 | ||||
-rw-r--r-- | test/Fortran/FORTRANPATH.py | 2 |
3 files changed, 17 insertions, 10 deletions
diff --git a/test/Fortran/F77PATH.py b/test/Fortran/F77PATH.py index e88cdc7..4308bed 100644 --- a/test/Fortran/F77PATH.py +++ b/test/Fortran/F77PATH.py @@ -39,7 +39,7 @@ args = prog + ' ' + subdir_prog + ' ' + variant_prog test = TestSCons.TestSCons() if not test.detect('F77', 'g77'): - test.pass_test() + test.skip_test('Found no $F77 tool; skipping test.\n') test.subdir('include', 'subdir', ['subdir', 'include'], 'inc2') diff --git a/test/Fortran/F90PATH.py b/test/Fortran/F90PATH.py index 7dbbf2b..c1b6f49 100644 --- a/test/Fortran/F90PATH.py +++ b/test/Fortran/F90PATH.py @@ -39,16 +39,23 @@ args = prog + ' ' + subdir_prog + ' ' + variant_prog test = TestSCons.TestSCons() -#if not test.detect('F90', 'g90'): -# test.pass_test() -base = '/opt/intel_fc_80' -F90 = os.path.join(base, 'bin', 'ifort') +baselist = [ + '/opt/intel_fc_80', + '/opt/intel/fc/9.0', +] + +F90 = None +for base in baselist: + ifort = os.path.join(base, 'bin', 'ifort') + if os.path.exists(ifort): + F90 = ifort + +if not F90: + l = string.join(baselist, '\n\t') + test.skip_test('No (hard-coded) F90 compiler under:' + l + '\n') + LIBPATH = os.path.join(base, 'lib') LIBS = ['irc'] -if not os.path.exists(F90): - sys.stderr.write('No (hard-coded) F90 compiler %s\n' % F90) - test.no_result(1) - os.environ['LD_LIBRARY_PATH'] = LIBPATH test.subdir('include', 'subdir', ['subdir', 'include'], 'inc2') diff --git a/test/Fortran/FORTRANPATH.py b/test/Fortran/FORTRANPATH.py index ec1b13e..fc40bf1 100644 --- a/test/Fortran/FORTRANPATH.py +++ b/test/Fortran/FORTRANPATH.py @@ -39,7 +39,7 @@ args = prog + ' ' + subdir_prog + ' ' + variant_prog test = TestSCons.TestSCons() if not test.detect('F77', 'g77'): - test.pass_test() + test.skip_test('Found no $F77 tool; skipping test.\n') test.subdir('include', 'subdir', ['subdir', 'include'], 'inc2') |