Browse Source

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 <kristian.amlie@northern.tech>
create-pull-request/patch
Kristian Amlie 2 years ago
parent
commit
a4cc5ba999
No known key found for this signature in database GPG Key ID: F464407C996AF03F
  1. 6
      scripts/test/run-tests.sh

6
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" \

Loading…
Cancel
Save