From nobody Thu Apr 25 13:57:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15334588629821014.3633940672188; Sun, 5 Aug 2018 01:47:42 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D28B980F8F; Sun, 5 Aug 2018 08:47:41 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BF80D57DE2; Sun, 5 Aug 2018 08:47:41 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B36864BB78; Sun, 5 Aug 2018 08:47:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w728EWUF027485 for ; Thu, 2 Aug 2018 04:14:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id 22AD22026D7E; Thu, 2 Aug 2018 08:14:32 +0000 (UTC) Received: from lemon.usersys.redhat.com (ovpn-12-100.pek2.redhat.com [10.72.12.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id B4D772026D66; Thu, 2 Aug 2018 08:14:30 +0000 (UTC) From: Fam Zheng To: patchew-devel@redhat.com Date: Thu, 2 Aug 2018 16:14:19 +0800 Message-Id: <20180802081422.25982-2-famz@redhat.com> In-Reply-To: <20180802081422.25982-1-famz@redhat.com> References: <20180802081422.25982-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 1/4] manage.py: Run tests/ if no test specified X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Sun, 05 Aug 2018 08:47:41 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Just to make ./manage.py slightly more usable. Signed-off-by: Fam Zheng --- manage.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/manage.py b/manage.py index 4d598f9..a1533b8 100755 --- a/manage.py +++ b/manage.py @@ -16,4 +16,7 @@ if __name__ =3D=3D "__main__": =20 from django.core.management import execute_from_command_line =20 - execute_from_command_line(sys.argv) + args =3D list(sys.argv) + if len(args) =3D=3D 2 and args[1] =3D=3D "test": + args.append("tests") + execute_from_command_line(args) --=20 2.17.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Thu Apr 25 13:57:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1533197678291175.78487456477592; Thu, 2 Aug 2018 01:14:38 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8756581DE1; Thu, 2 Aug 2018 08:14:36 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 73DB72010CC6; Thu, 2 Aug 2018 08:14:36 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1BFD418037EC; Thu, 2 Aug 2018 08:14:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w728EY3M027495 for ; Thu, 2 Aug 2018 04:14:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 448DF20180EB; Thu, 2 Aug 2018 08:14:34 +0000 (UTC) Received: from lemon.usersys.redhat.com (ovpn-12-100.pek2.redhat.com [10.72.12.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id CF9752026D66; Thu, 2 Aug 2018 08:14:32 +0000 (UTC) From: Fam Zheng To: patchew-devel@redhat.com Date: Thu, 2 Aug 2018 16:14:20 +0800 Message-Id: <20180802081422.25982-3-famz@redhat.com> In-Reply-To: <20180802081422.25982-1-famz@redhat.com> References: <20180802081422.25982-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 2/4] tags: Improve TagsUpdate event X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 02 Aug 2018 08:14:36 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" So that the event carries old and new tags, which can help other modules to implement state transition logics. Signed-off-by: Fam Zheng --- mods/tags.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/mods/tags.py b/mods/tags.py index 5ec5bc2..01bf8a1 100644 --- a/mods/tags.py +++ b/mods/tags.py @@ -48,7 +48,8 @@ series cover letter, patch mail body and their replies. =20 def __init__(self): register_handler("MessageAdded", self.on_message_added) - declare_event("TagsUpdate", series=3D"message object that is updat= ed") + declare_event("TagsUpdate", series=3D"message object that is updat= ed", + old=3D"old tag set", new=3D"new tag set") =20 # XXX: get this list through module config? def get_tag_prefixes(self): @@ -58,9 +59,10 @@ series cover letter, patch mail body and their replies. def update_tags(self, s): old =3D s.get_property("tags", []) new =3D self.look_for_tags(s) - if set(old) !=3D set(new): - s.set_property("tags", list(set(new))) - return True + old, new =3D set(old), set(new) + if old !=3D new: + s.set_property("tags", list(new)) + return old, new =20 def on_message_added(self, event, message): series =3D message.get_series_head() @@ -75,7 +77,8 @@ series cover letter, patch mail body and their replies. elif newer_than(series, m): m.set_property("obsoleted-by", series.message_id) =20 - updated =3D self.update_tags(series) + old, new =3D self.update_tags(series) + updated =3D old !=3D new =20 for p in series.get_patches(): updated =3D updated or self.update_tags(p) @@ -101,7 +104,7 @@ series cover letter, patch mail body and their replies. series.set_property("reviewed", True) series.set_property("reviewers", list(reviewers)) if updated: - emit_event("TagsUpdate", series=3Dseries) + emit_event("TagsUpdate", series=3Dseries, old=3Dold, new=3Dnew) =20 def parse_message_tags(self, m): r =3D [] --=20 2.17.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Thu Apr 25 13:57:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1533197679275744.598802659668; Thu, 2 Aug 2018 01:14:39 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C6F6CC07014F; Thu, 2 Aug 2018 08:14:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B8387600C7; Thu, 2 Aug 2018 08:14:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id AB45E4BB78; Thu, 2 Aug 2018 08:14:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w728Eaf9027506 for ; Thu, 2 Aug 2018 04:14:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 822542026D7E; Thu, 2 Aug 2018 08:14:36 +0000 (UTC) Received: from lemon.usersys.redhat.com (ovpn-12-100.pek2.redhat.com [10.72.12.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 00DC32026D66; Thu, 2 Aug 2018 08:14:34 +0000 (UTC) From: Fam Zheng To: patchew-devel@redhat.com Date: Thu, 2 Aug 2018 16:14:21 +0800 Message-Id: <20180802081422.25982-4-famz@redhat.com> In-Reply-To: <20180802081422.25982-1-famz@redhat.com> References: <20180802081422.25982-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 3/4] testing: Don't reset all tests upon git result update X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 02 Aug 2018 08:14:38 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Git results move to "PENDING" to get applier redo the apply if replies have added "reviewed-by" tags etc. The testing mod's event handler on_result_update cannot tell if this is only adding tags, in which case re-test is not necessary and may result in duplicated error reports. Instead, subscribe to TagsUpdate event and handle "Based-on:" tag specifically. Signed-off-by: Fam Zheng --- mods/testing.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/mods/testing.py b/mods/testing.py index ccdd336..164f97d 100644 --- a/mods/testing.py +++ b/mods/testing.py @@ -107,13 +107,23 @@ class TestingModule(PatchewModule): is_timeout=3D"whether the test has timeout") register_handler("SetProperty", self.on_set_property) register_handler("ResultUpdate", self.on_result_update) + register_handler("TagsUpdate", self.on_tags_update) + + def on_tags_update(self, evt, series, old, new): + def find_tag(tags, t): + for i in tags: + if i.lower().startswith(t.lower()): + return i + old_base =3D find_tag(old, "Based-on:") + new_base =3D find_tag(new, "Based-on:") + if old_base !=3D new_base: + self.clear_and_start_testing(series) =20 def on_set_property(self, evt, obj, name, value, old_value): - if ((isinstance(obj, Message) and obj.is_series_head) \ - or isinstance(obj, Project)) \ - and name in ("git.tag", "git.repo") \ + if name in ("git.tag", "git.repo") \ and old_value is None \ and obj.get_property("git.tag") and obj.get_property("git.repo= "): + assert isinstance(obj, Project) self.clear_and_start_testing(obj) elif isinstance(obj, Project) and name =3D=3D "git.head" \ and old_value !=3D value: @@ -130,7 +140,7 @@ class TestingModule(PatchewModule): and old_status !=3D Result.SUCCESS \ and result.status =3D=3D result.SUCCESS \ and result.data.get("tag") and result.data.get("repo"): - self.clear_and_start_testing(obj) + self.recalc_pending_tests(obj) =20 def get_testing_results(self, obj, *args, **kwargs): return obj.results.filter(name__startswith=3D'testing.', *args, **= kwargs) --=20 2.17.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Thu Apr 25 13:57:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1533458863138123.79175399448684; Sun, 5 Aug 2018 01:47:43 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E294D30832F4; Sun, 5 Aug 2018 08:47:41 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D207F61354; Sun, 5 Aug 2018 08:47:41 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C38071841C57; Sun, 5 Aug 2018 08:47:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w728Ec5X027516 for ; Thu, 2 Aug 2018 04:14:38 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9E4392026D7E; Thu, 2 Aug 2018 08:14:38 +0000 (UTC) Received: from lemon.usersys.redhat.com (ovpn-12-100.pek2.redhat.com [10.72.12.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 39E9C2026D66; Thu, 2 Aug 2018 08:14:36 +0000 (UTC) From: Fam Zheng To: patchew-devel@redhat.com Date: Thu, 2 Aug 2018 16:14:22 +0800 Message-Id: <20180802081422.25982-5-famz@redhat.com> In-Reply-To: <20180802081422.25982-1-famz@redhat.com> References: <20180802081422.25982-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 4/4] tests: Add testing cases for tags update X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Sun, 05 Aug 2018 08:47:41 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Fam Zheng --- .../0025-foo-patch-add-reviewed-by.mbox.gz | Bin 0 -> 1104 bytes tests/data/0026-new-file.mbox.gz | Bin 0 -> 949 bytes .../data/0027-new-file-based-on-reply.mbox.gz | Bin 0 -> 863 bytes tests/test_testing.py | 61 ++++++++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 tests/data/0025-foo-patch-add-reviewed-by.mbox.gz create mode 100644 tests/data/0026-new-file.mbox.gz create mode 100644 tests/data/0027-new-file-based-on-reply.mbox.gz diff --git a/tests/data/0025-foo-patch-add-reviewed-by.mbox.gz b/tests/data= /0025-foo-patch-add-reviewed-by.mbox.gz new file mode 100644 index 0000000000000000000000000000000000000000..60ba10b1d47fa91d8151fd77f73= b80ae4f74ab0d GIT binary patch literal 1104 zcmV-W1h4xaiwFpbo?=3D@7128Z$H7#auZ!K_PbYo~OVPs@2a%FaDWp`y{En;~tZDMbD z0HsxJQ{qSv{%n3l*M5@H2}yWKi0Gjru6J_g4DMQ578R0#%xy9gCldjG{dE8Zboa{L zt)lWWbocZ0(=3DX}LggsG7BQg*!urw1=3DQQ64?6~=3DU`3pvrQX-Lr~BEHvi!3**ncArHo z^iZTOL?R6s2Qh|6nieFYPc$JTQSgxF9WMBU7iAQPXwD`)P&5b2aCFmjbgS0TO&fw7 zGAdK16pbLKJfadR0Aa!?SA=3DEm8;3W9vL6!qCFsf;_;B0$04T@gL`KP2iuCY(zI!kF z9d78iA;JN~=3Dzo~7T;=3D-98K$EO$%z-J*oF4bM?HEK#D$U=3DY{iG&?brM5q#i0TnnOC% zO94^1q!dxxnKBiF-ye8Bun5e0(>83UWt(-Y?ldjkX<4@8v>L63VK)w-FZe!KHvCy| zRM>2S>9~!iYnng|+c03)>kcYfPnPBB1u5Lcluw{N4$|iiwq6{l67@(cTX3EKMv7V& ztLMU?portFag3H*xA6yihGQ67pXPZmq2vOUXiJ(UbD{((Esdt-7-rqB+qz|79>gT? z&@VW-Uig$W+8_10C4Lxij@@`NccFjLKkL$QfazI!(*eQ3G;|c&M7`1WT+(@24;TDp zqhEM1jhUk5A&vHd3x)lf1aoZ2vM?;c!js9$jnvCnO>Jj4otgTY2HdYu4BcuzR1UPA z_fnaqRE<(9qb$kI;Ix8-BC2SJ$OPM328!_s$>&G~D~0fMGI{MB7ta5_sa`T(%rG}g zpOKnAgZl~PRI=3D~^W4+GhveGD-Zq_W_bZWZgXnryJ7ol9Z#!BA*^IGNyxc80+r=3DK6- zu@JIA$19%90kg_jLQx&cAuqDU2tkvNuNjN+~cd=3DEcZT2y0|CL7?@RRB+v zZTFr=3D=3DUu*^X_9@<^8X0qV#`+U{?CY2{=3DxWI{FYi9TAhY2{6(Me1MpQOV`zVy;%#$a z_u)7hQKCPBi2rHQt)z#Szb{I-F&5B*?PsqbHo)2fmw?|J z8UT00rqya$4Xe=3Dt-y00gmy>48Fjptw`*`(xUbnn>aP!rw<7&M*S=3D{b=3DJ#uz}2B%kk z58$eM3FvWtT^pK13v;n-quv}gYAbZ|g~=3Di(z6w;4BSQ^8o=3D=3DQUachlmfBPb(a3Z2P Wv~zsyjPP+;T<{bj2JHf literal 0 HcmV?d00001 diff --git a/tests/data/0026-new-file.mbox.gz b/tests/data/0026-new-file.mb= ox.gz new file mode 100644 index 0000000000000000000000000000000000000000..f01b05d18d4a48006493ad9fb23= a22e970140cb6 GIT binary patch literal 949 zcmV;m14{fKiwFn=3Drea$F12Q%(Ze@2ZW@&6?E^T6OcmSnUX>Z#`5dG}^6@z@TAuTV- zI#|V(FF9`QS~cY)uwe)*azt)J?kYTN$>@*otd2^q)1XBNffRRV-pst&c|5~ZK4Fd# zA88+CHq&{Dd4DF#Fu`X_=3DP?`PI`d&5GPqAr#n79I?4?gGi72g5XGhGqe#NZf5k6ts zS6aoYTKb-e5`7p|SO>2Izf=3Dl5$8CYr^_y+_LCxtn4!g#p5Ha%0$cLVYBChb6Pi2a) zqI~8-D3qd9PZmC0UtXV|;Z#sUp4IArR^U3;q2;=3Dk*C5-A92co9N*@AL5$13?gy%$- zXcjT5gVH5Ln2H5PFj+t*Q!1RtYd79BSS_}0?yV2;T-4TVA*89eRgd2!^Av zyIE;<9e2F~K|uFlFg!E2A>4iPnk0&MC(FnEV8G8$$l&xQ7y#UyT>*Jq+&0GU*rQs! zw$p5l4;$;~{G-gPf(NB2tAa9Q!Rie8@Gv|coql)((r6%!2BXo81u{0Otfx~xS$zLX z!8vEf(>TJP;6jbjZTS`^q~%7KU687v^F{)(UprtB=3D15-=3D$aI7x@lLDR+#oO($>|h0 zk7WtM-r!C)|JWwSU1uhV_&GSM%d%YJvDxXE)WD{G+Nw%ZR;$%^aQc1VPThf;3;jN; XMWPgB4~*K@wp{iX)vrdtMF#)?_a)zu literal 0 HcmV?d00001 diff --git a/tests/data/0027-new-file-based-on-reply.mbox.gz b/tests/data/0= 027-new-file-based-on-reply.mbox.gz new file mode 100644 index 0000000000000000000000000000000000000000..b0e9e7ae599b3923e174691c06e= 65fa4c2d26a89 GIT binary patch literal 863 zcmV-l1EBmLiwFqEsbX6I128Z$H!W^ucP(aVY-KHCVRL0OKcT{aO{EKQx|B+z>MgnUBV3tMg~m|H)P*5W;VwcELidrU&pmR9 zxHf&6o*9MfH%xOD;1ec2Aw?+it?z(qbYYrf1)MhgmJ4t!y9rjut+(ifQ>$%R#t5^F zhsdr27rHzMn7|c#j1y!Fo)I-Ej^M5Zo8U6pY$+evADMk-p3j9K|Nh2>(e>zZfRCIK zaLi^KqyXD88>VfWPK|7@6mF6@(=3DK=3D@0#tB4hE)`6EH*KyfRGvjO!x)^SZpAT6B3Gr zr5mdkv6{xo+jMQ4dm31x9=3Dg6O8pUsiTVZsEIF?k}6}z6NW8hP6d~pzRaul2lMK% zYY)7$$czl0_4++m$F{c8lh#cgrq^4@w%x3?bj;GJ5 zoLlpsMSV%-Rqwu7xG?dCa|_^Z-gG)0r{Od@;Ektq`(>xuvFvgOJdeKKa6BkJW0-w% z>NFH*{q1r$9J0$k8C=3D|YLx9`C4Uosxq&Bzb4&~ysta@|asFmpKW32Lwd7A4yBZh{z pt07`U^?E-(pI&@;0GiW4a~g^{Z5aJ>u>ZJ@#$QJC=3DGm(T006Q5p05A^ literal 0 HcmV?d00001 diff --git a/tests/test_testing.py b/tests/test_testing.py index 1284498..db40209 100755 --- a/tests/test_testing.py +++ b/tests/test_testing.py @@ -335,6 +335,67 @@ class TestingResetTest(PatchewTestCase): "testing.c": Result.PENDING}) self.assertFalse(msg.get_property("testing.done")) =20 +class TestingTagUpdate(PatchewTestCase): + + def setUp(self): + self.create_superuser() + + self.repo =3D self.create_git_repo("repo") + + self.p1 =3D self.add_project("QEMU", "qemu-devel@nongnu.org") + create_test(self.p1, "a") + + def do_test(self, has_work=3DTrue): + + if has_work: + out, err =3D self.check_cli(["tester", "-p", "QEMU", "--no-wai= t"]) + self.assertIn("Project: QEMU\n", out) + + out, err =3D self.check_cli(["tester", "-p", "QEMU", "--no-wait"]) + self.assertIn("Nothing to test", out) + + def test_reviewed_by_update(self): + self.cli_login() + + self.cli_import('0013-foo-patch.mbox.gz') + self.do_apply() + self.do_test() + + self.cli_import('0025-foo-patch-add-reviewed-by.mbox.gz') + self.do_apply() + self.do_test(has_work=3DFalse) + + msg =3D Message.objects.series_heads().get() + self.assertIn("Reviewed-by: Some Body ", + msg.get_property("tags")) + self.assertTrue(msg.get_property("testing.done")) + + self.cli_logout() + self.assertTrue(msg.get_property("testing.done")) + + def test_based_on_update(self): + self.cli_login() + + self.cli_import('0013-foo-patch.mbox.gz') + self.do_apply() + self.cli_import('0014-bar-patch.mbox.gz') + self.do_apply() + self.do_test() + + self.cli_import('0026-new-file.mbox.gz') + self.do_apply() + self.do_test() + + self.cli_import('0027-new-file-based-on-reply.mbox.gz') + self.do_apply() + self.do_test() + self.cli_logout() + + msg =3D Message.objects.series_heads().get(message_id=3D'add-new-f= ile@redhat.com') + self.assertTrue(msg.get_property("testing.done")) + self.assertIn("Based-on: <20160628014747.20971-1-famz@redhat.com>", + msg.get_property("tags")) + # do not run tests on the abstract class del TestingTestCase =20 --=20 2.17.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel