Changeset: c366f15c5921 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c366f15c5921
Modified Files:
        
Branch: default
Log Message:

Merge with Oct2010 branch.


diffs (156 lines):

diff -r a8cfb61a0d46 -r c366f15c5921 
MonetDB4/tests/Availability/Tests/00_Mserver.stable.out
--- a/MonetDB4/tests/Availability/Tests/00_Mserver.stable.out   Fri Oct 01 
18:09:54 2010 +0200
+++ b/MonetDB4/tests/Availability/Tests/00_Mserver.stable.out   Sat Oct 02 
12:31:05 2010 +0200
@@ -81,7 +81,7 @@
 [ "MODULES",             "str",  "str",  48,     0,      "clean",        
"load", "pers", 0,      2               ]
 [ "adm_atomtbl",         "str",  "int",  15,     0,      "dirty",        
"load", "tran", 1,      1               ]
 [ "adm_fcntbl",                  "str",  "oid",  1036,   0,      "dirty",      
  "load", "tran", 1,      1               ]
-[ "monet_environment",   "str",  "str",  42,     0,      "dirty",        
"load", "tran", 1,      1               ]
+[ "monet_environment",   "str",  "str",  43,     0,      "dirty",        
"load", "tran", 1,      1               ]
 [ "monet_fcn_aut",       "oid",  "str",  965,    0,      "dirty",        
"load", "tran", 1,      2               ]
 [ "monet_fcn_cnt",       "oid",  "int",  1036,   0,      "dirty",        
"load", "tran", 1,      2               ]
 [ "monet_fcn_dat",       "oid",  "str",  965,    0,      "dirty",        
"load", "tran", 1,      2               ]
diff -r a8cfb61a0d46 -r c366f15c5921 
MonetDB4/tests/Availability/Tests/00_Mserver.stable.out.STATIC
--- a/MonetDB4/tests/Availability/Tests/00_Mserver.stable.out.STATIC    Fri Oct 
01 18:09:54 2010 +0200
+++ b/MonetDB4/tests/Availability/Tests/00_Mserver.stable.out.STATIC    Sat Oct 
02 12:31:05 2010 +0200
@@ -75,7 +75,7 @@
 [ "MODULES",             "str",  "str",  46,     0,      "clean",        
"load", "pers", 0,      2               ]
 [ "adm_atomtbl",         "str",  "int",  15,     0,      "dirty",        
"load", "tran", 1,      1               ]
 [ "adm_fcntbl",                  "str",  "oid",  1036,   0,      "dirty",      
  "load", "tran", 1,      1               ]
-[ "monet_environment",   "str",  "str",  42,     0,      "dirty",        
"load", "tran", 1,      1               ]
+[ "monet_environment",   "str",  "str",  43,     0,      "dirty",        
"load", "tran", 1,      1               ]
 [ "monet_fcn_aut",       "oid",  "str",  965,    0,      "dirty",        
"load", "tran", 1,      2               ]
 [ "monet_fcn_cnt",       "oid",  "int",  1036,   0,      "dirty",        
"load", "tran", 1,      2               ]
 [ "monet_fcn_dat",       "oid",  "str",  965,    0,      "dirty",        
"load", "tran", 1,      2               ]
diff -r a8cfb61a0d46 -r c366f15c5921 
MonetDB4/tests/Availability/Tests/00_Mserver.stable.out.Windows
--- a/MonetDB4/tests/Availability/Tests/00_Mserver.stable.out.Windows   Fri Oct 
01 18:09:54 2010 +0200
+++ b/MonetDB4/tests/Availability/Tests/00_Mserver.stable.out.Windows   Sat Oct 
02 12:31:05 2010 +0200
@@ -76,7 +76,7 @@
 [ "MODULES",             "str",  "str",  47,     0,      "clean",        
"load", "pers", 0,      2               ]
 [ "adm_atomtbl",         "str",  "int",  15,     0,      "dirty",        
"load", "tran", 1,      1               ]
 [ "adm_fcntbl",                  "str",  "oid",  1036,   0,      "dirty",      
  "load", "tran", 1,      1               ]
-[ "monet_environment",   "str",  "str",  42,     0,      "dirty",        
"load", "tran", 1,      1               ]
+[ "monet_environment",   "str",  "str",  43,     0,      "dirty",        
"load", "tran", 1,      1               ]
 [ "monet_fcn_aut",       "oid",  "str",  965,    0,      "dirty",        
"load", "tran", 1,      2               ]
 [ "monet_fcn_cnt",       "oid",  "int",  1036,   0,      "dirty",        
"load", "tran", 1,      2               ]
 [ "monet_fcn_dat",       "oid",  "str",  965,    0,      "dirty",        
"load", "tran", 1,      2               ]
diff -r a8cfb61a0d46 -r c366f15c5921 
MonetDB4/tests/suite_08/Tests/test_01.stable.out
--- a/MonetDB4/tests/suite_08/Tests/test_01.stable.out  Fri Oct 01 18:09:54 
2010 +0200
+++ b/MonetDB4/tests/suite_08/Tests/test_01.stable.out  Sat Oct 02 12:31:05 
2010 +0200
@@ -284,6 +284,7 @@
 [ "xrpc_trusted",        
"http://monetdb.cwi.nl;http://127.0.0.1;http://localhost;/ufs/manegold/_/scratch0/Monet/Testing/Stable/prefix.--enable-strict_--disable-debug_--enable-optimize_--enable-assert/share/MonetDB/xrpc/export";
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                      ]
 [ "monet_cwd",           
"/net/rig.ins.cwi.nl/export/scratch0/manegold/Monet/Testing/Stable/build.--enable-strict_--disable-debug_--enable-optimize_--enable-assert/MonetDB4/mTests/tests/suite_08"
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                      ]
 [ "monet_version",       "4.28.0"                                              
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
          ]
+[ "gdk_testing",         "true"          ]
 #~EndVariableOutput~#
 
 # Pseudo bat to map thread to name
diff -r a8cfb61a0d46 -r c366f15c5921 testing/src/process.py
--- a/testing/src/process.py    Fri Oct 01 18:09:54 2010 +0200
+++ b/testing/src/process.py    Sat Oct 02 12:31:05 2010 +0200
@@ -60,7 +60,7 @@
 atexit.register(_delfiles)
 
 class _BufferedPipe:
-    def __init__(self, fd, waitfor = None):
+    def __init__(self, fd, waitfor = None, skip = None):
         self._pipe = fd
         self._queue = Queue.Queue()
         self._eof = False
@@ -69,36 +69,67 @@
         else:
             self._wfq = None
         self._thread = threading.Thread(target = self._readerthread,
-                                        args = (fd, self._queue, waitfor, 
self._wfq))
+                                        args = (fd, self._queue, waitfor, 
self._wfq, skip))
         self._thread.setDaemon(True)
         self._thread.start()
 
-    def _readerthread(self, fh, queue, waitfor, wfq):
-        i = 0
+    def _readerthread(self, fh, queue, waitfor, wfq, skip):
+        # If `skip' has a value, don't pass it through the first time
+        # we encounter it.
+        # If `waitfor' has a value, put something into the wfq queue
+        # when we've seen it.
+        s = 0
+        w = 0
+        skipqueue = []
         while True:
-            c = fh.read(1)
-            if waitfor is not None and c:
-                if c == waitfor[i]:
-                    i += 1
-                    if i == len(waitfor):
+            if skipqueue:
+                c = skipqueue[0]
+                del skipqueue[0]
+            else:
+                c = fh.read(1)
+                if skip and c:
+                    if c == skip[s]:
+                        s += 1
+                        if s == len(skip):
+                            skip = None
+                    else:
+                        j = 0
+                        while j < s:
+                            if skip[j:s] + c != skip[:s-j+1]:
+                                skipqueue.append(skip[j])
+                                j += 1
+                            else:
+                                s = s-j+1
+                                break
+                        else:
+                            if c == skip[0]:
+                                s = 1
+                            else:
+                                skipqueue.append(c)
+                                s = 0
+                    continue
+            if waitfor and c:
+                if c == waitfor[w]:
+                    w += 1
+                    if w == len(waitfor):
                         waitfor = None
                         wfq.put('ready')
                         wfq = None
                 else:
                     j = 0
-                    while j < i:
-                        if waitfor[j:i] + c != waitfor[:i-j+1]:
+                    while j < w:
+                        if waitfor[j:w] + c != waitfor[:w-j+1]:
                             queue.put(waitfor[j])
                             j += 1
                         else:
-                            i = i-j+1
+                            w = w-j+1
                             break
                     else:
                         if c == waitfor[0]:
-                            i = 1
+                            w = 1
                         else:
                             queue.put(c)
-                            i = 0
+                            w = 0
                 continue
             queue.put(c)                # put '' if at EOF
             if not c:
@@ -392,12 +423,13 @@
             # server is ready.  This is done by sending a print
             # command and waiting for the result to appear.
             rdy = '\nServer Ready.\n'
-            p.stdout = _BufferedPipe(p.stdout, rdy)
             if lang in ('mil', 'xquery'):
                 cmd = 'printf'
             else:
                 cmd = 'io.printf'
-            p.stdin.write('%s("%s");\n' % (cmd, rdy.replace('\n', '\\n')))
+            cmd = '%s("%s");\n' % (cmd, rdy.replace('\n', '\\n'))
+            p.stdout = _BufferedPipe(p.stdout, rdy, cmd)
+            p.stdin.write(cmd)
             p.stdin.flush()
             p.stdout._waitfor()
         else:
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to