[PATCH v2] CI: gitlab: Collect pytest artifacts

Marek Vasut marek.vasut+renesas at mailbox.org
Tue Feb 28 03:25:43 CET 2023


Copy build artifacts for all test.py tests, so they show up in
artifacts storage for later inspection. The test.py tests output
in CI is basically useless, but it is far more useful in the html
output for analysis and debugging.

Reviewed-by: Tom Rini <trini at konsulko.com>
Suggested-by: Simon Glass <sjg at chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
---
Cc: Simon Glass <sjg at chromium.org>
Cc: Tom Rini <trini at konsulko.com>
---
V2: - Drop bogus comment
    - Add RB from Tom
---
 .gitlab-ci.yml | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 272d69e2206..3a2fd3dee08 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -76,10 +76,12 @@ stages:
       ./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID}
         ${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"}
         --build-dir "$UBOOT_TRAVIS_BUILD_DIR"
-    # It seems that the files in /tmp go away, so copy out what we need
-    - if [[ "${TEST_PY_BD}" == "coreboot" ]]; then
-        cp -v /tmp/coreboot/*.{html,css} .;
-      fi
+    - cp -v /tmp/${TEST_PY_BD}/*.{html,css} .
+  artifacts:
+    paths:
+      - "*.html"
+      - "*.css"
+    expire_in: 1 week
 
 build all 32bit ARM platforms:
   stage: world build
@@ -454,9 +456,4 @@ coreboot test.py:
     TEST_PY_BD: "coreboot"
     TEST_PY_TEST_SPEC: "not sleep"
     TEST_PY_ID: "--id qemu"
-  artifacts:
-    paths:
-      - "*.html"
-      - "*.css"
-    expire_in: 1 week
   <<: *buildman_and_testpy_dfn
-- 
2.39.2



More information about the U-Boot mailing list