[cfe-commits] r62388 - /cfe/trunk/utils/CmpDriver
Daniel Dunbar
daniel at zuster.org
Fri Jan 16 16:50:46 PST 2009
Author: ddunbar
Date: Fri Jan 16 18:50:45 2009
New Revision: 62388
URL: http://llvm.org/viewvc/llvm-project?rev=62388&view=rev
Log:
Return success indicator from CmpDriver.
Modified:
cfe/trunk/utils/CmpDriver
Modified: cfe/trunk/utils/CmpDriver
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/CmpDriver?rev=62388&r1=62387&r2=62388&view=diff
==============================================================================
--- cfe/trunk/utils/CmpDriver (original)
+++ cfe/trunk/utils/CmpDriver Fri Jan 16 18:50:45 2009
@@ -135,17 +135,21 @@
infoA = captureDriverInfo(driverA, args)
infoB = captureDriverInfo(driverB, args)
+ differ = False
+
# Compare stdout.
if infoA.stdout != infoB.stdout:
print '-- STDOUT DIFFERS -'
print 'A: ',infoA.stdout
print 'B: ',infoB.stdout
+ differ = True
# Compare stderr.
if infoA.stderr != infoB.stderr:
print '-- STDERR DIFFERS -'
print 'A: ',infoA.stderr
print 'B: ',infoB.stderr
+ differ = True
# Compare commands.
for i,(a,b) in enumerate(zip(infoA.commands, infoB.commands)):
@@ -164,12 +168,17 @@
else:
print 'mismatch: A: %s' % aElt
print ' B: %s' % bElt
+ differ = True
# Compare result codes.
if infoA.exitCode != infoB.exitCode:
print '-- EXIT CODES DIFFER -'
print 'A: ',infoA.exitCode
print 'B: ',infoB.exitCode
+ differ = True
+
+ if differ:
+ sys.exit(1)
if __name__ == '__main__':
main()
More information about the cfe-commits
mailing list