Use venv for submit script
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 5 Nov 2018 15:40:16 +0000 (10:40 -0500)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 5 Nov 2018 15:40:16 +0000 (10:40 -0500)
Enable the use of yaml

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
scripts/system-tests/run-baremetal-benchmarks.sh
scripts/system-tests/run-baremetal-tests.sh
scripts/system-tests/run-kvm-fuzzing-tests.sh
scripts/system-tests/run-kvm-tests.sh

index 750ac8ccc8cad5b083f7c80be1896e819586d113..7106afdf9f1476ec1e7449bc0029be8bf6400968 100644 (file)
 
 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"
index fe60bc4952f3c40caf7c2ca77cf46fecf51f6a4d..3d60872c42a07cd1338cbc522a57f3e48e6fdd3d 100644 (file)
 
 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"
index 1fea8a376a6eaf76143d68bf46b0a47dc70c2b3c..13e5acff74527687a8d1f1fa92ab5d19363ebe27 100644 (file)
 
 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"
index da803917c7ab0bc30ba3d9e3dd4cbcf6ad06af74..57f462dfd7f3ae70f8ae512b9c3f91901e8ab807 100644 (file)
 
 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"
This page took 0.025739 seconds and 4 git commands to generate.