testing.ready should be set not just when the git repository is
updated, but also when the user or API client requests a rerun.
---
mods/testing.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mods/testing.py b/mods/testing.py
index 1217f6f..7e15f56 100644
--- a/mods/testing.py
+++ b/mods/testing.py
@@ -119,11 +119,9 @@ class TestingModule(PatchewModule):
and old_value is None \
and obj.get_property("git.tag") and obj.get_property("git.repo"):
self.remove_testing_properties(obj)
- obj.set_property("testing.ready", 1)
elif isinstance(obj, Project) and name == "git.head" \
and old_value != value:
self.remove_testing_properties(obj)
- obj.set_property("testing.ready", 1)
def remove_testing_properties(self, obj, test=""):
for k in list(obj.get_properties().keys()):
@@ -135,6 +133,7 @@ class TestingModule(PatchewModule):
k.startswith("testing.report." + test) or \
k.startswith("testing.log." + test):
obj.set_property(k, None)
+ obj.set_property("testing.ready", 1)
def www_view_testing_reset(self, request, project_or_series):
if not request.user.is_authenticated:
--
2.16.2
_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel
On Sat, 03/24 13:52, Paolo Bonzini wrote: > testing.ready should be set not just when the git repository is > updated, but also when the user or API client requests a rerun. > --- > mods/testing.py | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/mods/testing.py b/mods/testing.py > index 1217f6f..7e15f56 100644 > --- a/mods/testing.py > +++ b/mods/testing.py > @@ -119,11 +119,9 @@ class TestingModule(PatchewModule): > and old_value is None \ > and obj.get_property("git.tag") and obj.get_property("git.repo"): > self.remove_testing_properties(obj) > - obj.set_property("testing.ready", 1) > elif isinstance(obj, Project) and name == "git.head" \ > and old_value != value: > self.remove_testing_properties(obj) > - obj.set_property("testing.ready", 1) > > def remove_testing_properties(self, obj, test=""): > for k in list(obj.get_properties().keys()): > @@ -135,6 +133,7 @@ class TestingModule(PatchewModule): > k.startswith("testing.report." + test) or \ > k.startswith("testing.log." + test): > obj.set_property(k, None) > + obj.set_property("testing.ready", 1) > > def www_view_testing_reset(self, request, project_or_series): > if not request.user.is_authenticated: This makes the method name 'remove_testing_properties' a bit confusing. Can you rename it to 'restart_testing' or 'initialize_testing'? Fam _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel
On 30/03/2018 03:22, Fam Zheng wrote: > On Sat, 03/24 13:52, Paolo Bonzini wrote: >> testing.ready should be set not just when the git repository is >> updated, but also when the user or API client requests a rerun. >> --- >> mods/testing.py | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/mods/testing.py b/mods/testing.py >> index 1217f6f..7e15f56 100644 >> --- a/mods/testing.py >> +++ b/mods/testing.py >> @@ -119,11 +119,9 @@ class TestingModule(PatchewModule): >> and old_value is None \ >> and obj.get_property("git.tag") and obj.get_property("git.repo"): >> self.remove_testing_properties(obj) >> - obj.set_property("testing.ready", 1) >> elif isinstance(obj, Project) and name == "git.head" \ >> and old_value != value: >> self.remove_testing_properties(obj) >> - obj.set_property("testing.ready", 1) >> >> def remove_testing_properties(self, obj, test=""): >> for k in list(obj.get_properties().keys()): >> @@ -135,6 +133,7 @@ class TestingModule(PatchewModule): >> k.startswith("testing.report." + test) or \ >> k.startswith("testing.log." + test): >> obj.set_property(k, None) >> + obj.set_property("testing.ready", 1) >> >> def www_view_testing_reset(self, request, project_or_series): >> if not request.user.is_authenticated: > > This makes the method name 'remove_testing_properties' a bit confusing. Can you > rename it to 'restart_testing' or 'initialize_testing'? Changed to clean_and_start_testing, and pushed. Thanks! Paolo _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel
© 2016 - 2023 Red Hat, Inc.