diff options
author | Steven Knight <knight@baldmt.com> | 2003-07-24 08:11:18 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-07-24 08:11:18 (GMT) |
commit | 7a3d5b8e06e44fee43fc78d7eb72b8d271022c18 (patch) | |
tree | 9644777ce4b886806bd13ce207e047da336a7b12 /etc | |
parent | 5d238601a22fa009de4df38e0257c405f9b243db (diff) | |
download | SCons-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.py | 19 |
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 |