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

Use Python trick to call os.path.join with dynamically determined parameters.
This trick makes that we don't get double directory separators in the
resulting path.


diffs (12 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -1104,7 +1104,7 @@ def PerformDir(env, testdir, testlist, B
     if TSTDIR == os.curdir:
         env['RELSRCDIR'] = os.path.join(os.pardir, env['RELSRCBASE'], TSTSUFF)
     else:
-        env['RELSRCDIR'] = os.path.join(((os.pardir + os.sep) * 
(len(TSTDIR.split(os.sep)) + 1)), env['RELSRCBASE'], TSTDIR, TSTSUFF)
+        env['RELSRCDIR'] = os.path.join(* [os.pardir] * 
(len(TSTDIR.split(os.sep)) + 1) + [env['RELSRCBASE'], TSTDIR, TSTSUFF])
     os.environ['TSTDB']     = TSTDB
     os.environ['TSTDIR']    = TSTDIR
     os.environ['TSTSRCDIR'] = TSTSRCDIR
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to