From nobody Tue Oct 22 22:25:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1695032579; cv=none; d=zohomail.com; s=zohoarc; b=lvMECZMiT6DKrQfJzNEZWsplZmdHwv93bCnC01tkJnGKOtR4AWp3mAsH5B0z4HhVMDcDIApJ5N1ZN8yyUT8S/90+OKD9Mn5FI7IZTWVzoNcGVCszayP4cgC4X+RKurEocY4r1kfAJADSIJfz1N0tckzfKx6RI48PQzG9zqHVZZE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695032579; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=XTvmduSIb/6Z2GMN8TJSYrrAQeZ8m5OdMcoIR5XaguE=; b=GeQ/vWKWcSFnGdnjFeQnZzdfbq/Uv9RlJk350ESGCPsjKvcG0xjaxpdRsKIoclS73K9XWQUU/XuWdudKK0dpxDFnT5t1de1h4PetXHnfDb6071rohhrGwNXz9m114WAWMFZqwHzL26DhywcA7WweyqpI9BJYggG+xB/IA0tHCWE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1695032579612138.78520926615954; Mon, 18 Sep 2023 03:22:59 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-14-OqNmF4TEOJC0iOKII1TPHA-1; Mon, 18 Sep 2023 06:22:55 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 441A5380673C; Mon, 18 Sep 2023 10:22:52 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2ECA3492C37; Mon, 18 Sep 2023 10:22:52 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CAB931946597; Mon, 18 Sep 2023 10:22:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1CC6E194658C for ; Mon, 18 Sep 2023 10:22:51 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E559740C2070; Mon, 18 Sep 2023 10:22:50 +0000 (UTC) Received: from orca.home.lan (unknown [10.45.225.58]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6A73240C2064; Mon, 18 Sep 2023 10:22:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695032578; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=XTvmduSIb/6Z2GMN8TJSYrrAQeZ8m5OdMcoIR5XaguE=; b=WexEoJqCtkgY0YftdvQkpOvxEPJw9i1ulVQZsp/ou0g1OUDpcrD3Zuhn5It6XMVFJQobsA H5/MazF2tUdADfaG9LdUjCghw8tkuz/emcvISBachIywNi8Lo6NmI0oUPJKABnpNWz/BiE ZG51Qp06fRkkEBRXOInzAffO+VVa8zM= X-MC-Unique: OqNmF4TEOJC0iOKII1TPHA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH 02/12] ci: integration: Extract the integration CI main recipe to jobs.sh Date: Mon, 18 Sep 2023 12:22:38 +0200 Message-ID: <87e71159f08c9f6bac3cae58d9d069f61f7cb374.1695032553.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Erik Skultety Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695032580260100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Follow what's been done to other jobs in .gitlab-ci.yml and extract the shell logic from YAML to a function in ci/jobs.sh Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrang=C3=A9 --- ci/integration-template.yml | 36 ++---------------------------------- ci/jobs.sh | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/ci/integration-template.yml b/ci/integration-template.yml index 111a115286..e87ffaf9aa 100644 --- a/ci/integration-template.yml +++ b/ci/integration-template.yml @@ -27,33 +27,6 @@ .install-deps: &install-deps - sudo dnf install -y libvirt-rpms/* libvirt-perl-rpms/* libvirt-python-= rpms/* =20 - # Avocado >98.0 fails with the nwfilter TCK tests, so stick with 98.0 fo= r now - - sudo pip3 install --prefix=3D/usr avocado-framework - - -.enable-core-dumps: &enable-core-dumps - - sudo sh -c "echo DefaultLimitCORE=3Dinfinity >> /etc/systemd/system.co= nf" # Explicitly allow storing cores globally - - sudo systemctl daemon-reexec # need to reexec systemd after changing c= onfig - - -.enable-libvirt-debugging: &enable-libvirt-debugging - - source /etc/os-release # in order to query the vendor-provided variab= les - - if test "$ID" =3D "centos" && test "$VERSION_ID" -lt 9; - then - DAEMONS=3D"libvirtd virtlockd virtlogd"; - else - DAEMONS=3D"virtinterfaced virtlockd virtlogd virtnetworkd virtnodede= vd virtnwfilterd virtproxyd virtqemud virtsecretd virtstoraged"; - fi - - for daemon in $DAEMONS; - do - LOG_OUTPUTS=3D"1:file:/var/log/libvirt/${daemon}.log"; - LOG_FILTERS=3D"3:remote 4:event 3:util.json 3:util.object 3:util.dbu= s 3:util.netlink 3:node_device 3:rpc 3:access 1:*"; - sudo augtool set /files/etc/libvirt/${daemon}.conf/log_filters "'$LO= G_FILTERS'" &>/dev/null; - sudo augtool set /files/etc/libvirt/${daemon}.conf/log_outputs "'$LO= G_OUTPUTS'" &>/dev/null; - sudo systemctl --quiet stop ${daemon}.service; - sudo systemctl restart ${daemon}.socket; - done - =20 .collect-logs: &collect-logs - set +e @@ -78,14 +51,9 @@ before_script: - mkdir "$SCRATCH_DIR" - *install-deps - - *enable-core-dumps - - *enable-libvirt-debugging - - sudo virsh net-start default &>/dev/null || true; script: - - cd "$SCRATCH_DIR" - - git clone --depth 1 https://gitlab.com/libvirt/libvirt-tck.git - - cd libvirt-tck - - sudo avocado --config avocado.config run --job-results-dir "$SCRATCH= _DIR"/avocado + - source ci/jobs.sh + - run_integration after_script: - test "$CI_JOB_STATUS" =3D "success" && exit 0; - *collect-logs diff --git a/ci/jobs.sh b/ci/jobs.sh index eb4a4e29cf..2bc6f86e45 100644 --- a/ci/jobs.sh +++ b/ci/jobs.sh @@ -80,3 +80,35 @@ run_website_build() { =20 run_build } + +run_integration() { + # Avocado >98.0 fails with the nwfilter TCK tests, so stick with 98.0 = for now + sudo pip3 install --prefix=3D/usr avocado-framework + + sudo sh -c "echo DefaultLimitCORE=3Dinfinity >> /etc/systemd/system.co= nf" # Explicitly allow storing cores globally + sudo systemctl daemon-reexec # need to reexec systemd after changing c= onfig + + source /etc/os-release # in order to query the vendor-provided variab= les + if test "$ID" =3D "centos" && test "$VERSION_ID" -lt 9 + then + DAEMONS=3D"libvirtd virtlockd virtlogd" + else + DAEMONS=3D"virtinterfaced virtlockd virtlogd virtnetworkd virtnode= devd virtnwfilterd virtproxyd virtqemud virtsecretd virtstoraged" + fi + for daemon in $DAEMONS + do + LOG_OUTPUTS=3D"1:file:/var/log/libvirt/${daemon}.log" + LOG_FILTERS=3D"3:remote 4:event 3:util.json 3:util.object 3:util.d= bus 3:util.netlink 3:node_device 3:rpc 3:access 1:*" + sudo augtool set /files/etc/libvirt/${daemon}.conf/log_filters "'$= LOG_FILTERS'" &>/dev/null + sudo augtool set /files/etc/libvirt/${daemon}.conf/log_outputs "'$= LOG_OUTPUTS'" &>/dev/null + sudo systemctl --quiet stop ${daemon}.service + sudo systemctl restart ${daemon}.socket + done + + sudo virsh net-start default &>/dev/null || true + + cd "$SCRATCH_DIR" + git clone --depth 1 https://gitlab.com/libvirt/libvirt-tck.git + cd libvirt-tck + sudo avocado --config avocado.config run --job-results-dir "$SCRATCH_D= IR"/avocado +} --=20 2.41.0