From nobody Wed May 8 19:26:32 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; dkim=fail; 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 1520496061403344.3602264412283; Thu, 8 Mar 2018 00:01:01 -0800 (PST) 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 859FB5D678; Thu, 8 Mar 2018 08:01:00 +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 7B909620A0; Thu, 8 Mar 2018 08:01:00 +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 736F34CA99; Thu, 8 Mar 2018 08:01:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2880w1a032414 for ; Thu, 8 Mar 2018 03:00:59 -0500 Received: by smtp.corp.redhat.com (Postfix) id F16249CC7; Thu, 8 Mar 2018 08:00:58 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EC0356134B for ; Thu, 8 Mar 2018 08:00:57 +0000 (UTC) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 99EF5C04BE0D for ; Thu, 8 Mar 2018 08:00:55 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id h21so9487462wmd.1 for ; Thu, 08 Mar 2018 00:00:55 -0800 (PST) Received: from donizetti.lan (94-36-191-219.adsl-ull.clienti.tiscali.it. [94.36.191.219]) by smtp.gmail.com with ESMTPSA id b9sm21755912wrh.68.2018.03.08.00.00.52 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Mar 2018 00:00:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=rZNBzlO/xgwsr7NZN/SlH0RGOuTvtjPtWcwVknSq6Y0=; b=hlSTFYNiosV3zxdL3pGl/H68HMEPBqrkz27V9fFmWKlpw//3IEERgkWbTSZk7ln2RS bzpoGuKaGmNwBh6sDZ8EcGp5S+F0w/uciz0Pu5wNLlnqRYqbsWawMQKZOnCHCb6LPDTy jWEX/8oP4J5f8xerB+Iv+hT8BDZEbM8zWecx56DN+r07fYWdA4LBKpqrryhAKNYwHSAx oJpK+MjLEh2IqDaAYG0Da2Ch/si02K/cnCXwyeCMg8WWRS+j5P23B28SMVZHR+rIlnEs AARmJGgEaUfTfLxPnekcUi1B27PFFJKyv1+Vv2W9Tz2woJByUatAR29RnmMGXQ5XblF3 X01Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=rZNBzlO/xgwsr7NZN/SlH0RGOuTvtjPtWcwVknSq6Y0=; b=JgQeHjXa9Ugs9S/IxMQoYuH/x62QczDeJSp/+9luqM3kEIXxuvGcHEgy21Qwp2/VpP AzuEWqkpKxR2/cKMhflruziteTTpbY2eufmdcQ5id26faCJMk4Lr/7EWNN9dpirmKgOl Qxmtz+9ULUyXNa1YJevn8XDcJNCWlEWUnA5ix0A5YAtEddfxByv65F3Ap1yKGpI5IbPc 02UMbEgiioU5h3ssK4mONhvlZTyOaudhW7r8vs02g3fv9/RELFQbvcZ7qpSM+0tUlOl1 vhXUqEmaEpk8Ro71LR2IRNcEw81PInBi+BfwXkVe9NcM8yzbAOGHvXIv8ErFZQorY1wC xFcg== X-Gm-Message-State: AElRT7F5hGpExCij7jfvrWWssedn11nq/z5QmoF1bsHLDs4oBdPpt7vS r7INa8JKSZ3q7dQzgo5fRr1GEpHd X-Google-Smtp-Source: AG47ELsCGEC8KR87R/Ue+TcZDHGJr9MY7rw/E4cR8mJpiXA3VwkWK7fIf9bGxGWSJ6MKWKmM3NCPgg== X-Received: by 10.28.85.7 with SMTP id j7mr12460706wmb.38.1520496053813; Thu, 08 Mar 2018 00:00:53 -0800 (PST) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Thu, 8 Mar 2018 09:00:42 +0100 Message-Id: <20180308080042.19342-8-pbonzini@redhat.com> In-Reply-To: <20180308080042.19342-1-pbonzini@redhat.com> References: <20180308080042.19342-1-pbonzini@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 08 Mar 2018 08:00:55 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 08 Mar 2018 08:00:55 +0000 (UTC) for IP:'74.125.82.65' DOMAIN:'mail-wm0-f65.google.com' HELO:'mail-wm0-f65.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.469 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 74.125.82.65 mail-wm0-f65.google.com 74.125.82.65 mail-wm0-f65.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 7/7] testing: pass log URL in the TestingReport 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.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.39]); Thu, 08 Mar 2018 08:01:00 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- mods/testing.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mods/testing.py b/mods/testing.py index ea6fdf5..32e7d86 100644 --- a/mods/testing.py +++ b/mods/testing.py @@ -164,20 +164,21 @@ class TestingModule(PatchewModule): log_url =3D request.build_absolute_uri(log_url) return log_url =20 - def add_test_report(self, user, project, tester, test, head, + def add_test_report(self, request, project, tester, test, head, base, identity, passed, log, is_timeout): # Find a project or series depending on the test type and assign i= t to obj if identity["type"] =3D=3D "project": obj =3D Project.objects.get(name=3Dproject) - is_proj_report =3D True project =3D obj.name elif identity["type"] =3D=3D "series": message_id =3D identity["message-id"] obj =3D Message.objects.find_series(message_id, project) if not obj: raise Exception("Series doesn't exist") - is_proj_report =3D False project =3D obj.project.name + user =3D request.user + log_url =3D self.reverse_testing_log(obj, test, request=3Drequest) + html_log_url =3D self.reverse_testing_log(obj, test, request=3Dreq= uest, html=3DTrue) obj.set_property("testing.report." + test, {"passed": passed, "is_timeout": is_timeout, @@ -195,8 +196,8 @@ class TestingModule(PatchewModule): if all_tests.issubset(done_tests): obj.set_property("testing.tested-head", head) emit_event("TestingReport", tester=3Dtester, user=3Duser.username, - obj=3Dobj, passed=3Dpassed, test=3Dtest, log=3Dlog, - is_timeout=3Dis_timeout) + obj=3Dobj, passed=3Dpassed, test=3Dtest, log=3Dlog, lo= g_url=3Dlog_url, + html_log_url=3Dhtml_log_url, is_timeout=3Dis_timeout) =20 def get_tests(self, obj): ret =3D {} @@ -475,7 +476,7 @@ class TestingReportView(APILoginRequiredView): head, base, passed, log, identity, is_timeout=3DFalse): _instance.tester_check_in(project, tester or request.user.username) - _instance.add_test_report(request.user, project, tester, + _instance.add_test_report(request, project, tester, test, head, base, identity, passed, log, is_timeout) =20 --=20 2.14.3 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel