gitlab: misc artifact / log handling fixes
cover gitlab: misc artifact / log handling fixes
Daniel P. Berrangé (4):
gitlab: replace avocado results files with meson results files
gitlab: always include entire of meson-logs directory
gitlab: include all junit XML files from meson
gitlab: prevent duplicated meson log artifacts in test jobs
.gitlab-ci.d/buildtest-template.yml | 16 +++++++++++----- .gitlab-ci.d/buildtest.yml | 4 ++-- .gitlab-ci.d/crossbuild-template.yml | 4 ++-- .gitlab-ci.d/custom-runners.yml | 2 +- .gitlab-ci.d/windows.yml | 4 ++-- 5 files changed, 18 insertions(+), 12 deletions(-)
Signature · 1 line
2.50.1
PATCH 1/4 gitlab: replace avocado results files with meson results files
The 'results.xml' file and 'test-results' directory were both outputs of the avovcado test runner. Since we're now using meson with the new functional test framework, we must reference meson results files as the CI artifacts.
--- .gitlab-ci.d/buildtest-template.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
.gitlab-ci.d/buildtest-template.yml +2 -3
@@ -104,11 +104,10 @@ when: always expire_in: 7 days paths: - - build/tests/results/latest/results.xml - - build/tests/results/latest/test-results + - build/meson-logs/testlog.txt - build/tests/functional/*/*/*.log reports: - junit: build/tests/results/latest/results.xml + junit: build/meson-logs/testlog.junit.xml before_script: - export QEMU_TEST_ALLOW_UNTRUSTED_CODE=1 - export QEMU_TEST_CACHE_DIR=${CI_PROJECT_DIR}/functional-cache
Signature · 1 line
2.50.1
Re: [PATCH 1/4] gitlab: replace avocado results files with meson results files
Quoted 6 lines · Daniel P. Berrangé
The 'results.xml' file and 'test-results' directory were both outputs of the avovcado test runner. Since we're now using meson with the new functional test framework, we must reference meson results files as the CI artifacts.
Signed-off-by Daniel P. Berrangé <[email protected]>
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro
PATCH 2/4 gitlab: always include entire of meson-logs directory
In reply to Daniel P. BerrangéThere are files besides testlog.txt that may be useful as published CI artifacts.
--- .gitlab-ci.d/buildtest-template.yml | 4 ++-- .gitlab-ci.d/buildtest.yml | 2 +- .gitlab-ci.d/crossbuild-template.yml | 2 +- .gitlab-ci.d/windows.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)
.gitlab-ci.d/buildtest-template.yml +2 -2
@@ -88,7 +88,7 @@ when: always expire_in: 7 days paths: - - build/meson-logs/testlog.txt + - build/meson-logs reports: junit: build/meson-logs/testlog.junit.xml
@@ -104,7 +104,7 @@ when: always expire_in: 7 days paths: - - build/meson-logs/testlog.txt + - build/meson-logs - build/tests/functional/*/*/*.log reports: junit: build/meson-logs/testlog.junit.xml
.gitlab-ci.d/buildtest.yml +1 -1
@@ -613,7 +613,7 @@ gcov: when: always expire_in: 2 days paths: - - build/meson-logs/testlog.txt + - build/meson-logs reports: junit: build/meson-logs/testlog.junit.xml coverage_report:
.gitlab-ci.d/crossbuild-template.yml +1 -1
@@ -128,6 +128,6 @@ when: always expire_in: 7 days paths: - - build/meson-logs/testlog.txt + - build/meson-logs reports: junit: build/meson-logs/testlog.junit.xml
.gitlab-ci.d/windows.yml +1 -1
@@ -24,7 +24,7 @@ msys2-64bit: name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" expire_in: 7 days paths: - - build/meson-logs/testlog.txt + - build/meson-logs reports: junit: "build/meson-logs/testlog.junit.xml" before_script:
Signature · 1 line
2.50.1
Re: [PATCH 2/4] gitlab: always include entire of meson-logs directory
Quoted 4 lines · Daniel P. Berrangé
There are files besides testlog.txt that may be useful as published CI artifacts.
Signed-off-by Daniel P. Berrangé <[email protected]>
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro
PATCH 3/4 gitlab: include all junit XML files from meson
In reply to Daniel P. BerrangéThe junit XML file produced by meson does not always have the name 'testlog.junit.xml' - in the case of 'make check-functional' there is a 'testlog-thorough.junit.xml' file too.
Improve CI debugging robustness by capturing all junit files that meson produces.
--- .gitlab-ci.d/buildtest-template.yml | 4 ++-- .gitlab-ci.d/buildtest.yml | 2 +- .gitlab-ci.d/crossbuild-template.yml | 2 +- .gitlab-ci.d/custom-runners.yml | 2 +- .gitlab-ci.d/windows.yml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-)
.gitlab-ci.d/buildtest-template.yml +2 -2
@@ -90,7 +90,7 @@ paths: - build/meson-logs reports: - junit: build/meson-logs/testlog.junit.xml + junit: build/meson-logs/*.junit.xml .functional_test_job_template: extends: .common_test_job_template
@@ -107,7 +107,7 @@ - build/meson-logs - build/tests/functional/*/*/*.log reports: - junit: build/meson-logs/testlog.junit.xml + junit: build/meson-logs/*.junit.xml before_script: - export QEMU_TEST_ALLOW_UNTRUSTED_CODE=1 - export QEMU_TEST_CACHE_DIR=${CI_PROJECT_DIR}/functional-cache
.gitlab-ci.d/buildtest.yml +1 -1
@@ -615,7 +615,7 @@ gcov: paths: - build/meson-logs reports: - junit: build/meson-logs/testlog.junit.xml + junit: build/meson-logs/*.junit.xml coverage_report: coverage_format: cobertura path: build/coverage.xml
.gitlab-ci.d/crossbuild-template.yml +1 -1
@@ -130,4 +130,4 @@ paths: - build/meson-logs reports: - junit: build/meson-logs/testlog.junit.xml + junit: build/meson-logs/*.junit.xml
.gitlab-ci.d/custom-runners.yml +1 -1
@@ -26,7 +26,7 @@ - build/build.ninja - build/meson-logs reports: - junit: build/meson-logs/testlog.junit.xml + junit: build/meson-logs/*.junit.xml include: - local: '/.gitlab-ci.d/custom-runners/ubuntu-22.04-s390x.yml'
.gitlab-ci.d/windows.yml +1 -1
@@ -26,7 +26,7 @@ msys2-64bit: paths: - build/meson-logs reports: - junit: "build/meson-logs/testlog.junit.xml" + junit: build/meson-logs/*.junit.xml before_script: - Write-Output "Acquiring msys2.exe installer at $(Get-Date -Format u)" - If ( !(Test-Path -Path msys64\var\cache ) ) {
Signature · 1 line
2.50.1
Re: [PATCH 3/4] gitlab: include all junit XML files from meson
Quoted 8 lines · Daniel P. Berrangé
The junit XML file produced by meson does not always have the name 'testlog.junit.xml' - in the case of 'make check-functional' there is a 'testlog-thorough.junit.xml' file too.
Improve CI debugging robustness by capturing all junit files that meson produces.
Signed-off-by Daniel P. Berrangé <[email protected]>
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro
PATCH 4/4 gitlab: prevent duplicated meson log artifacts in test jobs
In reply to Daniel P. BerrangéThe build jobs will populate build/meson-logs/ with various files that are added as artifacts.
The test jobs preserve the state of the build jobs, so we must delete any pre-existing logs to prevent confusion from duplicate artifacts.
--- .gitlab-ci.d/buildtest-template.yml | 7 +++++++ 1 file changed, 7 insertions(+)
.gitlab-ci.d/buildtest-template.yml +7 -0
@@ -83,6 +83,10 @@ .native_test_job_template: extends: .common_test_job_template + before_script: + # Prevent logs from the build job that run earlier + # from being duplicated in the test job artifacts + - rm -f build/meson-logs/* artifacts: name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" when: always
@@ -111,6 +115,9 @@ before_script: - export QEMU_TEST_ALLOW_UNTRUSTED_CODE=1 - export QEMU_TEST_CACHE_DIR=${CI_PROJECT_DIR}/functional-cache + # Prevent logs from the build job that run earlier + # from being duplicated in the test job artifacts + - rm -f build/meson-logs/* after_script: - cd build - du -chs ${CI_PROJECT_DIR}/*-cache
Signature · 1 line
2.50.1
Re: [PATCH 4/4] gitlab: prevent duplicated meson log artifacts in test jobs
Quoted 6 lines · Daniel P. Berrangé
The build jobs will populate build/meson-logs/ with various files that are added as artifacts.
The test jobs preserve the state of the build jobs, so we must delete any pre-existing logs to prevent confusion from duplicate artifacts.
Will this cause us to rebuild needlessly?
Quoted 31 lines
Signed-off-by Daniel P. Berrangé <[email protected]>--- .gitlab-ci.d/buildtest-template.yml | 7 +++++++ 1 file changed, 7 insertions(+).gitlab-ci.d/buildtest-template.yml +7
-0@@ -83,6 +83,10 @@ .native_test_job_template: extends: .common_test_job_template + before_script: + # Prevent logs from the build job that run earlier + # from being duplicated in the test job artifacts + - rm -f build/meson-logs/* artifacts: name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" when: always@@ -111,6 +115,9 @@ before_script: - export QEMU_TEST_ALLOW_UNTRUSTED_CODE=1 - export QEMU_TEST_CACHE_DIR=${CI_PROJECT_DIR}/functional-cache + # Prevent logs from the build job that run earlier + # from being duplicated in the test job artifacts + - rm -f build/meson-logs/* after_script: - cd build - du -chs ${CI_PROJECT_DIR}/*-cache
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro
Re: [PATCH 4/4] gitlab: prevent duplicated meson log artifacts in test jobs
Quoted 10 lines · Alex Bennée
Quoted 6 lines · Daniel P. Berrangé
The build jobs will populate build/meson-logs/ with various files that are added as artifacts.
The test jobs preserve the state of the build jobs, so we must delete any pre-existing logs to prevent confusion from duplicate artifacts.
Will this cause us to rebuild needlessly?
These files aren't involved in any rebuild / stale checks & the test pipeline I ran show no difference in what was done.
Quoted 24 lines
Quoted 24 lines
Signed-off-by Daniel P. Berrangé <[email protected]>--- .gitlab-ci.d/buildtest-template.yml | 7 +++++++ 1 file changed, 7 insertions(+).gitlab-ci.d/buildtest-template.yml +4
-0@@ -83,6 +83,10 @@ .native_test_job_template: extends: .common_test_job_template + before_script: + # Prevent logs from the build job that run earlier + # from being duplicated in the test job artifacts + - rm -f build/meson-logs/* artifacts: name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" when: always@@ -111,6 +115,9 @@ before_script:
Quoted 13 lines
Quoted 8 lines
.gitlab-ci.d/buildtest-template.yml +3
-0- export QEMU_TEST_ALLOW_UNTRUSTED_CODE=1 - export QEMU_TEST_CACHE_DIR=${CI_PROJECT_DIR}/functional-cache + # Prevent logs from the build job that run earlier + # from being duplicated in the test job artifacts + - rm -f build/meson-logs/* after_script: - cd build - du -chs ${CI_PROJECT_DIR}/*-cacheSignature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro
With regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Re: [PATCH 4/4] gitlab: prevent duplicated meson log artifacts in test jobs
Quoted 6 lines · Daniel P. Berrangé
Quoted 5 lines · Alex Bennée
Quoted 3 lines · Daniel P. Berrangé
The build jobs will populate build/meson-logs/ with various files that are added as artifacts.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
The test jobs preserve the state of the build jobs, so we must delete any pre-existing logs to prevent confusion from duplicate artifacts.
Will this cause us to rebuild needlessly?
These files aren't involved in any rebuild / stale checks & the test pipeline I ran show no difference in what was done.
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro