summaryrefslogtreecommitdiff
path: root/test/Fortran
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2005-08-13 05:42:18 +0000
committerSteven Knight <knight@baldmt.com>2005-08-13 05:42:18 +0000
commit52fcda2435759339de636e5d5abad71b0f5372ad (patch)
tree7b99184d14e042b4f58b1f2186cbf70f4f05cfc8 /test/Fortran
parent90376f36df71401df8e7cf71fead9b7869153159 (diff)
downloadscons-52fcda2435759339de636e5d5abad71b0f5372ad.tar.gz
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.py2
-rw-r--r--test/Fortran/F90PATH.py23
-rw-r--r--test/Fortran/FORTRANPATH.py2
3 files changed, 17 insertions, 10 deletions
diff --git a/test/Fortran/F77PATH.py b/test/Fortran/F77PATH.py
index e88cdc75..4308bed8 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 7dbbf2b3..c1b6f490 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 ec1b13ec..fc40bf1e 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')