Update of /cvsroot/monetdb/pathfinder/tests/BugTracker/Tests
In directory 
23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv20096/tests/BugTracker/Tests

Modified Files:
      Tag: M5XQ
        update-with-timing.SF-2852928.XQUERY.py 
Log Message:
propagated changes of Friday Oct 16 2009
from the development trunk to the M5XQ branch

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/10/16 - sjoerd:
          tests/BugTracker/Tests/update-with-timing.SF-2852928.XQUERY.py,1.4
  propagated changes of Thursday Oct 15 2009 - Friday Oct 16 2009
  from the Nov2009 branch to the development trunk
  
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    2009/10/15 - sjoerd:
            
tests/BugTracker/Tests/update-with-timing.SF-2852928.XQUERY.py,1.2.4.2
    New module MonetDBtesting.process to make it easier to write tests in 
Python.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index: update-with-timing.SF-2852928.XQUERY.py
===================================================================
RCS file: 
/cvsroot/monetdb/pathfinder/tests/BugTracker/Tests/update-with-timing.SF-2852928.XQUERY.py,v
retrieving revision 1.2.2.3
retrieving revision 1.2.2.4
diff -u -d -r1.2.2.3 -r1.2.2.4
--- update-with-timing.SF-2852928.XQUERY.py     13 Oct 2009 14:52:45 -0000      
1.2.2.3
+++ update-with-timing.SF-2852928.XQUERY.py     16 Oct 2009 08:52:37 -0000      
1.2.2.4
@@ -1,12 +1,11 @@
 import os, sys
-import subprocess
+from MonetDBtesting import process
 
-def client(cmd, input = None):
-    clt = subprocess.Popen(cmd,
-                           stdin = subprocess.PIPE,
-                           stdout = subprocess.PIPE,
-                           stderr = subprocess.PIPE,
-                           universal_newlines = True)
+def client(lang, args, input = None):
+    clt = process.client(lang, args,
+                         stdin = process.PIPE,
+                         stdout = process.PIPE,
+                         stderr = process.PIPE)
     out, err = clt.communicate(input)
     sys.stdout.write(out)
     sys.stderr.write(err)
@@ -22,14 +21,17 @@
 '''
 
 def main():
-    xq_client = os.getenv('XQUERY_CLIENT').split()
     # HACK ALERT: create updatable document by appending ,10 to collection name
-    client(xq_client + ['--input=hello-SF.2852928.xml', 
'--collection=hello-SF.2852928.xml,10'],
+    client('xquery',
+           ['--input=hello-SF.2852928.xml',
+            '--collection=hello-SF.2852928.xml,10'],
            hellodoc)
     sys.stdout.write('#~BeginVariableOutput~#\n')
-    client(xq_client + ['-t', '-s', 'do insert <a/> into 
doc("hello-SF.2852928.xml")/hello'])
+    client('xquery',
+           ['-t',
+            '-s', 'do insert <a/> into doc("hello-SF.2852928.xml")/hello'])
     sys.stdout.write('#~EndVariableOutput~#\n')
-    client(xq_client + ['-s', 'doc("hello-SF.2852928.xml")'])
-    client(xq_client + ['-s', 'pf:del-doc("hello-SF.2852928.xml")'])
+    client('xquery', ['-s', 'doc("hello-SF.2852928.xml")'])
+    client('xquery', ['-s', 'pf:del-doc("hello-SF.2852928.xml")'])
 
 main()


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to