From f87d8325d915e5b9ec6d1a4bd5fd8718b2a862a0 Mon Sep 17 00:00:00 2001 From: Diaa Sami Date: Tue, 7 Sep 2021 14:24:54 +0200 Subject: [PATCH] Allow running script locally without schutzbot --- test/cases/installers.sh | 4 ++++ tools/libvirt_test.sh | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/test/cases/installers.sh b/test/cases/installers.sh index 4dc4dd61d..8f8a45867 100755 --- a/test/cases/installers.sh +++ b/test/cases/installers.sh @@ -115,6 +115,10 @@ SSH_USER="admin" IMAGE_KEY="osbuild-composer-installer-test-${TEST_UUID}" GUEST_ADDRESS=192.168.100.50 +if [[ ${WORKSPACE:-empty} == empty ]]; then + WORKSPACE=$(mktemp -d) +fi + # Set up temporary files. TEMPDIR=$(mktemp -d) BLUEPRINT_FILE=${TEMPDIR}/blueprint.toml diff --git a/tools/libvirt_test.sh b/tools/libvirt_test.sh index 7ca4c4a69..bc75ebaa0 100755 --- a/tools/libvirt_test.sh +++ b/tools/libvirt_test.sh @@ -76,16 +76,16 @@ TEST_UUID=$(uuidgen) IMAGE_KEY=osbuild-composer-qemu-test-${TEST_UUID} INSTANCE_ADDRESS=192.168.100.50 +if [[ ${WORKSPACE:-empty} == empty ]]; then + WORKSPACE=$(mktemp -d) +fi + # Set up temporary files. TEMPDIR=$(mktemp -d) BLUEPRINT_FILE=${TEMPDIR}/blueprint.toml COMPOSE_START=${TEMPDIR}/compose-start-${IMAGE_KEY}.json COMPOSE_INFO=${TEMPDIR}/compose-info-${IMAGE_KEY}.json -if [[ ${WORKSPACE:-empty} == empty ]]; then - WORKSPACE=$(mktemp -d) -fi - SSH_DATA_DIR=$(/usr/libexec/osbuild-composer-test/gen-ssh.sh) SSH_KEY=${SSH_DATA_DIR}/id_rsa