mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 01:12:13 +00:00
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]
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user