From 28ae89fae30467c512785a5c416d1793c63bc31c Mon Sep 17 00:00:00 2001 From: Wen Ping Teh Date: Wed, 4 Sep 2024 12:17:05 +0100 Subject: [PATCH 1/2] ci/test-count: Add test count in CI Add a CI job to count the number of test run by CI. The tests counted are unit tests and scmi-tests. The test-count job will run on the daily pipeline. Signed-off-by: Wen Ping Teh --- .gitlab/pipelines/daily-pipeline.yml | 9 +++++++++ .gitlab/templates/test-count.yml | 22 ++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 .gitlab/templates/test-count.yml diff --git a/.gitlab/pipelines/daily-pipeline.yml b/.gitlab/pipelines/daily-pipeline.yml index 063f241e0..c00b14d3a 100644 --- a/.gitlab/pipelines/daily-pipeline.yml +++ b/.gitlab/pipelines/daily-pipeline.yml @@ -22,6 +22,7 @@ include: - local: .gitlab/templates/scmi-test.yml - local: .gitlab/templates/platform-test.yml - local: .gitlab/templates/merge-report.yml + - local: .gitlab/templates/test-count.yml check-lint: extends: .check-lint @@ -84,3 +85,11 @@ merge-all-coverage: - check-ut - scmi-test - fvp-boot-test + +test-count: + extends: .test-count + stage: coverage-report + allow_failure: true + dependencies: + - check-ut + - scmi-test diff --git a/.gitlab/templates/test-count.yml b/.gitlab/templates/test-count.yml new file mode 100644 index 000000000..1804837f5 --- /dev/null +++ b/.gitlab/templates/test-count.yml @@ -0,0 +1,22 @@ +# +# Arm SCP/MCP Software +# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# + +.test-count: + image: ${CI_REGISTRY_IMAGE}/ci-base + script: + - | + - /test_count_entrypoint.sh " + -ft artifacts/fwk_test.log + -ut artifacts/mod_test.log + -pt artifacts/prod_test.log + -s artifacts/ + -r ./artifacts/test_count_report.html" + artifacts: + when: on_success + expire_in: 2 days + paths: + - artifacts/test_count_report.html -- GitLab From f91795585faeacf99b0a3a04d60950cb1440d64c Mon Sep 17 00:00:00 2001 From: Wen Ping Teh Date: Wed, 4 Sep 2024 12:25:10 +0100 Subject: [PATCH 2/2] ci/unit-test: Update unit-test job to support test-count Copy unit-test output log into artifact to be used for test-count job. Signed-off-by: Wen Ping Teh --- .gitlab/templates/unit-test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab/templates/unit-test.yml b/.gitlab/templates/unit-test.yml index abe318a7d..0899eacf9 100644 --- a/.gitlab/templates/unit-test.yml +++ b/.gitlab/templates/unit-test.yml @@ -21,9 +21,11 @@ script: - echo "Unit test under test $SCP_UT_SUITE" - python3 tools/check_utest.py --suite $SCP_UT_SUITE --coverage + - cp build/*/test/Testing/Temporary/LastTest.log artifacts/${SCP_UT_SUITE}_test.log - cp build/*/test/scp_v2_*_test_coverage_filtered.info artifacts/coverage_reports artifacts: when: on_success expire_in: 2 days paths: + - artifacts/*_test.log - artifacts/coverage_reports -- GitLab