twister: improve handling of artifacts with --prep-artifacts-for-testing
Previous commit dealing with cleanup (c304db56f1
) was not taking
--prep-artifacts-for-testing into consideration. Fix this and make sure
we do cleanup when this option is enabled.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
1925277d5d
commit
1ffeaac92a
1 changed files with 10 additions and 12 deletions
|
@ -578,20 +578,18 @@ class ProjectBuilder(FilterBuilder):
|
|||
self.report_out(results)
|
||||
|
||||
if not self.options.coverage:
|
||||
if self.options.runtime_artifact_cleanup == "pass" and self.instance.status == "passed":
|
||||
pipeline.put({"op": "cleanup_pass", "test": self.instance})
|
||||
if self.options.runtime_artifact_cleanup == "all":
|
||||
pipeline.put({"op": "cleanup_all", "test": self.instance})
|
||||
if self.options.prep_artifacts_for_testing:
|
||||
pipeline.put({"op": "cleanup", "mode": "device", "test": self.instance})
|
||||
elif self.options.runtime_artifact_cleanup == "pass" and self.instance.status == "passed":
|
||||
pipeline.put({"op": "cleanup", "mode": "passed", "test": self.instance})
|
||||
elif self.options.runtime_artifact_cleanup == "all":
|
||||
pipeline.put({"op": "cleanup", "mode": "all", "test": self.instance})
|
||||
|
||||
elif op == "cleanup_pass":
|
||||
if self.options.device_testing or self.options.prep_artifacts_for_testing:
|
||||
elif op == "cleanup":
|
||||
mode = message.get("mode")
|
||||
if mode == "device":
|
||||
self.cleanup_device_testing_artifacts()
|
||||
else:
|
||||
self.cleanup_artifacts()
|
||||
elif op == "cleanup_all":
|
||||
if (self.options.device_testing or self.options.prep_artifacts_for_testing) and self.instance.reason != "Cmake build failure":
|
||||
self.cleanup_device_testing_artifacts()
|
||||
else:
|
||||
elif mode == "pass" or (mode == "all" and self.instance.reason != "Cmake build failure"):
|
||||
self.cleanup_artifacts()
|
||||
|
||||
def determine_testcases(self, results):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue