Changeset: 9848ece2ce85 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9848ece2ce85
Modified Files:
        testing/Mtest.py.in
Branch: embedded
Log Message:

merge


diffs (58 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -39,6 +39,9 @@ quiet = False
 
 releaserun = False
 
+global_timeout = 0
+start_time = time.time()
+
 # whether output goes to a tty
 isatty = os.isatty(sys.stdout.fileno())
 
@@ -1223,6 +1226,8 @@ def PerformDir(env, testdir, testlist, B
                     body_bad.append(bodyline)
             if FtOut == F_OK and FtErr == F_OK:
                 oktests.append(TST)
+            if global_timeout and start_time + global_timeout < time.time():
+                break
         TIMES.append((TSTDIR, '', "%7.3f" % td, td, FdOut, FdErr, None))
         if testweb:
             os.chdir(TSTTRGDIR)
@@ -3540,6 +3545,8 @@ def main(argv) :
              'special handling for Jenkins'),
             ('addreqs', None, 'addreqs', None,
              'automatically add required tests when testing individual tests'),
+            ('global_timeout', 'T', 'global_timeout', '<sec>',
+             'global timeout'),
             ]
 
     if THISFILE == 'Mtest.py':
@@ -3621,6 +3628,7 @@ def main(argv) :
     CONDITIONALS['RELEASERUN'] = releaserun
     jenkins = False
     addreqs = False
+    global global_timeout
     if THISFILE == "Mtest.py":
         _IGNORE = dftIGNORE
         par['IGNORE'] = opts.get('ignore', _IGNORE)
@@ -3664,6 +3672,9 @@ def main(argv) :
             env['MULTIFARM'] = 'True'
         jenkins = opts.get('jenkins', False)
         addreqs = opts.get('addreqs', False)
+        a = opts.get('global_timeout')
+        if a is not None:
+            global_timeout = int(a)
     if THISFILE == 'Mapprove.py':
         a = opts.get('ext')
         if a is None:
@@ -4185,6 +4196,8 @@ def main(argv) :
                         body_good.append(elem)
                     else:
                         body_bad.append(elem)
+                if global_timeout and start_time + global_timeout < 
time.time():
+                    break
         body = body_bad + body_good
 
         if THISFILE == "Mtest.py":
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to