Commits

Kirill Simonov committed 4903637

Minor fixes to pbbt support.

  • Participants
  • Parent commits 12888f5

Comments (0)

Files changed (4)

File cogs.local/check.py

                % (CTL_DIR+"/ssh_config"))
             errors += trial("hg update && python setup.py install",
                             "installing HTSQL under %s" % client_vm.name)
-            errors += trial("pbbt test/regress.yaml -q -S /all/sqlite",
+            errors += trial("pbbt test/regress.yaml -E test/regress.py"
+                            " -q -S /all/sqlite",
                             "testing sqlite backend")
             for server_vm, suite in [(pgsql84_vm, 'pgsql'),
                                      (pgsql90_vm, 'pgsql'),
                 password_value = "admin"
                 host_value = "10.0.2.2"
                 port_value = 10000+server_vm.port
-                command = "pbbt test/regress.yaml -q -S /all/%s" \
+                command = "pbbt test/regress.yaml -E test/regress.py" \
+                          " -q -S /all/%s" \
                           " -D %s=%s -D %s=%s -D %s=%s -D %s=%s" \
                           % (suite, username_key, username_value,
                              password_key, password_value,
                           % (suite, server_vm.name)
                 errors += trial(command, message)
                 server_vm.stop()
-            errors += trial("pbbt test/regress.yaml -q -S /all/routine",
+            errors += trial("pbbt test/regress.yaml -E test/regress.py"
+                            " -q -S /all/routine",
                             "testing htsql-ctl routines")
             client_vm.stop()
     except:

File cogs.local/run.py

                                  % (engine.upper(), name.upper(), str(value)))
         if engine == 'oracle' and env.oracle_sid:
             variables.append('-D ORACLE_SID=%s ' % env.oracle_sid)
+    if env.ctl_path != 'htsql-ctl':
+        variables.append('-D HTSQL_CTL=%s ' % env.ctl_path)
     return "".join(variables)
 
 
       `cogs help test`
     """
     command = "--train"
-    if suites:
-        command += " "+" ".join(suites)
     for suite in suites:
         if not suite.startswith('/'):
             suite = '/all/'+suite

File test/output/routine.yaml

         --port PORT              : port to listen for incoming connections
         -q [--quiet]             : display as little as possible
 
-  - py: GET-1
+  - py: get-1
     stdout: |2+
        | count(school) |
       -+---------------+-
 
   - end-ctl: [server, 'sqlite:build/regress/sqlite/htsql_demo.sqlite', -q]
     stdout: ''
-  - py: GET-2
+  - py: get-2
     stdout: |2+
        | count(school) |
       -+---------------+-

File test/regress.py

 
     def check(self):
         key = tuple(self.input.start_ctl)
-        fork = Fork.start(env.ctl_path,
+        ctl_path = self.state.get('HTSQL_CTL', 'htsql-ctl')
+        fork = Fork.start(ctl_path,
                           self.input.start_ctl,
                           self.input.stdin)
         Fork.push(key, fork)