summaryrefslogtreecommitdiff
path: root/test/CC
diff options
context:
space:
mode:
authorMichael Haubenwallner <haubi@gentoo.org>2014-05-15 10:17:03 +0200
committerMichael Haubenwallner <haubi@gentoo.org>2014-05-15 10:17:03 +0200
commitbb182e0aa1ca52754b462eee78514145633013ea (patch)
treeeeac860a5e8bba755f8f5dc091702bc78989d8a0 /test/CC
parent61aaabafd7a2133bfcef4553b07643025d36a669 (diff)
downloadscons-bb182e0aa1ca52754b462eee78514145633013ea.tar.gz
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 73dc4e6f..9500088d 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)