From b2b495c2858828b575c331085ba026c2006a89fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Sat, 23 Jun 2012 23:16:01 +0000 Subject: [PATCH] Updated Boost Build's internal test system to not report an error as if it was not able to run the external diff tool when that tool returns 1 to indicate that the two files given to it are different. [SVN r79037] --- v2/test/BoostBuild.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/v2/test/BoostBuild.py b/v2/test/BoostBuild.py index 0c4cf2821..7699b2eeb 100644 --- a/v2/test/BoostBuild.py +++ b/v2/test/BoostBuild.py @@ -797,7 +797,11 @@ class Tester(TestCmd.TestCmd): open(e, "w").write(expected) open(a, "w").write(actual) print "DIFFERENCE" - if os.system("diff -u %s %s" % (e, a)): + # Current diff should return 1 to indicate 'different input files' + # but some older diff versions may return 0 and depending on the + # exact Python/OS platform os.system() call may gobble out the + # external process's return code and return 0 itself. + if os.system("diff -u %s %s" % (e, a)) not in [0, 1]: print "Unable to compute difference: diff -u %s %s" % (e, a) os.unlink(e) os.unlink(a)