summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-07-24 08:11:18 (GMT)
committerSteven Knight <knight@baldmt.com>2003-07-24 08:11:18 (GMT)
commit7a3d5b8e06e44fee43fc78d7eb72b8d271022c18 (patch)
tree9644777ce4b886806bd13ce207e047da336a7b12 /etc
parent5d238601a22fa009de4df38e0257c405f9b243db (diff)
downloadSCons-7a3d5b8e06e44fee43fc78d7eb72b8d271022c18.zip
SCons-7a3d5b8e06e44fee43fc78d7eb72b8d271022c18.tar.gz
SCons-7a3d5b8e06e44fee43fc78d7eb72b8d271022c18.tar.bz2
Add a QT tool. (Christoph Wiedemann)
Diffstat (limited to 'etc')
-rw-r--r--etc/TestSCons.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/etc/TestSCons.py b/etc/TestSCons.py
index 786b394..59b0647 100644
--- a/etc/TestSCons.py
+++ b/etc/TestSCons.py
@@ -264,3 +264,22 @@ class TestSCons(TestCmd.TestCmd):
kw['arguments'] = arguments
kw['stdout'] = self.wrap_stdout(build_str = s)
apply(self.run, [], kw)
+
+ def not_up_to_date(self, options = None, arguments = None, **kw):
+ """Asserts that none of the targets listed in arguments is
+ up to date, but does not make any assumptions on other targets.
+ This function is most useful in conjunction with the -n option.
+ """
+ s = ""
+ for arg in string.split(arguments):
+ s = s + "(?!scons: `%s' is up to date.)" % arg
+ if options:
+ arguments = options + " " + arguments
+ kw['arguments'] = arguments
+ stdout = self.wrap_stdout(build_str="("+s+"[^\n]*\n)*")
+ stdout = string.replace(stdout,'\n','\\n')
+ stdout = string.replace(stdout,'.','\\.')
+ old_match_func = self.match_func
+ self.match_func = TestCmd.match_re_dotall
+ apply(self.run, [], kw)
+ self.match_func = old_match_func