Relax the precompiled header performance criterion to a 15% improvement,
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 28 Jan 2009 18:37:32 +0000 (18:37 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 28 Jan 2009 18:37:32 +0000 (18:37 +0000)
and print useful information if we fail to meet that.

git-svn-id: http://scons.tigris.org/svn/scons/trunk@3928 fdb21ef1-2011-0410-befe-b5e4ea1792b1

test/MSVC/msvc.py

index 3d2f1f47a8751223dca82e661000fc5d7d08d252..c2a2d0e39a1eb959a57cf61a4cc82cdbc5dfcf7b 100644 (file)
@@ -172,8 +172,13 @@ start = time.time()
 test.run(arguments='slow.obj', stderr=None)
 slow = time.time() - start
 
-# using precompiled headers should be significantly faster
-assert fast < slow*0.8
+# using precompiled headers should be faster
+limit = slow*0.85
+if fast >= limit:
+    print "Using precompiled headers was not fast enough:"
+    print "slow.obj:  %.3fs" % slow
+    print "fast.obj:  %.3fs (expected less than %.3fs)" % (fast, limit)
+    test.fail_test()
 
 # Modifying resource.h should cause both the resource and precompiled header to be rebuilt:
 test.write('resource.h', '''