Changeset: 8480a3074de5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8480a3074de5
Modified Files:
        testing/Mtest.py.in
Branch: Apr2012
Log Message:

Mtest: some fixes for --no-clean case.


diffs (42 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -1127,11 +1127,11 @@ def PerformDir(env, testdir, testlist, B
                     #TODO:
                     # add "something" to HTML output
                     return td, elem, max(FdOut, FdErr)
-            if os.path.isabs(LogDBdir):
+            if os.path.isabs(LogDBdir) and not os.path.exists(LogDBdir):
                 try:
                     os.makedirs(LogDBdir)
                 except:
-                    Warn("creating database '%s` failed; skipping tests in 
'%s`!" % (TSTDB, TSTSRCD))
+                    Warn("creating database '%s` failed; skipping tests in 
'%s`!" % (TSTDB, TSTSRCDIR))
                     #TODO:
                     # add "something" to HTML output
                     return td, elem, max(FdOut, FdErr)
@@ -1537,6 +1537,9 @@ def CheckTests(env, TST, oktests):
     if not os.path.isfile(TST + '.reqtests'):
         # no required tests, so none missing
         return missing
+    if env.get('NOCLEAN'):
+        # we didn't clean up from a previous run, assume tests were done
+        return missing
 
     for test in open(TST + '.reqtests'):
         test = test.strip()
@@ -1769,8 +1772,12 @@ def RunTest(env, TST, BusyPorts, COND, o
                     SymlinkOrCopy(os.path.join(RELSRCDIR, f), f)
                     links.append(os.path.join(TSTTRGDIR, f))
                 except IOError, (IOerrNo, IOerrStr):
-                    ErrMsg("SymlinkOrCopy('%s','%s') in '%s' failed with #%d: 
'%s'."
-                           % (os.path.join(RELSRCDIR, f), f, os.getcwd(), 
IOerrNo, IOerrStr))
+                    if not env.get('NOCLEAN'):
+                        ErrMsg("SymlinkOrCopy('%s','%s') in '%s' failed with 
#%d: '%s'."
+                               % (os.path.join(RELSRCDIR, f), f, os.getcwd(), 
IOerrNo, IOerrStr))
+                except OSError:
+                    if not env.get('NOCLEAN'):
+                        raise
 
         # Check for available sockets and block them until we're ready to run 
the actual test
         MAPIsockets, reason = CheckSocket2(env, "MAPI")   #, SrvrErr)
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to