Changeset: dc4021481b35 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dc4021481b35
Modified Files:
testing/Mtest.py.in
Branch: default
Log Message:
Merge with Oct2014 branch.
diffs (106 lines):
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -1315,11 +1315,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:
@@ -1339,7 +1338,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"):
@@ -1364,7 +1365,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',
@@ -1384,17 +1388,17 @@ def ApproveOutput (env, TST) :
list = []
if not NOPATCH:
for f in os.listdir(dir or os.curdir):
- if f != thefile and test.match(f):
+ if f.endswith('.rej') or f.endswith('.orig'):
+ pass
+ elif 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")
@@ -3120,29 +3124,29 @@ def CheckClassPath() :
if os.path.isfile(p):
if f == 'BugConcurrent_clients_SF_1504657.class':
C = 'HAVE_JDBCTESTS_DIR'
- if not ( CONDITIONALS.has_key(C) and CONDITIONALS[C] ):
+ if not CONDITIONALS.get(C):
cp = cp + os.pathsep + d
CONDITIONALS[C] = '#'
else:
C = 'HAVE_%s' % f.upper().replace('.','_')
if not JARS.has_key(C):
C = 'HAVE_MONETDBJDBC_JAR'
- if not ( CONDITIONALS.has_key(C) and CONDITIONALS[C] )
\
- and JARS[C].match(f):
+ if not CONDITIONALS.get(C) and JARS[C].match(f):
cp = cp + os.pathsep + p
CONDITIONALS[C] = '#'
if cp:
os.environ['CLASSPATH'] = cp
- miss = ''
- for j in ['monetdbjdbc.jar', 'jdbcclient.jar', 'jdbctests.jar']:
- C = 'HAVE_%s' % j.upper().replace('.','_')
- if not ( CONDITIONALS.has_key(C) and CONDITIONALS[C] ):
- miss += ' "%s"' % j
- if miss and not quiet:
- Warn('Could not find%s in\nCLASSPATH="%s"' % (miss,cpx))
- if ( CONDITIONALS.has_key('HAVE_MONETDBJDBC_JAR') and
CONDITIONALS['HAVE_MONETDBJDBC_JAR'] ) and \
- ( ( CONDITIONALS.has_key('HAVE_JDBCTESTS_JAR') and
CONDITIONALS['HAVE_JDBCTESTS_JAR'] ) or \
- ( CONDITIONALS.has_key('HAVE_JDBCTESTS_DIR') and
CONDITIONALS['HAVE_JDBCTESTS_DIR'] ) ):
+ if verbose:
+ miss = ''
+ for j in ['monetdbjdbc.jar', 'jdbcclient.jar', 'jdbctests.jar']:
+ C = 'HAVE_%s' % j.upper().replace('.','_')
+ if not CONDITIONALS.get(C):
+ miss += ' "%s"' % j
+ if miss:
+ Warn('Could not find%s in\nCLASSPATH="%s"' % (miss,cpx))
+ if CONDITIONALS.get('HAVE_MONETDBJDBC_JAR') and \
+ ( CONDITIONALS.get('HAVE_JDBCTESTS_JAR') or
+ CONDITIONALS.get('HAVE_JDBCTESTS_DIR') ):
CONDITIONALS['HAVE_JDBCTESTS'] = '#'
### CheckClassPath() #
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list