Update of /cvsroot/monetdb/MonetDB/src/testing
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv27922/MonetDB/src/testing
Modified Files:
Mtest.py.in README
Log Message:
- To prepare for (arbitrary-)executable tests that expect a MAL server to be
started by Mtest.py,
we rename the (arbitrary-)executable tests that expect a MIL server to be
started by Mtest.py
from
<tst>.MAPI(|.(bat|cmd|exe|com|py))
to
<tst>.MIL(|.(bat|cmd|exe|com|py))
- To avoid naming-conflicts between (arbitrary-)executable (Unix-) tests
<tst>.(MIL|MAL|SQL)
and "normal" MIL/MAL/SQL tests
<tst>.(mil|mal|sql)
on case-insensitive file systems,
we now require an explicite ".sh" extension for the former, i.e.,
<tst>.(MIL|MAL|SQL|XQUERY).sh
which also better aligns them with there Windows pendants
<tst>.(MIL|MAL|SQL|XQUERY).bat
To limit the required renaming-orgie, we still allow
(arbitrary) executable tests that do not require any server
to be named only by there name (on Unix), and keep the ".sh"
extension optional in these cases:
Windows: <tst>.(bat|cmd|exe|com)
Unix: <tst>[.sh]
Index: README
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/testing/README,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- README 22 Aug 2007 06:21:57 -0000 1.36
+++ README 29 Aug 2007 20:15:45 -0000 1.37
@@ -31,7 +31,7 @@
- Each test named TST consists of
+ a test script which is ONE of the following:
- * an arbitrary executable (e.g., a shell script) (TST)
(~,^)
+ * an arbitrary executable (e.g., a shell script) (TST.sh)
(~,^)
on Windows, executables must be ".(exe|com)" (TST.(exe|com))
(~,^)
and scripts must be ".(bat|cmd)" (TST.(bat|cmd))
(~,^)
* a Python script (TST.py)
(~,^)
@@ -43,14 +43,14 @@
* a SQL script to be executed by mclient -lsql (TST.sql) (",^,`)
* a XQUERY script to be executed by mclient -lxquery (TST.xq) (",^,`)
(~) In case the name of an arbitrary executable or Python script is
- suffixed with ".MAPI" (i.e., TST.MAPI[.(exe|com|bat|cmd|py)]),
- Mtest.py starts an Mserver with a MAPI-listerner on MAPIPORT
+ suffixed with ".MIL" (i.e., TST.MIL[.(sh|exe|com|bat|cmd|py)]),
+ Mtest.py starts an Mserver with a MIL-listerner on MAPIPORT
in the background before executing the test. The test can then
connect via MAPI (on MAPIPORT) to that Mserver.
Similar, with suffix ".SQL", an Mserver with an SQL-listener on
- SQLPORT is started;
+ MAPIPORT is started;
and, with suffix ".XQUERY", an Mserver with an XQUERY-listener on
- XQUERYPORT is started.
+ MAPIPORT is started.
In both cases, Mtest.py stops the Mserver again, once the test has
finished.
(') For Mserver, if several files are present named
Index: Mtest.py.in
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/testing/Mtest.py.in,v
retrieving revision 1.294
retrieving revision 1.295
diff -u -d -r1.294 -r1.295
--- Mtest.py.in 27 Aug 2007 17:40:51 -0000 1.294
+++ Mtest.py.in 29 Aug 2007 20:15:45 -0000 1.295
@@ -1133,28 +1133,27 @@
return sem
### ApproveOutput (env, TST) #
-def isexecutable(TST) :
+def isexecutable(TST, ext = '.sh') :
if os.name == "nt":
for ext in ".exe", ".com", ".bat", ".cmd":
if TST.lower().endswith(ext):
- tst = TST
ext = ''
else:
- tst = TST + ext
- if os.path.isfile(tst) or os.path.isfile(tst+".src"):
+ TST = TST + ext
+ if os.path.isfile(TST) or os.path.isfile(TST+".src"):
return [ 1, ext ]
elif os.name == "posix":
#TODO:
# check with "file", and set executable
- if os.path.isfile(TST) and os.access(TST,os.X_OK):
- return [ 1, "" ]
- if os.path.isfile(TST+".src") and os.access(TST+".src",os.X_OK):
- return [ 1, "" ]
+ TST = TST + ext
+ if ( os.path.isfile(TST ) and os.access(TST ,os.X_OK) ) or
\
+ ( os.path.isfile(TST+".src") and os.access(TST+".src",os.X_OK) ):
+ return [ 1, ext ]
#TODO:
#else:
# ???
return [ 0, "" ]
-### isexecutable(TST) #
+### isexecutable(TST, ext = '.sh') #
# this function is a slightly modified copy of the posixpath version
# the difference is the doubling of \'s in the replacement value
@@ -1282,7 +1281,7 @@
m = m.strip()
if m and m[0] != "#" and m not in env['TST_MODS']:
missing.append(m)
- if SERVER == "MAPI":
+ if SERVER == "MIL":
for m in "streams", "mapi":
if m not in env['TST_MODS']:
missing.append(m)
@@ -1416,23 +1415,25 @@
TX = 0
EXT = CALL = SERVER = ""
x = isexecutable(TST)
+ if not x[0]:
+ x = isexecutable(TST,'')
+ xI = isexecutable(TST+".MIL")
xS = isexecutable(TST+".SQL")
- xM = isexecutable(TST+".MAPI")
xQ = isexecutable(TST+".XQUERY")
if x[0]:
EXT = x[1] ; CALL = "other"
+ elif xI[0]:
+ EXT = ".MIL"+xI[1] ; CALL = "other" ; SERVER = "MIL"
elif xS[0]:
EXT = ".SQL"+xS[1] ; CALL = "other" ; SERVER = "SQL"
- elif xM[0]:
- EXT = ".MAPI"+xM[1] ; CALL = "other" ; SERVER = "MAPI"
elif xQ[0]:
EXT = ".XQUERY"+xQ[1] ; CALL = "other" ; SERVER = "XQUERY"
elif os.path.isfile(TST+".py") or
os.path.isfile(TST+".py.src"):
EXT = ".py" ; CALL = "python"
+ elif os.path.isfile(TST+".MIL"+".py") or
os.path.isfile(TST+".MIL"+".py.src") or
os.path.isfile(TST+".MIL"+".py.in"):
+ EXT = ".MIL.py" ; CALL = "python" ; SERVER = "MIL"
elif os.path.isfile(TST+".SQL"+".py") or
os.path.isfile(TST+".SQL"+".py.src") or
os.path.isfile(TST+".SQL"+".py.in"):
EXT = ".SQL.py" ; CALL = "python" ; SERVER = "SQL"
- elif os.path.isfile(TST+".MAPI"+".py") or
os.path.isfile(TST+".MAPI"+".py.src") or
os.path.isfile(TST+".MAPI"+".py.in"):
- EXT = ".MAPI.py" ; CALL = "python" ; SERVER = "MAPI"
elif os.path.isfile(TST+".XQUERY"+".py") or
os.path.isfile(TST+".XQUERY"+".py.src") or
os.path.isfile(TST+".XQUERY"+".py.in"):
EXT = ".XQUERY.py" ; CALL = "python" ; SERVER = "XQUERY"
elif os.path.isfile(TST+".mal") or
os.path.isfile(TST+".mal.src") or os.path.isfile(TST+".mal.in"):
@@ -1442,15 +1443,15 @@
elif os.path.isfile(TST+".milS") or
os.path.isfile(TST+".milS.src") or os.path.isfile(TST+".milS.in"):
EXT = ".milS" ; CALL = "milS"
elif os.path.isfile(TST+".milC") or
os.path.isfile(TST+".milC.src") or os.path.isfile(TST+".milC.in"):
- EXT = ".milC" ; CALL = "milC" ; SERVER = "MAPI"
+ EXT = ".milC" ; CALL = "milC" ; SERVER = "MIL"
elif os.path.isfile(TST+"_s00.milM") or
os.path.isfile(TST+"_s00.milM.src") or os.path.isfile(TST+"_s00.milM.in"):
EXT = ".milM" ; CALL = "milMXs"
elif os.path.isfile(TST+"_s00.milS") or
os.path.isfile(TST+"_s00.milS.src") or os.path.isfile(TST+"_s00.milS.in"):
EXT = ".milS" ; CALL = "milSXs"
elif os.path.isfile(TST+"_s00.milC") or
os.path.isfile(TST+"_s00.milC.src") or os.path.isfile(TST+"_s00.milC.in"):
- EXT = ".milC" ; CALL = "milCXs" ; SERVER = "MAPI"
+ EXT = ".milC" ; CALL = "milCXs" ; SERVER = "MIL"
elif os.path.isfile(TST+"_p00.milC") or
os.path.isfile(TST+"_p00.milC.src") or os.path.isfile(TST+"_p00.milC.in"):
- EXT = ".milC" ; CALL = "milCXp" ; SERVER = "MAPI"
+ EXT = ".milC" ; CALL = "milCXp" ; SERVER = "MIL"
elif os.path.isfile(TST+".sql") or
os.path.isfile(TST+".sql.src") or os.path.isfile(TST+".sql.in"):
EXT = ".sql" ; CALL = "sql" ; SERVER = "SQL"
elif os.path.isfile(TST+"_s00.sql") or
os.path.isfile(TST+"_s00.sql.src") or os.path.isfile(TST+"_s00.sql.in"):
@@ -1464,9 +1465,9 @@
elif os.path.isfile(TST+"_p00.xq") or
os.path.isfile(TST+"_p00.xq.src") or os.path.isfile(TST+"_p00.xq.in"):
EXT = ".xq" ; CALL = "xqXp" ; SERVER = "XQUERY"
elif os.path.isfile(TST+".x100") or
os.path.isfile(TST+".x100.src") or os.path.isfile(TST+".x100.in"):
- EXT = ".x100" ; CALL = "x100" ; SERVER = "MAPI"
+ EXT = ".x100" ; CALL = "x100" ; SERVER = "MIL"
elif os.path.isfile(TST+"_s00.x100") or
os.path.isfile(TST+"_s00.x100.src") or os.path.isfile(TST+"_s00.x100.in"):
- EXT = ".x100" ; CALL = "x100Xs" ; SERVER = "MAPI"
+ EXT = ".x100" ; CALL = "x100Xs" ; SERVER = "MIL"
#TODO:
#elif [ -f "$TST.java" ] ; then EXT="java" ; CALL="Java
"+TST+" "+EXT
#elif [ -f "${TST}_s00.java" ] ; then EXT="java" ; CALL="JavaXs
"+TST+" "+EXT
@@ -1513,7 +1514,7 @@
elem = SkipTest(env, TST, EXT, "as it currently crashes/hangs on
WindowsNT.")
elif sys.platform == "cygwin" and url(TSTDIR)+"/"+TST in NotOnCYG:
elem = SkipTest(env, TST, EXT, "as it currently crashes/hangs on
CYGWIN.")
- elif ( EXT[:4] == ".mil" or SERVER == "MAPI" ) and par['M5']:
+ elif ( EXT[:4] == ".mil" or SERVER == "MIL" ) and par['M5']:
elem = SkipTest(env, TST, EXT, "as Monet5 does not support MIL.")
elif EXT == ".milC" and not env['exe']['Mapi_Client'][0]:
elem = SkipTest(env, TST, EXT, "as "+env['MAPICLIENT'].split(None,
1)[0]+" is not available.")
@@ -1543,7 +1544,7 @@
elem = SkipTest(env, TST, EXT, "as multiple SQL clients in parallel
are currently not supported by "+THISFILE+".")
elif CALL == "xqXp":
elem = SkipTest(env, TST, EXT, "as multiple XQuery clients in parallel
are currently not supported by "+THISFILE+".")
- elif SERVER in ["MAPI", "SQL", "XQUERY"] and "MAPI" in BusyPorts:
+ elif SERVER in ["MIL", "SQL", "XQUERY"] and "MAPI" in BusyPorts:
elem = SkipTest(env, TST, EXT, "as MAPIPORT=%s is not available." %
(env['MAPIPORT']))
elif SERVER == "XQUERY" and "XRPC" in BusyPorts:
elem = SkipTest(env, TST, EXT, "as XRPCPORT=%s is not available." %
(env['XRPCPORT']))
@@ -1662,7 +1663,7 @@
if CTIMEOUT < TIMEOUT:
CTIMEOUT = TIMEOUT
STIMEOUT = CTIMEOUT
- if SERVER in ["MAPI", "SQL", "XQUERY"] and TIMEOUT > 0:
+ if SERVER in ["MIL", "SQL", "XQUERY"] and TIMEOUT > 0:
STIMEOUT = STIMEOUT + TIMEOUT + 60
ME = ""
@@ -2126,7 +2127,7 @@
XRPCsockets[1].close()
ServerReady = True
- if SERVER in ["MAPI", "SQL", "XQUERY"]:
+ if SERVER in ["MIL", "SQL", "XQUERY"]:
SrvrOutFile = TST+".server.out"
SrvrErrFile = TST+".server.err"
SrvrOut = open(SrvrOutFile,"w")
@@ -2154,7 +2155,7 @@
lang="mil"
- if SERVER == "MAPI":
+ if SERVER == "MIL":
Srvr = '%s --dbinit="%s module(mapi); mil_start();"' % (Srvr,
DBINIT)
if SERVER == "SQL":
lang="sql"
@@ -2294,7 +2295,7 @@
ClntOut.close()
ClntErr.close()
- if SERVER in ["MAPI", "SQL", "XQUERY"]:
+ if SERVER in ["MIL", "SQL", "XQUERY"]:
EPILOGUE = None
if os.path.isfile(TST+".epilogue") and par['M4']:
EPILOGUE = open(TST+".epilogue",'r')
@@ -2417,7 +2418,7 @@
def CheckExec(cmd) :
for p in os.environ['PATH'].split(os.pathsep):
- x = isexecutable(os.path.join(p,cmd))
+ x = isexecutable(os.path.join(p,cmd),'')
if x[0]:
return os.path.join(p, cmd + x[1])
return ""
@@ -3039,7 +3040,7 @@
# print v+" = "+str(env[v])
#STDOUT.flush()
- # find mil script for MAPI and SQL server
+ # find mil script for MIL and SQL server
if THISFILE in ["Mtest.py", "Mprofile.py"]:
env['SQL_SERVER'] = "sql_server"
env['SQL_TRACE'] = ""
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins