diff options
author | Steven Knight <knight@baldmt.com> | 2003-08-24 14:44:10 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-08-24 14:44:10 (GMT) |
commit | 852e7119fb7c6d6ccc2a4cb2c159445376b97fef (patch) | |
tree | d14db00af1a9d01734146c6e5ceceb61b83da6e0 /test | |
parent | 189d5b4d754cbd7eefde34aef617c4e3adcd8180 (diff) | |
download | SCons-852e7119fb7c6d6ccc2a4cb2c159445376b97fef.zip SCons-852e7119fb7c6d6ccc2a4cb2c159445376b97fef.tar.gz SCons-852e7119fb7c6d6ccc2a4cb2c159445376b97fef.tar.bz2 |
Support for additional UNIX variants: (Christian Engel)
Diffstat (limited to 'test')
-rw-r--r-- | test/ToolSurrogate.py | 2 | ||||
-rw-r--r-- | test/import.py | 35 |
2 files changed, 28 insertions, 9 deletions
diff --git a/test/ToolSurrogate.py b/test/ToolSurrogate.py index dc190dd..fa13b57 100644 --- a/test/ToolSurrogate.py +++ b/test/ToolSurrogate.py @@ -88,7 +88,7 @@ test.write('foo.c', "foo.c posix\n") test.run(arguments = '. platform=posix', stdout = test.wrap_stdout("""\ cc -c -o foo.obj foo.c -c++ -o foo.exe foo.obj +cc -o foo.exe foo.obj """)) test.write('foo.c', "foo.c win32\n") diff --git a/test/import.py b/test/import.py index be3858a..48c17be 100644 --- a/test/import.py +++ b/test/import.py @@ -44,25 +44,28 @@ x = SCons.Platform.%s.generate test.run() tools = [ - # Can't import '386asm' directly due to initial '3' syntax error... + # Can't import '386asm' everywhere due to Windows registry dependency. + 'aixc++', 'aixcc', 'aixf77', 'aixlink', 'ar', 'as', 'BitKeeper', + 'c++', 'cc', 'CVS', 'default', 'dvipdf', 'dvips', 'f77', - # Can't import 'g++' directly due to '+' syntax error... + 'g++', 'g77', 'gas', 'gcc', 'gnulink', 'gs', + 'hpc++', 'hpcc', 'hplink', 'icc', @@ -75,7 +78,7 @@ tools = [ 'latex', 'lex', 'link', - # Can't import 'linkloc' everywhere due to Windows registry dependency... + # Can't import 'linkloc' everywhere due to Windows registry dependency. 'm4', 'masm', 'midl', @@ -88,17 +91,18 @@ tools = [ 'pdflatex', 'pdftex', 'Perforce', - 'RCS', 'qt', + 'RCS', 'rmic', 'SCCS', 'sgiar', 'sgicc', 'sgilink', + 'Subversion', 'sunar', + 'sunc++', 'suncc', 'sunlink', - 'Subversion', 'swig', 'tar', 'tex', @@ -106,12 +110,27 @@ tools = [ 'zip', ] -for tool in tools: - test.write('SConstruct', """ +# An SConstruct for importing Tool names that have illegal characters +# for Python variable names. +indirect_import = """\ +env = Environment(tools = ['%s']) +SCons = __import__('SCons.Tool.%s', globals(), locals(), []) +m = getattr(SCons.Tool, '%s') +x = m.generate +""" + +# An SConstruct for importing Tool names "normally." +direct_import = """\ env = Environment(tools = ['%s']) import SCons.Tool.%s x = SCons.Tool.%s.generate -""" % (tool, tool, tool)) +""" + +for tool in tools: + if tool[0] in '0123456789' or '+' in tool: + test.write('SConstruct', indirect_import % (tool, tool, tool)) + else: + test.write('SConstruct', direct_import % (tool, tool, tool)) test.run() test.pass_test() |