Changeset: ceddcb76df6e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ceddcb76df6e
Modified Files:
sql/src/test/BugTracker/Tests/local_temp_table.SF-1865953.SQL.bat
sql/src/test/BugTracker/Tests/local_temp_table.SF-1865953.SQL.py
sql/src/test/BugTracker/Tests/local_temp_table.SF-1865953.SQL.sh
Branch: Jun2010
Log Message:
Use single Python script instead of separate shell and cmd scripts.
Using the Python method also has the advantage that it takes care of the
.monetdb file.
diffs (61 lines):
diff -r 3985d638ef8e -r ceddcb76df6e
sql/src/test/BugTracker/Tests/local_temp_table.SF-1865953.SQL.bat
--- a/sql/src/test/BugTracker/Tests/local_temp_table.SF-1865953.SQL.bat Wed Jul
07 18:57:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-...@echo off
-
-echo user=monetdb> .monetdb
-echo password=monetdb>> .monetdb
-
-set LANG=en_US.UTF-8
-
-prompt # $t $g
-echo on
-
-call mclient -lsql -h %HOST% -p %MAPIPORT%
%RELSRCDIR%\local_temp_table_data.SF-1865953.sql
-call mclient -lsql -h %HOST% -p %MAPIPORT%
-
-...@del .monetdb
diff -r 3985d638ef8e -r ceddcb76df6e
sql/src/test/BugTracker/Tests/local_temp_table.SF-1865953.SQL.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sql/src/test/BugTracker/Tests/local_temp_table.SF-1865953.SQL.py Wed Jul
07 21:10:42 2010 +0200
@@ -0,0 +1,21 @@
+import os, sys, time
+from MonetDBtesting import process
+
+RELSRCDIR = os.environ['RELSRCDIR']
+TSTDB = os.environ['TSTDB']
+
+def client(args):
+ t = time.strftime('# %H:%M:%S >',time.localtime(time.time()))
+ Mlog = "\n%s\n%s mclient %s\n%s\n\n" % (t, t, ' '.join(args), t)
+ sys.stdout.write(Mlog)
+ sys.stdout.flush()
+ sys.stderr.write(Mlog)
+ sys.stderr.flush()
+ clt = process.client('sql', args = args)
+ clt.communicate()
+
+os.environ['LANG'] = 'en_US.UTF-8'
+
+client(['-d', TSTDB,
+ os.path.join(RELSRCDIR, 'local_temp_table_data.SF-1865953.sql')])
+client(['-d', TSTDB])
diff -r 3985d638ef8e -r ceddcb76df6e
sql/src/test/BugTracker/Tests/local_temp_table.SF-1865953.SQL.sh
--- a/sql/src/test/BugTracker/Tests/local_temp_table.SF-1865953.SQL.sh Wed Jul
07 18:57:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-#!/bin/bash
-
-cat << EOF > .monetdb
-user=monetdb
-password=monetdb
-EOF
-
-LANG="en_US.UTF-8"
-export LANG
-
-Mlog -x "$MTIMEOUT mclient -lsql -h $HOST -p $MAPIPORT -d ${TSTDB}
\"$RELSRCDIR/local_temp_table_data.SF-1865953.sql\""
-Mlog -x "$MTIMEOUT mclient -lsql -h $HOST -p $MAPIPORT -d ${TSTDB}"
-
-rm -f .monetdb
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list