From nobody Sun May 19 11:37:28 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1595534651; cv=none; d=zohomail.com; s=zohoarc; b=YwrL4NVoRLBmGX6y5kDzSQ3lBqzkNkRy0gRG2EymKjc6MCjNwGAXQSJf6B22bhghaq8IKkMPYiz2qHjWi9/H7Dj8fLAWrL4RVchE7sRjWzefPSGp2m8nf955p8wAMvCc5iEjOmnOSIBnrFIKtD+RI5y4WeLTwZHjbUXW3LfHoHc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595534651; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=QO7K7IrFrQDTvXvSZohqTPo3EHI1ncRlckSPQNbY9Sk=; b=fg48Sf4FeVxVymn/kWp8CuYwcO1KvRoqIEUOzy+93dwkmMwwxVbPHI8SlLsczzURfgtLWo/FFUG8/N1sFrMUP0xTkrCaoWYOj5DdrryGJWVsoD2gAtyWjrfNyqWNXmk1sFPf4pFpIsskYsfSHXrJ+rHf0lj3N5iXuC+Q48DxDyE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1595534651023632.1865515005286; Thu, 23 Jul 2020 13:04:11 -0700 (PDT) Received: from localhost ([::1]:60956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jyhRp-0006cc-Bm for importer@patchew.org; Thu, 23 Jul 2020 16:04:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyhR7-0006Ax-9Q for qemu-devel@nongnu.org; Thu, 23 Jul 2020 16:03:25 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:52763) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jyhR5-0005nC-IE for qemu-devel@nongnu.org; Thu, 23 Jul 2020 16:03:25 -0400 Received: by mail-wm1-x330.google.com with SMTP id x5so5482035wmi.2 for ; Thu, 23 Jul 2020 13:03:22 -0700 (PDT) Received: from localhost.localdomain (138.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.138]) by smtp.gmail.com with ESMTPSA id k62sm3378293wmb.16.2020.07.23.13.03.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jul 2020 13:03:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QO7K7IrFrQDTvXvSZohqTPo3EHI1ncRlckSPQNbY9Sk=; b=LQu5hctyQIMaQXjMM40aAxlCC66pBd5RErFg4numl1soAw7P0UCJFGHq9umXxJEzin SeKh8ZYSNEEYawCuhNgXBHXG88fNk9POc/QQjl9JFRHeQkVW+WwQ/hJv7Rh5JSVEiITT LXkB1sLTOsmii8JWZ687gQXTrdhnAt5Ht2zojo6JybS2qMK53ugAFi95Ka13aNcTcuHe dQTRki4yLmzK75l7AgqirMWJSggScLt+EV0fsKlGtmviFXENSewDTCrgKni+uHATDh5m gojXFHYMVmx0XCvKBEJbJFfzsFhW2wrBrYEN0XXikfceeXqsPtDsYr+Zez4p3fQdFkan 0EAQ== 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:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=QO7K7IrFrQDTvXvSZohqTPo3EHI1ncRlckSPQNbY9Sk=; b=aivaIR5M1SVXy2mAelShzlLoJQCAIeJXEHal9hfHjoQUGZ97+dgXnOCmsNCf+t9iHh nLFjJ6EFppcwYzU70xPt8xYtBnUwL53P0V6/UYmH9CuQs/MfVvNE8qE1/umAO0IO0WxC ukOR5Jc+4GQV13a/px4tyuz0IpkJpLI5y2/i0hC/KQ68f3ml7If6zzjlluLi5/3BLRMX W5lHYJOsED+XFzNC+hN+Wb6HKY2Mj1wqm7f6WbrbK0NQ9qZXbfJgyPAUL9PoHePnUnlC vik0ZhiEnJDt34YNAx3YvQEIBKdshwbgAaY+9fxjgSKhu/SrUsq2+yhpnlnPp01wg4Sb Bo4A== X-Gm-Message-State: AOAM533kh/0wE44B2mJ1E60m2MdFgKVG7EyggvbQXavEbYmCA0FlfSiT QaA60kaqAWhCWQLddEterOKuGIPvUZQ= X-Google-Smtp-Source: ABdhPJxQbQouYJ1y/JDsRMxM3NrW01MfSOxC4GAq83MipCR/68nl7p0fvf1nK8NH46ZEl4gyg7s7dA== X-Received: by 2002:a05:600c:204d:: with SMTP id p13mr5445838wmg.88.1595534600755; Thu, 23 Jul 2020 13:03:20 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.1] gitlab-ci: Fix Avocado cache Date: Thu, 23 Jul 2020 22:03:18 +0200 Message-Id: <20200723200318.28214-1-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x330.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) In commit 6957fd98dc ("gitlab: add avocado asset caching") we tried to save the Avocado cache (as in commit c1073e44b4 with Travis-CI) however it doesn't work as expected. For some reason Avocado uses /root/avocado_cache/ which we can not select later. Manually generate a Avocado config to force the use of the current directory. See: - https://docs.gitlab.com/ee/ci/caching/ - https://avocado-framework.readthedocs.io/en/latest/guides/writer/chapters= /writing.html#fetching-asset-files Reported-by: Thomas Huth Fixes: 6957fd98dc ("gitlab: add avocado asset caching") Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- .gitlab-ci.yml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 362e5ee755..b19db22fbd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,11 +8,9 @@ stages: - build - test =20 -# We assume GitLab has it's own caching set up for RPM/APT repositories so= we -# just take care of avocado assets here. -cache: - paths: - - $HOME/avocado/data/cache +# We assume GitLab has it's own caching set up for RPM/APT repositories +cache: &global_cache + policy: pull-push =20 include: - local: '/.gitlab-ci.d/edk2.yml' @@ -47,11 +45,23 @@ include: - find . -type f -exec touch {} + - make $MAKE_CHECK_ARGS =20 -.post_acceptance_template: &post_acceptance +.acceptance_template: &acceptance_definition + cache: + # inherit all global cache settings + <<: *global_cache + key: acceptance_cache + paths: + - $CI_PROJECT_DIR/avocado_cache + policy: pull-push + before_script: + - JOBS=3D$(expr $(nproc) + 1) + - mkdir -p ~/.config/avocado + - echo "[datadir.paths]" > ~/.config/avocado/avocado.conf + - echo "cache_dirs =3D ['${CI_PROJECT_DIR}/avocado_cache']" >> ~/.conf= ig/avocado/avocado.conf after_script: - cd build - python3 -c 'import json; r =3D json.load(open("tests/results/latest/= results.json")); [print(t["logfile"]) for t in r["tests"] if t["status"] no= t in ("PASS", "SKIP")]' | xargs cat - - du -chs $HOME/avocado/data/cache + - du -chs $CI_PROJECT_DIR/avocado_cache =20 build-system-ubuntu-main: <<: *native_build_job_definition @@ -76,13 +86,13 @@ check-system-ubuntu-main: =20 acceptance-system-ubuntu-main: <<: *native_test_job_definition + <<: *acceptance_definition needs: - job: build-system-ubuntu-main artifacts: true variables: IMAGE: ubuntu2004 MAKE_CHECK_ARGS: check-acceptance - <<: *post_acceptance =20 build-system-fedora-alt: <<: *native_build_job_definition @@ -107,13 +117,13 @@ check-system-fedora-alt: =20 acceptance-system-fedora-alt: <<: *native_test_job_definition + <<: *acceptance_definition needs: - job: build-system-fedora-alt artifacts: true variables: IMAGE: fedora MAKE_CHECK_ARGS: check-acceptance - <<: *post_acceptance =20 build-disabled: <<: *native_build_job_definition --=20 2.21.3