Merged revisions 2302-2362,2364-2452 via svnmerge from
[scons.git] / test / up-to-date.py
index cec59525ef29ee71720983412f7df011baee9c1b..366d017ec8f4abcb634cfd81f867ff8230cb3141 100644 (file)
 
 __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
 
-import os.path
+"""
+Verify appropriate printing of "is up to date" messages.
+"""
+
 import string
-import sys
+
 import TestSCons
 
 _python_ = TestSCons._python_
@@ -66,5 +69,29 @@ scons: `f3.out' is up to date.
 
 test.run(arguments = 'f1.out f2.out f3.out f4.out', stdout = expect)
 
-test.pass_test()
+# Make sure all of the "up to date" messages get printed even when -j
+# is used.  This broke during signature refactoring development.
+expected_lines = [
+    "scons: `f1.out' is up to date.",
+    "scons: `f2.out' is up to date.",
+    "scons: `f3.out' is up to date.",
+    "scons: `f4.out' is up to date.",
+]
 
+test.run(options = '-j4 f1.out f2.out f3.out f4.out')
+stdout = test.stdout()
+
+missing = []
+for line in expected_lines:
+    if string.find(stdout, line) == -1:
+        missing.append(line)
+
+if missing:
+    print "Missing the following expected lines:"
+    for line in missing:
+        print line
+    print "STDOUT =========="
+    print stdout
+    test.fail_test()
+
+test.pass_test()