From ceac45b01235d8603d43e5e071fe9a90bd4d8205 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Mon, 5 Nov 2018 10:40:16 -0500 Subject: [PATCH] Use venv for submit script Enable the use of yaml Signed-off-by: Jonathan Rajotte --- scripts/system-tests/run-baremetal-benchmarks.sh | 12 ++++++++++-- scripts/system-tests/run-baremetal-tests.sh | 12 ++++++++++-- scripts/system-tests/run-kvm-fuzzing-tests.sh | 12 ++++++++++-- scripts/system-tests/run-kvm-tests.sh | 12 ++++++++++-- 4 files changed, 40 insertions(+), 8 deletions(-) diff --git a/scripts/system-tests/run-baremetal-benchmarks.sh b/scripts/system-tests/run-baremetal-benchmarks.sh index 750ac8c..7106afd 100644 --- a/scripts/system-tests/run-baremetal-benchmarks.sh +++ b/scripts/system-tests/run-baremetal-benchmarks.sh @@ -16,7 +16,13 @@ echo 'At this point, we built the modules and kernel if we needed to.' echo 'We can now launch the lava job using those artefacts' -python3 -u "$LTTNG_CI_PATH"/scripts/system-tests/lava-submit.py \ + +venv=$(mktemp -d) +virtualenv -p python3 "$venv" +source "${venv}/bin/activate" +pip install pyyaml + +python -u "$LTTNG_CI_PATH"/scripts/system-tests/lava-submit.py \ -t baremetal-benchmarks \ -j "$JOB_NAME" \ -k "$STORAGE_KERNEL_IMAGE" \ @@ -24,13 +30,15 @@ python3 -u "$LTTNG_CI_PATH"/scripts/system-tests/lava-submit.py \ -lm "$STORAGE_LTTNG_MODULES" \ -tc "$LTTNG_TOOLS_COMMIT_ID" -python3 -u "$LTTNG_CI_PATH"/scripts/system-tests/lava2-submit.py \ +python -u "$LTTNG_CI_PATH"/scripts/system-tests/lava2-submit.py \ -t baremetal-benchmarks \ -j "$JOB_NAME" \ -k "$S3_URL_KERNEL_IMAGE" \ -km "$S3_URL_LINUX_MODULES" \ -lm "$S3_URL_LTTNG_MODULES" \ -tc "$LTTNG_TOOLS_COMMIT_ID" +deactivate +rm -rf "$venv" # Create a results folder for this job RESULT_STORAGE_FOLDER="$BASE_STORAGE_FOLDER/benchmark-results/$JOB_NAME/$BUILD_NUMBER" diff --git a/scripts/system-tests/run-baremetal-tests.sh b/scripts/system-tests/run-baremetal-tests.sh index fe60bc4..3d60872 100644 --- a/scripts/system-tests/run-baremetal-tests.sh +++ b/scripts/system-tests/run-baremetal-tests.sh @@ -16,7 +16,13 @@ echo 'At this point, we built the modules and kernel if we needed to.' echo 'We can now launch the lava job using those artefacts' -python3 -u "$LTTNG_CI_PATH"/scripts/system-tests/lava-submit.py \ + +venv=$(mktemp -d) +virtualenv -p python3 "$venv" +source "${venv}/bin/activate" +pip install pyyaml + +python -u "$LTTNG_CI_PATH"/scripts/system-tests/lava-submit.py \ -t baremetal-tests \ -j "$JOB_NAME" \ -k "$STORAGE_KERNEL_IMAGE" \ @@ -25,7 +31,7 @@ python3 -u "$LTTNG_CI_PATH"/scripts/system-tests/lava-submit.py \ -tc "$LTTNG_TOOLS_COMMIT_ID" \ -uc "$LTTNG_UST_COMMIT_ID" -python3 -u "$LTTNG_CI_PATH"/scripts/system-tests/lava2-submit.py \ +python -u "$LTTNG_CI_PATH"/scripts/system-tests/lava2-submit.py \ -t baremetal-tests \ -j "$JOB_NAME" \ -k "$S3_URL_KERNEL_IMAGE" \ @@ -33,3 +39,5 @@ python3 -u "$LTTNG_CI_PATH"/scripts/system-tests/lava2-submit.py \ -lm "$S3_URL_LTTNG_MODULES" \ -tc "$LTTNG_TOOLS_COMMIT_ID" \ -uc "$LTTNG_UST_COMMIT_ID" +deactivate +rm -rf "$venv" diff --git a/scripts/system-tests/run-kvm-fuzzing-tests.sh b/scripts/system-tests/run-kvm-fuzzing-tests.sh index 1fea8a3..13e5acf 100644 --- a/scripts/system-tests/run-kvm-fuzzing-tests.sh +++ b/scripts/system-tests/run-kvm-fuzzing-tests.sh @@ -16,7 +16,13 @@ echo 'At this point, we built the modules and kernel if we needed to.' echo 'We can now launch the lava job using those artefacts' -python3 -u "$LTTNG_CI_PATH"/scripts/system-tests/lava-submit.py \ + +venv=$(mktemp -d) +virtualenv -p python3 "$venv" +source "${venv}/bin/activate" +pip install pyyaml + +python -u "$LTTNG_CI_PATH"/scripts/system-tests/lava-submit.py \ -t kvm-fuzzing-tests \ -j "$JOB_NAME" \ -k "$STORAGE_KERNEL_IMAGE" \ @@ -25,7 +31,7 @@ python3 -u "$LTTNG_CI_PATH"/scripts/system-tests/lava-submit.py \ -tc "$LTTNG_TOOLS_COMMIT_ID" \ -uc "$LTTNG_UST_COMMIT_ID" -python3 -u "$LTTNG_CI_PATH"/scripts/system-tests/lava2-submit.py \ +python -u "$LTTNG_CI_PATH"/scripts/system-tests/lava2-submit.py \ -t kvm-fuzzing-tests \ -j "$JOB_NAME" \ -k "$S3_URL_KERNEL_IMAGE" \ @@ -33,3 +39,5 @@ python3 -u "$LTTNG_CI_PATH"/scripts/system-tests/lava2-submit.py \ -lm "$S3_URL_LTTNG_MODULES" \ -tc "$LTTNG_TOOLS_COMMIT_ID" \ -uc "$LTTNG_UST_COMMIT_ID" \ +deactivate +rm -rf "$venv" diff --git a/scripts/system-tests/run-kvm-tests.sh b/scripts/system-tests/run-kvm-tests.sh index da80391..57f462d 100644 --- a/scripts/system-tests/run-kvm-tests.sh +++ b/scripts/system-tests/run-kvm-tests.sh @@ -16,7 +16,13 @@ echo 'At this point, we built the modules and kernel if we needed to.' echo 'We can now launch the lava job using those artefacts' -python3 -u "$LTTNG_CI_PATH"/scripts/system-tests/lava-submit.py \ + +venv=$(mktemp -d) +virtualenv -p python3 "$venv" +source "${venv}/bin/activate" +pip install pyyaml + +python -u "$LTTNG_CI_PATH"/scripts/system-tests/lava-submit.py \ -t kvm-tests \ -j "$JOB_NAME" \ -k "$STORAGE_KERNEL_IMAGE" \ @@ -25,7 +31,7 @@ python3 -u "$LTTNG_CI_PATH"/scripts/system-tests/lava-submit.py \ -tc "$LTTNG_TOOLS_COMMIT_ID" \ -uc "$LTTNG_UST_COMMIT_ID" -python3 -u "$LTTNG_CI_PATH"/scripts/system-tests/lava2-submit.py \ +python -u "$LTTNG_CI_PATH"/scripts/system-tests/lava2-submit.py \ -t kvm-tests \ -j "$JOB_NAME" \ -k "$S3_URL_KERNEL_IMAGE" \ @@ -33,3 +39,5 @@ python3 -u "$LTTNG_CI_PATH"/scripts/system-tests/lava2-submit.py \ -lm "$S3_URL_LTTNG_MODULES" \ -tc "$LTTNG_TOOLS_COMMIT_ID" \ -uc "$LTTNG_UST_COMMIT_ID" +deactivate +rm -rf "$venv" -- 2.34.1