From 750b8886ad441f2aa189a9a009e978b02a166aa1 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Fri, 5 Jan 2018 15:33:37 +0100 Subject: Enhance testrunner to ignore old test logs Testrunner had a virtual problem: When running testrunner without building the project again, and the test skips some runs that were not skipped before, then it will fetch an old test log from the former run. Cure: We check all logfiles first. If a file exists and skip is not set, then we remove the file. Then normal testing starts. Change-Id: Ib91baca97d3b0a5c0b68a8022fca52202b20e862 Reviewed-by: Friedemann Kleint --- testing/command.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'testing/command.py') diff --git a/testing/command.py b/testing/command.py index 67dd05a03..dd348432c 100644 --- a/testing/command.py +++ b/testing/command.py @@ -96,6 +96,14 @@ if (os.environ.get("COIN_RERUN_FAILED_ONLY", "1").lower() in def test_project(project, args, blacklist, runs): ret = [] + + # remove files from a former run + for idx in range(runs): + index = idx + 1 + runner = TestRunner(builds.selected, project, index) + if os.path.exists(runner.logfile) and not args.skip: + os.unlink(runner.logfile) + # now start the real run for idx in range(runs): index = idx + 1 runner = TestRunner(builds.selected, project, index) -- cgit v1.2.3