[Patchew-devel] [PATCH] set testing.ready when requesting retest
Fam Zheng
famz at redhat.com
Fri Mar 30 01:22:38 UTC 2018
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
More information about the Patchew-devel
mailing list