Changeset: 963ff5244808 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=963ff5244808
Modified Files:
testing/Mtest.py.in
Branch: Oct2014
Log Message:
Reduce default verbosity.
diffs (57 lines):
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -1317,11 +1317,10 @@ def ApproveOutput (env, TST) :
SYSTEM = stableOUTPUT.split(WHAT)[-1]
if os.path.isfile(testOUTPUT):
-# print "Approving "+testOUTPUT+" -> "+stableOUTPUT
if os.path.isfile(stableOUTPUT):
- oc = 'overwriting old'
+ oc = ' (overwriting old file)'
else:
- oc = 'creating new'
+ oc = ' (creating new file)'
if os.path.isfile(stableOUT):
shutil.copy(stableOUT,stableOUTPUT)
else:
@@ -1341,7 +1340,9 @@ def ApproveOutput (env, TST) :
proc.wait()
f.close()
if os.path.getsize(patch + ".0"):
- print "Approving %s -> stable.%s%s (%s file)" %
(os.path.join(TSTDIR, "%s.test.%s" % (TST, WHAT)), WHAT, SYSTEM, oc)
+ if not verbose:
+ oc = ''
+ print "Approving %s -> stable.%s%s%s" %
(os.path.join(TSTDIR, "%s.test.%s" % (TST, WHAT)), WHAT, SYSTEM, oc)
f = open(patch + ".1", "wb")
for l in open(patch + ".0"):
@@ -1366,7 +1367,10 @@ def ApproveOutput (env, TST) :
o = open(stableOUTPUT).read()
open(stableOUTPUT + ".ORG", 'wb').write(o)
open(stableOUTPUT, 'wb').write(o)
- proc = process.Popen(['patch', stableOUTPUT, patch + '.1'])
+ patchcmd = ['patch']
+ if not verbose:
+ patchcmd.append('--quiet')
+ proc = process.Popen(patchcmd + [stableOUTPUT, patch + '.1'])
proc.wait()
f = open(patch, 'w')
proc = process.Popen(['diff', '-u', stableOUTPUT + '.ORG',
@@ -1389,14 +1393,12 @@ def ApproveOutput (env, TST) :
if f != thefile and test.match(f):
remove(os.path.join(dir or os.curdir, f + '.rej'))
remove(os.path.join(dir or os.curdir, f + '.orig'))
- proc = process.Popen(['patch', '--forward',
os.path.join(dir or os.curdir, f)], stdin = open(patch))
+ proc = process.Popen(patchcmd + ['--forward',
os.path.join(dir or os.curdir, f)], stdin = open(patch))
proc.wait()
if os.path.exists(os.path.join(dir or os.curdir, f
+ '.rej')):
list.append(f)
if len(list) > 0:
- Warn('There are other (specific) stable outputs for test
%s\nfor which patching failed:\n %s' % (os.path.join(TSTDIR,'Tests',TST),
str(list)))
- STDERR.write(' Look at the *.rej files in directory
%s.\n\n' % os.path.join(TSTDIR,'Tests'))
- STDERR.flush()
+ Warn('There are other (specific) stable outputs for
test\n%s for which patching failed:\n %s\n\n Look at the *.rej files in
directory %s.' % (os.path.join(TSTDIR,'Tests',TST), str(list),
os.path.join(TSTDIR,'Tests')))
elif verbose:
print "No differences detected between %s and stable.%s%s
that are not ignored by Mtest.py." % (os.path.join(TSTDIR, "%s.test.%s" % (TST,
WHAT)), WHAT, SYSTEM)
remove(patch + ".0")
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list