summaryrefslogtreecommitdiffstats
path: root/test/CC
diff options
context:
space:
mode:
authorMichael Haubenwallner <haubi@gentoo.org>2014-05-15 08:17:03 (GMT)
committerMichael Haubenwallner <haubi@gentoo.org>2014-05-15 08:17:03 (GMT)
commitc82684ba964183647a1965589ef852eacd9e5447 (patch)
treeeeac860a5e8bba755f8f5dc091702bc78989d8a0 /test/CC
parent80cdee0bb0319a9c14abd9c60b4123aee07f0274 (diff)
downloadSCons-c82684ba964183647a1965589ef852eacd9e5447.zip
SCons-c82684ba964183647a1965589ef852eacd9e5447.tar.gz
SCons-c82684ba964183647a1965589ef852eacd9e5447.tar.bz2
Respect preset CC/CXX values detecting cc/c++/gcc/g++ Tools.
As the user-preset values for CC/CXX should rule always, also respect them in exists() and generate() methods of these Tools. As a result, the value for CCVERSION/CXXVERSION does match the CC/CXX compiler used (issue#1723).
Diffstat (limited to 'test/CC')
-rw-r--r--test/CC/CC.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/CC/CC.py b/test/CC/CC.py
index 73dc4e6..9500088 100644
--- a/test/CC/CC.py
+++ b/test/CC/CC.py
@@ -156,7 +156,8 @@ env.Program(target = 'test2', source = 'test2.C')
test.write("wrapper.py",
"""import os
import sys
-open('%s', 'wb').write("wrapper.py\\n")
+if '--version' not in sys.argv and '-dumpversion' not in sys.argv:
+ open('%s', 'wb').write("wrapper.py\\n")
os.system(" ".join(sys.argv[1:]))
""" % test.workpath('wrapper.out').replace('\\', '\\\\'))
@@ -197,13 +198,13 @@ main(int argc, char *argv[])
test.run(arguments = 'foo' + _exe)
-test.fail_test(os.path.exists(test.workpath('wrapper.out')))
+test.must_not_exist(test.workpath('wrapper.out'))
test.up_to_date(arguments = 'foo' + _exe)
test.run(arguments = 'bar' + _exe)
-test.fail_test(test.read('wrapper.out') != "wrapper.py\n")
+test.must_match('wrapper.out', "wrapper.py\n")
test.up_to_date(arguments = 'bar' + _exe)