Source

SCons / test / up-to-date.py

Diff from to

test/up-to-date.py

 
 __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_
 
 test.run(arguments = 'f1.out f2.out f3.out f4.out', stdout = expect)
 
+# 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()
-