From a4cc5ba999ec179e13551156a9829ffba76edadc Mon Sep 17 00:00:00 2001 From: Kristian Amlie Date: Tue, 30 Aug 2022 14:08:04 +0200 Subject: [PATCH] test: Fix several bugs in local test running. * Needs sudo to copy files to right locations. * Need to strip last component in target path to avoid subsequent runs ending up with copies one level deeper than they should be. Signed-off-by: Kristian Amlie --- scripts/test/run-tests.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/test/run-tests.sh b/scripts/test/run-tests.sh index d8cd972..efc6fa8 100755 --- a/scripts/test/run-tests.sh +++ b/scripts/test/run-tests.sh @@ -102,7 +102,7 @@ else if [ "$TEST_ALL" == "1" -o "$TEST_PLATFORM" == "ubuntu-qemux86-64" ]; then wget --progress=dot:giga -N ${UBUNTU_IMAGE_URL} -P input/image/ mkdir -p input/tests - cp -r "tests/ssh-public-key-overlay" "input/tests/ssh-public-key-overlay" + sudo cp -r "tests/ssh-public-key-overlay" "input/tests/" convert_and_test "qemux86-64" \ "release-1" \ "input/image/Ubuntu-Focal-x86-64.img.gz" \ @@ -126,7 +126,7 @@ else if [ "$TEST_ALL" == "1" -o "$TEST_PLATFORM" == "ubuntu-qemux86-64-no-grub-d" ]; then wget --progress=dot:giga -N ${UBUNTU_IMAGE_URL} -P input/image/ mkdir -p input/tests - cp -r "tests/ssh-public-key-overlay" "input/tests/ssh-public-key-overlay" + sudo cp -r "tests/ssh-public-key-overlay" "input/tests/" QEMU_NO_SECURE_BOOT=1 \ convert_and_test \ "qemux86-64" \ @@ -185,7 +185,7 @@ else if [ "$TEST_ALL" == "1" -o "$TEST_PLATFORM" == "debian-qemux86-64" ]; then wget --progress=dot:giga -N ${DEBIAN_IMAGE_URL} -P input/image/ mkdir -p input/tests - cp -r "tests/ssh-public-key-overlay" "input/tests/ssh-public-key-overlay" + sudo cp -r "tests/ssh-public-key-overlay" "input/tests/" convert_and_test "qemux86-64" \ "release-1" \ "input/image/Debian-11-x86-64.img.gz" \