Changeset: c01b5d0d310e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c01b5d0d310e
Modified Files:
sql/MonetDB-SQL.spec
Branch: default
Log Message:
Merge with Oct2010 branch.
diffs (293 lines):
diff -r 0466355d61de -r c01b5d0d310e sql/MonetDB-SQL.spec
--- a/sql/MonetDB-SQL.spec Mon Oct 25 16:47:11 2010 +0200
+++ b/sql/MonetDB-SQL.spec Mon Oct 25 17:37:51 2010 +0200
@@ -30,6 +30,7 @@
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: e2fsprogs-devel
+BuildRequires: pcre-devel
%if !%{?buildsystem}
BuildRequires: MonetDB-devel >= 1.40
diff -r 0466355d61de -r c01b5d0d310e testing/src/Mtest.py.in
--- a/testing/src/Mtest.py.in Mon Oct 25 16:47:11 2010 +0200
+++ b/testing/src/Mtest.py.in Mon Oct 25 17:37:51 2010 +0200
@@ -50,6 +50,8 @@
#import getpass
import Mfilter
+verbose = False
+
# Python 2.3 doesn't know about os.devnull...
try:
os.devnull
@@ -150,8 +152,12 @@
def GetConfig(cfg, arg) :
cmd = CheckExec(cfg)
+ if verbose:
+ print 'GetConfig: starting process "%s" "%s" (inpipe, outpipe)\n' %
(cmd, arg)
proc = subprocess.Popen([cmd,arg], stdin = subprocess.PIPE, stdout =
subprocess.PIPE, universal_newlines = True)
qOut, qErr = proc.communicate()
+ if verbose:
+ print 'GetConfig: process exited "%s" "%s" (%s)\n' % (cmd, arg,
proc.returncode)
return _configure(qOut.split('\n', 1)[0].strip())
### GetConfig(pkg, arg) #
@@ -215,8 +221,12 @@
def GetCONDITIONALS(CONDS, pkg) :
cfg = pkg+'-config'
cmd = CheckExec(cfg)
+ if verbose:
+ print 'GetCONDITIONALS: starting process "%s" "--conds" (inpipe,
outpipe)\n' % cmd
proc = subprocess.Popen([cmd,'--conds'], stdin = subprocess.PIPE, stdout =
subprocess.PIPE, universal_newlines = True)
qOut, qErr = proc.communicate()
+ if verbose:
+ print 'GetCONDITIONALS: process exited "%s" "--conds" (%s)\n' % (cmd,
proc.returncode)
r = re.compile('^(.*)=(.*)$')
for l in qOut.split('\n'):
m = r.match(l.strip())
@@ -1233,6 +1243,8 @@
rtrn = 0
TSTPREF = env['TSTPREF']
cmd = '%s --dbname=%s' % (env['exe']['Mserver'][1], TSTPREF)
+ if verbose:
+ print 'GetBitsAndOIDsAndModsAndStatic: starting process "%s" (inpipe,
outpipe, errpipe)\n' % cmd
proc = subprocess.Popen(cmd, shell = True, stdin = subprocess.PIPE, stdout
= subprocess.PIPE, stderr = subprocess.PIPE, universal_newlines = True)
t = Timer(float(par['TIMEOUT']), killProc, args = [proc, proc.stderr, cmd])
try:
@@ -1275,9 +1287,13 @@
##module("NoModule");
qOut, qErr = proc.communicate(input = input)
t.cancel()
+ if verbose:
+ print 'GetBitsAndOIDsAndModsAndStatic: process exited "%s" (%s)\n'
% (cmd, proc.returncode)
except KeyboardInterrupt:
t.cancel()
killProc(proc, proc.stderr, cmd)
+ if verbose:
+ print 'GetBitsAndOIDsAndModsAndStatic: process killed "%s"\n' % cmd
raise
env['TST_MODS'] = []
env['TST_BITS'] = ""
@@ -1372,6 +1388,8 @@
return missing
cmd = '%s --dbname=%s' % (env['exe']['Mserver'][1], TSTDB)
+ if verbose:
+ print 'CheckBATs: starting process "%s" (inpipe, outpipe, errpipe)\n'
% cmd
proc = subprocess.Popen(cmd, shell = True, stdin = subprocess.PIPE, stdout
= subprocess.PIPE, stderr = subprocess.PIPE, universal_newlines = True)
t = Timer(float(par['TIMEOUT']), killProc, args = [proc, proc.stderr, cmd])
try:
@@ -1392,9 +1410,13 @@
quit();
''')
t.cancel()
+ if verbose:
+ print 'CheckBATs: process exited "%s" (%s)\n' % (cmd,
proc.returncode)
except KeyboardInterrupt:
t.cancel()
killProc(proc, proc.stderr, cmd)
+ if verbose:
+ print 'CheckBATs: process killed "%s"\n' % cmd
raise
TST_BATS = []
if qOut:
@@ -1435,8 +1457,12 @@
### CheckTests(env, TST, oktests) #
def StartAt(cmd) :
+ if verbose:
+ print 'StartAt: starting process "%s" (inpipe, outpipe, errpipe)\n' %
cmd
proc = subprocess.Popen(cmd, shell = True, stdin = subprocess.PIPE, stdout
= subprocess.PIPE, stderr = subprocess.PIPE, universal_newlines = True)
qOut, qErr = proc.communicate()
+ if verbose:
+ print 'StartAt: starting exited "%s"\n' % cmd
return qOut.split('\n', 1)[0].strip()
### StartAt(cmd) #
@@ -1972,6 +1998,11 @@
cmd.append('-d')
if quiet:
cmd.append('-q')
+ if verbose:
+ print 'RunTest: starting process',
+ for a in cmd + ['-F^#', '-I%s' % par['IGNORE'], '-C%s' %
par['CONTEXT'], '-A%d' % ACCURACYout, '-r%s' % REVe, '%s%s.FILTERED' % (TST,
STABLEout), '%s.test.out.FILTERED' % TST, '%s.out.diff.html' % TST]:
+ print '"%s"' % a,
+ print '\n'
proc = subprocess.Popen(cmd + ['-F^#', '-I%s' % par['IGNORE'],
'-C%s' % par['CONTEXT'], '-A%d' % ACCURACYout, '-r%s' % REVe, '%s%s.FILTERED' %
(TST, STABLEout), '%s.test.out.FILTERED' % TST, '%s.out.diff.html' % TST])
proc.killed = False
t = Timer(float(par['TIMEOUT']), killProc, args = [proc])
@@ -1979,9 +2010,19 @@
t.start()
proc.wait()
t.cancel()
+ if verbose:
+ print 'RunTest: process exited',
+ for a in cmd + ['-F^#', '-I%s' % par['IGNORE'], '-C%s'
% par['CONTEXT'], '-A%d' % ACCURACYout, '-r%s' % REVe, '%s%s.FILTERED' % (TST,
STABLEout), '%s.test.out.FILTERED' % TST, '%s.out.diff.html' % TST]:
+ print '"%s"' % a,
+ print '(%s)\n' % proc.returncode
except KeyboardInterrupt:
t.cancel()
killProc(proc)
+ if verbose:
+ print 'RunTest: process killed',
+ for a in cmd + ['-F^#', '-I%s' % par['IGNORE'], '-C%s'
% par['CONTEXT'], '-A%d' % ACCURACYout, '-r%s' % REVe, '%s%s.FILTERED' % (TST,
STABLEout), '%s.test.out.FILTERED' % TST, '%s.out.diff.html' % TST]:
+ print '"%s"' % a,
+ print '\n'
raise
timedout = proc.killed
ACCURACYout = ACCURACYout - 1
@@ -2164,15 +2205,22 @@
### Prompt(cmd) #
def killProc(proc, outfile = None, cmd = None):
+ if outfile is not None and cmd is not None:
+ try:
+ outfile.write('\n!Mtimeout: Timeout: %s\n' % cmd)
+ except ValueError:
+ print 'cannot write timeout message',cmd
+ proc.killed = True
try:
os.kill(-proc.pid, signal.SIGKILL)
except AttributeError:
- subprocess.Popen(['taskkill','/F','/T','/PID',str(proc.pid)])
+ if verbose:
+ print 'killProc: starting process "taskkill" "/F" "/T" "/PID"
"%s"\n' % str(proc.pid)
+ subprocess.Popen(['taskkill','/F','/T','/PID',str(proc.pid)]).wait()
+ if verbose:
+ print 'killProc: process exited "taskkill" "/F" "/T" "/PID" "%s"
(%s)\n' % (str(proc.pid), proc.returncode)
except OSError:
pass
- if outfile is not None and cmd is not None:
- outfile.write('\n!Mtimeout: Timeout: %s\n' % cmd)
- proc.killed = True
def LaunchIt(cmd, TestInput, TestOut, TestErr, TimeOut, SrvrOut = None) :
if not SrvrOut:
@@ -2183,6 +2231,8 @@
TestErr.write(Prompt(cmd))
TestErr.flush()
+ if verbose:
+ print 'LaunchIt: starting process "%s" (inpipe)\n' % cmd
proc = subprocess.Popen(cmd, shell = True, stdin = subprocess.PIPE, stdout
= SrvrOut, stderr = TestErr, universal_newlines = True)
proc.killed = False
t = Timer(TimeOut, killProc, args = [proc, TestErr, cmd])
@@ -2217,6 +2267,8 @@
TestOut.flush()
TestErr.write(Prompt(cmd))
TestErr.flush()
+ if verbose:
+ print 'RunIt: starting process "%s"\n' % cmd
proc = subprocess.Popen(cmd, shell = True, stdin = TestIn, stdout =
TestOut, stderr = TestErr, universal_newlines = True)
proc.killed = False
t = Timer(TimeOut, killProc, args = [proc, TestErr, cmd])
@@ -2226,9 +2278,13 @@
# communicate will not return any useful data
proc.communicate(input = TestInput)
t.cancel()
+ if verbose:
+ print 'RunIt: process exited "%s" (%s)\n' % (cmd, proc.returncode)
except KeyboardInterrupt:
t.cancel()
killProc(proc, TestErr, cmd)
+ if verbose:
+ print 'RunIt: process killed "%s"\n' % cmd
raise
return proc.killed
### RunIt(cmd, TestIn, TestOut, TestErr) #
@@ -2512,6 +2568,8 @@
CollectIt(pSrvr.stdout, SrvrOut)
pSrvr.wait()
pSrvrTimer.cancel()
+ if verbose:
+ print 'DoIt: process exited "%s" (%s)\n' % (Srvr,
pSrvr.returncode)
pSrvrTimer = None
timedout = timedout or pSrvr.killed
if MkillUsersAT:
@@ -2612,15 +2670,21 @@
### DoIt(env, SERVER, CALL, TST, EXT, PRELUDE, TestOut, TestErr, STIMEOUT,
CTIMEOUT, TIMEOUT, MkillUsersAT, ME, MAPIsockets, XRPCsockets) #
def Check(command, input) :
+ if verbose:
+ print 'Check: starting process "%s" (inpipe,outpipe,errpipe)\n' %
command
proc = subprocess.Popen(command, shell = True, stdin = subprocess.PIPE,
stdout = subprocess.PIPE, stderr = subprocess.PIPE, universal_newlines = True)
t = Timer(float(par['TIMEOUT']), killProc, args = [proc])
try:
t.start()
qOut, qErr = proc.communicate(input = input)
t.cancel()
+ if verbose:
+ print 'Check: process exited "%s" (%s)\n' % (command,
proc.returncode)
except KeyboardInterrupt:
t.cancel()
killProc(proc)
+ if verbose:
+ print 'Check: process killed "%s"\n' % command
raise
qOut = qOut.split('\n')
qErr = qErr.split('\n')
@@ -2797,8 +2861,12 @@
SYST = "Windows"
RELEASE = "5.0"
r = re.compile('^Microsoft Windows (.*)\[Version
([0-9]+\.[0-9]+)([^\[0-9].*)\]$')
+ if verbose:
+ print 'starting process "cmd" "/c" "ver" (inpipe,outpipe)\n'
proc = subprocess.Popen('cmd /c ver', stdin = subprocess.PIPE, stdout =
subprocess.PIPE, universal_newlines = True)
qOut, qErr = proc.communicate()
+ if verbose:
+ print 'process exited "cmd" "/c" "ver" (%s)\n' % proc.returncode
for l in qOut.split('\n'):
m = r.match(l.strip())
if m and m.group(2):
@@ -2955,8 +3023,12 @@
repo = fnd.group(1).strip()
else:
try:
+ if verbose:
+ print 'starting process "hg" "root" (inpipe,outpipe)\n'
proc = subprocess.Popen(['hg','root'], stdin = subprocess.PIPE, stdout
= subprocess.PIPE, universal_newlines = True)
out,err = proc.communicate()
+ if verbose:
+ print 'process exited "hg" "root" (%s)\n' % proc.returncode
if out:
hgr =
os.path.normcase(os.path.normpath(os.path.realpath(out.strip())))
cwd =
os.path.normcase(os.path.normpath(os.path.realpath(os.getcwd())))
@@ -2984,6 +3056,7 @@
dft = {}
def main(argv) :
+ global verbose
#TODO:
#signal.signal(signal.SIGALRM, AlarmHandler)
@@ -3041,6 +3114,7 @@
'default: `<package>-config --prefix` = "%s"' %
GetMonetConfig(par['PACKAGE'],'--prefix')),
('quiet', 'q', 'quiet', None,
"suppress messages on stdout"),
+ ('verbose', None, 'verbose', None, 'be verbose'),
]
if THISFILE == "Mtest.py":
@@ -3178,6 +3252,7 @@
ErrXit('"-G/--algebra" conflicts with "-g/--no-algebra"!')
par['RECURSIVE'] = opts.get('recursive', 0)
par['QUIET'] = opts.get('quiet', 0)
+ verbose = opts.get('verbose', 0)
if THISFILE == "Mtest.py":
_IGNORE = dftIGNORE
par['IGNORE'] = opts.get('ignore', _IGNORE)
@@ -3716,8 +3791,12 @@
CONDITIONALS['NOT_ALGEBRA'] = '#'
rA = re.compile('-A.* \(default\)')
rM = re.compile('-M.* \(default\)')
+ if verbose:
+ print 'main: starting process "pf" "-h" (inpipe,outpipe)\n'
proc = subprocess.Popen(['pf','-h'], stdin = subprocess.PIPE,
stdout = subprocess.PIPE, universal_newlines = True)
qOut, qErr = proc.communicate()
+ if verbose:
+ print 'main: process exited "pf" "-h" (%s)\n' %
proc.returncode
if rA.search(qOut) is not None:
CONDITIONALS['WITH_ALGEBRA'] = '#'
CONDITIONALS['NOT_ALGEBRA'] = ''
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list