summaryrefslogtreecommitdiffstats
path: root/test/option-n.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-09-05 20:10:43 (GMT)
committerSteven Knight <knight@baldmt.com>2004-09-05 20:10:43 (GMT)
commit8c0944c021fb182621e27270d970287d63943e92 (patch)
tree84c5de901e52ffa99f41e99863e1f88e75ccea5b /test/option-n.py
parent7a9bf5959b5ae04c7ab84ac93e8908b82a2413c2 (diff)
downloadSCons-8c0944c021fb182621e27270d970287d63943e92.zip
SCons-8c0944c021fb182621e27270d970287d63943e92.tar.gz
SCons-8c0944c021fb182621e27270d970287d63943e92.tar.bz2
Lots of Configure() enhancements. (Christoph Wiedemann)
Diffstat (limited to 'test/option-n.py')
-rw-r--r--test/option-n.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/test/option-n.py b/test/option-n.py
index 7a324b5..fab117b 100644
--- a/test/option-n.py
+++ b/test/option-n.py
@@ -41,6 +41,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
import os.path
+import re
import string
import sys
import TestCmd
@@ -188,7 +189,7 @@ else:
""")
# test that conf_dir isn't created and an error is raised
stderr=r"""
-scons: \*\*\* Cannot update configure test \(config\.test\) within a dry-run\.
+scons: \*\*\* Cannot create configure directory "config\.test" within a dry-run\.
File \S+, line \S+, in \S+
"""
test.run(arguments="-n",stderr=stderr,status=2,
@@ -200,9 +201,9 @@ test.fail_test(os.path.exists(test.workpath("configure", "config.log")))
# verify that .cache and config.log are not created.
# an error should be raised
stderr=r"""
-scons: \*\*\* Cannot update configure test \(config\.test.conftest_0\.in\) within a dry-run\.
+scons: \*\*\* Cannot update configure test "%s" within a dry-run\.
File \S+, line \S+, in \S+
-"""
+""" % re.escape(os.path.join("config.test", "conftest_0.in"))
test.subdir(['configure','config.test'])
test.run(arguments="-n",stderr=stderr,status=2,
chdir=test.workpath("configure"))
@@ -217,17 +218,13 @@ test.fail_test(os.path.exists(test.workpath("configure", "config.log")))
# test that no error is raised, if all targets are up-to-date. In this
# case .cache and config.log shouldn't be created
stdout=test.wrap_stdout(build_str="scons: `.' is up to date.\n",
- read_str="""\
-Executing Custom Test ... ok
+ read_str=r"""Executing Custom Test ... \(cached\) yes
""")
test.run(status=0,chdir=test.workpath("configure"))
-cache1_mtime = os.path.getmtime(test.workpath("configure","config.test",".cache"))
log1_mtime = os.path.getmtime(test.workpath("configure","config.log"))
test.run(stdout=stdout,arguments="-n",status=0,
chdir=test.workpath("configure"))
-cache2_mtime = os.path.getmtime(test.workpath("configure","config.test",".cache"))
log2_mtime = os.path.getmtime(test.workpath("configure","config.log"))
-test.fail_test( cache1_mtime != cache2_mtime )
test.fail_test( log1_mtime != log2_mtime )
test.pass_test()