[Patchew-devel] [PATCH] set testing.ready when requesting retest

Paolo Bonzini posted 1 patch 6 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/patchew-ci tags/patchew/20180324125251.27144-1-pbonzini@redhat.com
mods/testing.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
[Patchew-devel] [PATCH] set testing.ready when requesting retest
Posted by Paolo Bonzini 6 years ago
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
Re: [Patchew-devel] [PATCH] set testing.ready when requesting retest
Posted by Fam Zheng 6 years ago
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
Re: [Patchew-devel] [PATCH] set testing.ready when requesting retest
Posted by Paolo Bonzini 6 years ago
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