tried to add test_deltatar.DeltaTarBz2[Stream]Test to run_long_tests but failed
authorChristian Herdtweck <christian.herdtweck@intra2net.com>
Tue, 26 Jul 2016 08:46:46 +0000 (10:46 +0200)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Thu, 12 Nov 2020 14:04:34 +0000 (15:04 +0100)
run_long_tests.py

index a3093a8..9b1713b 100755 (executable)
@@ -2,15 +2,20 @@
 
 """ Run the longer tests, that are too long for unittests
 
-Currently, there are 2 such tests:
+Currently, there are 3 such tests:
+- test_deltatar.DeltaTarBz2[Stream]Test (2 unittests)
 - test_volume_size_accuracy 
 - test_volume_split (runs forever)
 
+TODO:
+- actually get unittests to run, did not manage sofar
+
 .. codeauthor:: Intra2net AG <info@intra2net>
 """
 
 import sys
-
+from unittest import TextTestRunner
+from testing.test_deltatar import DeltaTarBz2Test, DeltaTarBz2StreamTest
 from testing import test_volume_size_accuracy
 from testing import test_volume_split
 
@@ -21,15 +26,27 @@ def main():
     see module doc for more info
     """
 
+    # params for following scripts
     fast_fail = False
     print_everything = False
 
+    # run slow bz2 unittests
+    # this currently fails because python cannot find a "runTest" in tests
+    #test_runner = TextTestRunner(failfast=fast_fail,
+    #                             verbosity=1+int(print_everything))
+    #test_runner.run(DeltaTarBz2Test())
+    #test_runner.run(DeltaTarBz2StreamTest())
+
     n_errs = test_volume_size_accuracy.run_all_tests(fast_fail,
                                                      print_everything)
     if fast_fail and n_errs > 0:
         return n_errs
-    n_errs += test_volume_split.run_forever(fast_fail, print_everything)
 
+    # if this returns, then only if fast_fail is set and first error occurred
+    test_volume_split.test_forever(fast_fail, print_everything)
+    n_errs += 1
+
+    # done
     return n_errs