From a593b7fa9b4aa3c905198a9fdbaf83c0b953aee9 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Tue, 9 Jan 2024 14:19:06 -0500 Subject: [PATCH] lava: Upload artifacts as a separate test Change-Id: I6736aa3d1e807ef26451008cc5e2ec2f6aa93de8 Signed-off-by: Kienan Stewart --- lava/system-tests/kernel-tests.yml | 2 -- lava/system-tests/perf-tests.yml | 2 -- lava/system-tests/upload-artifacts.yml | 11 +++++++++++ scripts/system-tests/run-test-suites.sh | 2 +- scripts/system-tests/template_lava_job.jinja2 | 10 ++++++++++ 5 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 lava/system-tests/upload-artifacts.yml diff --git a/lava/system-tests/kernel-tests.yml b/lava/system-tests/kernel-tests.yml index 07275eb..9610587 100644 --- a/lava/system-tests/kernel-tests.yml +++ b/lava/system-tests/kernel-tests.yml @@ -20,5 +20,3 @@ run: - lava-test-case run-tests --shell "$(dirs -l +1)/ci/scripts/system-tests/run-test-suites.sh ${LTTNG_VERSION_STRING}" - systemctl start systemd-timesyncd.service - popd - - tar czf coredump.tar.gz /tmp/coredump - - ./ci/lava/upload_artifact.sh coredump.tar.gz coredump.tar.gz "results/${JENKINS_BUILD_ID}/${TESTRUN_ID}-coredump.tar.gz" diff --git a/lava/system-tests/perf-tests.yml b/lava/system-tests/perf-tests.yml index 6cd2e4e..a4e1068 100644 --- a/lava/system-tests/perf-tests.yml +++ b/lava/system-tests/perf-tests.yml @@ -20,5 +20,3 @@ run: #Need to check if the file is present for branches where the testcase was not backported - lava-test-case run-tests --shell "if [ -e perf_regression ]; then prove --nocolor --verbose --merge --exec '' - < perf_regression; else echo 'perf_regression not found'; fi" - popd - - tar czf coredump.tar.gz /tmp/coredump - - ./ci/lava/upload_artifact.sh coredump.tar.gz coredump.tar.gz "results/${JENKINS_BUILD_ID}/${TESTRUN_ID}-coredump.tar.gz" diff --git a/lava/system-tests/upload-artifacts.yml b/lava/system-tests/upload-artifacts.yml new file mode 100644 index 0000000..f03ffac --- /dev/null +++ b/lava/system-tests/upload-artifacts.yml @@ -0,0 +1,11 @@ +metadata: + format: Lava-Test Test Definition 1.0 + name: lttng-upload-artifacts + description: "Upload build artifacts" +params: + JENKINS_BUILD_ID: "invalid_jenkins_build_id" +run: + steps: + - git clone "${CI_REPO}" --branch="${CI_BRANCH}" ci + - tar czf coredump.tar.gz /tmp/coredump + - ./ci/lava/upload_artifact.sh coredump.tar.gz "results/${JENKINS_BUILD_ID}/${TESTRUN_ID}-coredump.tar.gz" diff --git a/scripts/system-tests/run-test-suites.sh b/scripts/system-tests/run-test-suites.sh index 2637bc4..90c4754 100755 --- a/scripts/system-tests/run-test-suites.sh +++ b/scripts/system-tests/run-test-suites.sh @@ -73,7 +73,7 @@ failed_tests=0 export LTTNG_ENABLE_DESTRUCTIVE_TESTS="will-break-my-system" -make --keep-going check || failed_tests=1 +timeout 90m make --keep-going check || failed_tests=1 if [ -f "./tests/root_regression" ]; then cd "./tests" || exit 1 diff --git a/scripts/system-tests/template_lava_job.jinja2 b/scripts/system-tests/template_lava_job.jinja2 index ed60cf1..865cf1a 100644 --- a/scripts/system-tests/template_lava_job.jinja2 +++ b/scripts/system-tests/template_lava_job.jinja2 @@ -119,3 +119,13 @@ actions: CI_REPO: {{ ci_repo }} CI_BRANCH: {{ ci_branch }} {% endif %} + - repository: {{ ci_repo }} + from: git + branch: {{ ci_branch }} + path: lava/system-tests/upload-artifacts.yml + name: upload-artifacts + params: + LTTNG_VERSION_STRING: {{ lttng_version_string }} + JENKINS_BUILD_ID: {{ jenkins_build_id }} + CI_REPO: {{ ci_repo }} + CI_BRANCH: {{ ci_branch }} -- 2.34.1