Update of /cvsroot/monetdb/sql/src/test/BugDay_2005-10-06_2.8/Tests
In directory
sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26531/src/test/BugDay_2005-10-06_2.8/Tests
Modified Files:
MapiClient-dump.SF-905851.SQL.py
Log Message:
propagated changes of Wednesday Oct 24 2007 - Thursday Oct 25 2007
from the SQL_2-20 branch to the development trunk
Index: MapiClient-dump.SF-905851.SQL.py
===================================================================
RCS file:
/cvsroot/monetdb/sql/src/test/BugDay_2005-10-06_2.8/Tests/MapiClient-dump.SF-905851.SQL.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- MapiClient-dump.SF-905851.SQL.py 22 Oct 2007 12:25:01 -0000 1.4
+++ MapiClient-dump.SF-905851.SQL.py 25 Oct 2007 19:32:04 -0000 1.5
@@ -6,21 +6,24 @@
import MonetDB.subprocess26 as subprocess
-def client(cmd):
- clt = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
- sys.stdout.write(clt.stdout.read())
- clt.stdout.close()
- sys.stderr.write(clt.stderr.read())
- clt.stderr.close()
-
+def client(cmd, infile = None):
+ if infile is not None:
+ f = open(infile)
+ else:
+ f = None
+ clt = subprocess.Popen(cmd, shell=True, stdin = f)
+ if f is not None:
+ f.close()
+ clt.wait()
def main():
- clcmd = ("%s/bin/Mlog -x " % os.getenv('MONETDB_PREFIX')) +
str(os.getenv('SQL_CLIENT')) + "< %s" % ('%s/JdbcClient_create_tables.sql' %
os.getenv('RELSRCDIR'))
- clcmd1 = ("%s/bin/Mlog -x " % os.getenv('MONETDB_PREFIX')) +
str(os.getenv('SQL_CLIENT')) + "< %s" % ('%s/JdbcClient_inserts_selects.sql' %
os.getenv('RELSRCDIR'))
- clcmd2 = ("%s/bin/Mlog -x " % os.getenv('MONETDB_PREFIX')) +
str(os.getenv('SQL_DUMP'))
- client(clcmd)
- client(clcmd1)
- client(clcmd2)
+ client('Mlog -x %s' % os.getenv('SQL_CLIENT'),
+ os.path.join(os.getenv('RELSRCDIR'),
+ 'JdbcClient_create_tables.sql'))
+ client('Mlog -x %s' % os.getenv('SQL_CLIENT'),
+ os.path.join(os.getenv('RELSRCDIR'),
+ 'JdbcClient_inserts_selects.sql'))
+ client('Mlog -x %s' % os.getenv('SQL_DUMP'))
main()
-------------------------------------------------------------------------
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-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins