From nobody Thu May 16 11:48:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1606387198; cv=none; d=zohomail.com; s=zohoarc; b=PV71rDNL5mF59OfG+mzrl3WErOjO5QonOH7wrJLb8Mp9JVi3lbT1MQV5kd2ksj05r2TlQoTM2o8EAPneWTEZXDQTJ3sO7j5yWkcPVMQFxZ6nkyglmnIAi4jyoVWh1yTiA8n+2k9MBjXQLfe7wfsCyXOr1QZ6HtOeIWigGmVqZII= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606387198; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=pyXJJzbIJI17FU5IUgxXTFl61OmFnYfY9t1sAlEDFG8=; b=oKn4i1XG+1sBVhbF+3YUVAZI2rP6Cxlrs45n2l14Kd88cFiYH/LVUmlWe0Q2gTp3XneJjCbo5YgIAAqpfbl/BVAeZ+7RPsQLKY/TrYJ9VF0aMsOoUgTYlP0tixQ0oyF6ZfSJcRypaTpiFPKxYqfGNRzS/fy6X5XaVOFuwhXdZuo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1606387198632833.6429118254564; Thu, 26 Nov 2020 02:39:58 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-369-pOv6jf0qN4K5Elv-u_fvAg-1; Thu, 26 Nov 2020 05:39:55 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E7E6887309E; Thu, 26 Nov 2020 10:39:48 +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 94DB460C05; Thu, 26 Nov 2020 10:39:48 +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 92D5D4BB7B; Thu, 26 Nov 2020 10:39:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AQAdd8B020152 for ; Thu, 26 Nov 2020 05:39:39 -0500 Received: by smtp.corp.redhat.com (Postfix) id C649B1001281; Thu, 26 Nov 2020 10:39:39 +0000 (UTC) Received: from avogadro.lan (ovpn-113-107.ams2.redhat.com [10.36.113.107]) by smtp.corp.redhat.com (Postfix) with ESMTP id 479B410021AA for ; Thu, 26 Nov 2020 10:39:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606387197; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=pyXJJzbIJI17FU5IUgxXTFl61OmFnYfY9t1sAlEDFG8=; b=IIQxLdsrLJVaNRTz8WjMpxJ5D1oPHmnfhlVEicjcOVGXrEqIq4OFjNwh3nqku0GcwSrIbt s0UA7G6xJSrBIucGbIyGHATL4rvno/nAmFXdoeCLS/h9Ln38k6odBzRujayWmr0cE/0GGk 3P/Fz/iaTLtvhI+4VVscJgDYSGLZG18= X-MC-Unique: pOv6jf0qN4K5Elv-u_fvAg-1 From: Paolo Bonzini To: libvir-list@redhat.com Subject: [PATCH] gitlab-ci: publish test report as an artifact Date: Thu, 26 Nov 2020 11:39:35 +0100 Message-Id: <20201126103935.389837-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" "meson test" produces JUnit XML in the meson-logs directory. The XML can be parsed by GitLab and showed as part of the CI report. However, if the build and tests are performed by "meson dist", the tests are performed in "meson dist"'s own build directory and the logs are not accessible. So switch from "ninja dist" to "meson dist --no-tests" after a separate build step that is shared by the normal and the DIST=3Dskip cases. Signed-off-by: Paolo Bonzini --- For an example see https://gitlab.com/bonzini/libvirt/-/pipelines/221545357/test_report. Test durations however are not yet available in upstream Meson. --- .gitlab-ci.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6792accf8f..ce7b60dc6b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -51,17 +51,23 @@ stages: - *script_variables script: - meson build --werror || (cat build/meson-logs/meson-log.txt && exit = 1) + - ninja -C build + - ninja -C build test + - DESTDIR=3D$PWD/install/ ninja -C build install - if test "$DIST" !=3D "skip"; then - ninja -C build dist; - else - ninja -C build; - ninja -C build test; + meson dist -C build --no-tests; fi - if test -x /usr/bin/rpmbuild && test "$RPM" !=3D "skip"; then rpmbuild --nodeps -ta build/meson-dist/libvirt-*.tar.xz; fi + artifacts: + when: always + paths: + - build/meson-logs/ + reports: + junit: build/meson-logs/testlog.junit.xml =20 # Jobs that we delegate to Cirrus CI because they require an operating # system other than Linux. These jobs will only run if the required --=20 2.28.0