From cdb00ada1bdc0bfd62ae7e1d518ac8a62a4cbab9 Mon Sep 17 00:00:00 2001 From: gregnoel Date: Sun, 10 May 2009 00:58:21 +0000 Subject: [PATCH] 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. git-svn-id: http://scons.tigris.org/svn/scons/trunk@4182 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- test/import.py | 105 ++++++++++--------------------------------------- 1 file changed, 20 insertions(+), 85 deletions(-) diff --git a/test/import.py b/test/import.py index c617d0b2..ff15e16c 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. -- 2.26.2