created script for running long tests similar to runtests.py
authorChristian Herdtweck <christian.herdtweck@intra2net.com>
Tue, 26 Jul 2016 08:00:43 +0000 (10:00 +0200)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Thu, 12 Nov 2020 14:04:34 +0000 (15:04 +0100)
run_long_tests.py [new file with mode: 0755]

diff --git a/run_long_tests.py b/run_long_tests.py
new file mode 100755 (executable)
index 0000000..a3093a8
--- /dev/null
@@ -0,0 +1,37 @@
+#!/usr/bin/env python3
+
+""" Run the longer tests, that are too long for unittests
+
+Currently, there are 2 such tests:
+- test_volume_size_accuracy 
+- test_volume_split (runs forever)
+
+.. codeauthor:: Intra2net AG <info@intra2net>
+"""
+
+import sys
+
+from testing import test_volume_size_accuracy
+from testing import test_volume_split
+
+
+def main():
+    """ Main function, called when running file as script
+
+    see module doc for more info
+    """
+
+    fast_fail = False
+    print_everything = False
+
+    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)
+
+    return n_errs
+
+
+if __name__ == '__main__':
+    sys.exit(main())