[Patchew-devel] [PATCH 1/2] testing: Fix resetting one test

Fam Zheng famz at redhat.com
Fri Jul 27 13:38:50 UTC 2018


The testing-reset link was broken. All results will be cleared because
we forgot to match the test name parameter.

Suggested-by: Paolo Bonzini <pbonzini at redhat.com>
Signed-off-by: Fam Zheng <famz at redhat.com>
---
 mods/testing.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/mods/testing.py b/mods/testing.py
index 82b8c80..ccdd336 100644
--- a/mods/testing.py
+++ b/mods/testing.py
@@ -164,8 +164,13 @@ class TestingModule(PatchewModule):
             if k == "testing.done" or \
                k == "testing.tested-head":
                 obj.set_property(k, None)
-        for r in self.get_testing_results(obj):
-            r.delete()
+        if test:
+            r = self.get_testing_result(obj, test)
+            if r:
+                r.delete()
+        else:
+            for r in self.get_testing_results(obj):
+                r.delete()
         self.recalc_pending_tests(obj)
 
     def www_view_testing_reset(self, request, project_or_series):
-- 
2.17.1




More information about the Patchew-devel mailing list