summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2009-05-10 00:58:21 (GMT)
committerGreg Noel <GregNoel@tigris.org>2009-05-10 00:58:21 (GMT)
commit8c2d6900c2e4a7b8917e1fb70efb0c18a1b385cd (patch)
tree6e942c5c9f7882d65dee8a68f1a643d225672635 /test
parent9a658f09321c970e2fe736cf0b21e4b6cf7b83b2 (diff)
downloadSCons-8c2d6900c2e4a7b8917e1fb70efb0c18a1b385cd.zip
SCons-8c2d6900c2e4a7b8917e1fb70efb0c18a1b385cd.tar.gz
SCons-8c2d6900c2e4a7b8917e1fb70efb0c18a1b385cd.tar.bz2
Automatically pick up the list of tools from the tool directory rather
than having a list in the regression test that has to be updated.
Diffstat (limited to 'test')
-rw-r--r--test/import.py105
1 files changed, 20 insertions, 85 deletions
diff --git a/test/import.py b/test/import.py
index c617d0b..ff15e16 100644
--- a/test/import.py
+++ b/test/import.py
@@ -33,8 +33,10 @@ import os
import re
import sys
-import TestSCons
+# must do this here, since TestSCons will chdir
+tooldir = os.path.join(os.getcwd(), 'src', 'engine', 'SCons', 'Tool')
+import TestSCons
test = TestSCons.TestSCons()
# Before executing the any of the platform or tool modules, add some
@@ -68,90 +70,23 @@ x = SCons.Platform.%(platform)s.generate
""" % locals())
test.run()
-tools = [
- # Can't import '386asm' everywhere due to Windows registry dependency.
- 'aixc++',
- 'aixcc',
- 'aixf77',
- 'aixlink',
- 'applelink',
- 'ar',
- 'as',
- 'bcc32',
- 'BitKeeper',
- 'c++',
- 'cc',
- 'cvf',
- 'CVS',
- 'default',
- 'dmd',
- 'dvi',
- 'dvipdf',
- 'dvips',
- 'f77',
- 'f90',
- 'f95',
- 'fortran',
- 'g++',
- 'g77',
- 'gas',
- 'gcc',
- 'gfortran',
- 'gnulink',
- 'gs',
- 'hpc++',
- 'hpcc',
- 'hplink',
- 'icc',
- 'icl',
- 'ifort',
- 'ifl',
- 'ilink',
- 'ilink32',
- 'intelc',
- 'jar',
- 'javac',
- 'javah',
- 'latex',
- 'lex',
- 'link',
- # Can't import 'linkloc' everywhere due to Windows registry dependency.
- 'm4',
- 'masm',
- 'midl',
- 'mingw',
- 'mslib',
- 'mslink',
- 'msvc',
- 'msvs',
- 'mwcc',
- 'mwld',
- 'nasm',
- 'pdf',
- 'pdflatex',
- 'pdftex',
- 'Perforce',
- 'qt',
- 'RCS',
- 'rmic',
- 'rpcgen',
- 'SCCS',
- 'sgiar',
- 'sgic++',
- 'sgicc',
- 'sgilink',
- 'Subversion',
- 'sunar',
- 'sunc++',
- 'suncc',
- 'sunlink',
- 'swig',
- 'tar',
- 'tex',
- 'tlib',
- 'yacc',
- 'zip',
-]
+ignore = ('__init__.py',
+ # Can't import these everywhere due to Windows registry dependency.
+ '386asm.py', 'linkloc.py',
+ # Directory of common stuff for MSVC and MSVS
+ 'MSCommon',
+ # Sun pkgchk and pkginfo common stuff
+ 'sun_pkg.py',
+ )
+tools = []
+for name in os.listdir(tooldir):
+ if name in ignore: continue
+ if name[-3:] == '.py':
+ if name[-8:] not in ('Tests.py', 'ommon.py'):
+ tools.append(name[:-3])
+ elif os.path.exists(os.path.join(tooldir,name,'__init__.py')):
+ tools.append(name)
+tools.sort() # why not?
#if sys.platform == 'win32':
# Just comment out (for now?) due to registry dependency.