aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-02-24 09:32:19 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2021-03-02 00:57:57 +0200
commit0c663d056a588b9bc4aa9f6a954de2f7792313ec (patch)
treef075fb40b26111c6a62bc0d606f269b5b04684ad /run_unittests.py
parent3bf207ab1bb85ffd6bc35acbbf63609a33928ed6 (diff)
downloadmeson-0c663d056a588b9bc4aa9f6a954de2f7792313ec.zip
meson-0c663d056a588b9bc4aa9f6a954de2f7792313ec.tar.gz
meson-0c663d056a588b9bc4aa9f6a954de2f7792313ec.tar.bz2
mtest: create separate runners for multiple repeats
Reusing the runners for multiple repeats of the test run gets in the way of the progress report, which stores runners in an OrderedSet. Instead, create a separate SingleTestRunner object for each repeat. While at it, fix the "duplicate suite" assertion as it can fire with TAP tests and --repeat=N. Fixes: #8405
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index acd775c..53642ca 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -2524,6 +2524,12 @@ class AllPlatformTests(BasePlatformTests):
self.assertNotRegex(out, r'WARNING: Overriding.*TEST_VAR_SET')
self.run_tests()
+ def test_testrepeat(self):
+ testdir = os.path.join(self.common_test_dir, '207 tap tests')
+ self.init(testdir)
+ self.build()
+ self._run(self.mtest_command + ['--repeat=2'])
+
def test_testsetups(self):
if not shutil.which('valgrind'):
raise unittest.SkipTest('Valgrind not installed.')