From: Jonathan Rajotte Date: Mon, 5 Nov 2018 15:40:16 +0000 (-0500) Subject: Use venv for submit script X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ceac45b01235d8603d43e5e071fe9a90bd4d8205;p=lttng-ci.git Use venv for submit script Enable the use of yaml Signed-off-by: Jonathan Rajotte --- 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"