summaryrefslogtreecommitdiffstats
path: root/test/site_scons
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2009-05-12 12:46:33 (GMT)
committerGary Oberbrunner <garyo@oberbrunner.com>2009-05-12 12:46:33 (GMT)
commit6d5cf1b6ff0e2d1b314fb4c60338b278785d02b4 (patch)
treed777aba85addb433b3966dc5ca312fdfd97567b1 /test/site_scons
parent261e9d7df97374d3e43543e7313f8327f542a1fe (diff)
downloadSCons-6d5cf1b6ff0e2d1b314fb4c60338b278785d02b4.zip
SCons-6d5cf1b6ff0e2d1b314fb4c60338b278785d02b4.tar.gz
SCons-6d5cf1b6ff0e2d1b314fb4c60338b278785d02b4.tar.bz2
Fix site_scons/site_init.py test failure on Windows by using 'type' instead of 'cat' if win32.
Diffstat (limited to 'test/site_scons')
-rw-r--r--test/site_scons/site_init.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/site_scons/site_init.py b/test/site_scons/site_init.py
index 231f36c..83c9a7f 100644
--- a/test/site_scons/site_init.py
+++ b/test/site_scons/site_init.py
@@ -25,6 +25,7 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import TestSCons
+import sys
"""
Verify site_scons/site_init.py file can define a tool, and it shows up
@@ -35,14 +36,19 @@ test = TestSCons.TestSCons()
test.subdir('site_scons')
+if sys.platform == 'win32':
+ cat_cmd='type'
+else:
+ cat_cmd='cat'
+
test.write(['site_scons', 'site_init.py'], """
def TOOL_FOO(env):
- env['FOO'] = 'cat'
+ env['FOO'] = '%s'
bld = Builder(action = '$FOO ${SOURCE} > ${TARGET}',
suffix = '.tgt')
env.Append(BUILDERS = {'Foo' : bld})
-""")
+"""%cat_cmd)
test.write('SConstruct', """
e=Environment(tools=['default', TOOL_FOO])
@@ -50,7 +56,7 @@ e.Foo(target='foo.out', source='SConstruct')
""")
test.run(arguments = '-Q .',
- stdout = """cat SConstruct > foo.out\n""")
+ stdout = """%s SConstruct > foo.out\n"""%cat_cmd)
"""