diff --git a/src/tests/kvm/run-kvm-test.sh b/src/tests/kvm/run-kvm-test.sh index 3f022d147..974ff75ea 100755 --- a/src/tests/kvm/run-kvm-test.sh +++ b/src/tests/kvm/run-kvm-test.sh @@ -5,7 +5,6 @@ set -e WRAPPER="$1" WRAPPER_ARGS="$2" TEST_RESULT="$3" -TEST_EXECUTABLE="$4" export XDG_RUNTIME_DIR="/tmp/sub-runtime-dir-$UID" export GSETTINGS_SCHEMA_DIR="$PWD/build/data" @@ -18,6 +17,6 @@ mkdir -p -m 700 $XDG_RUNTIME_DIR glib-compile-schemas $GSETTINGS_SCHEMA_DIR -"$WRAPPER" $WRAPPER_ARGS "$TEST_EXECUTABLE" +"$WRAPPER" $WRAPPER_ARGS "${@:4}" echo $? > $TEST_RESULT diff --git a/src/tests/kvm/virtme-run.sh b/src/tests/kvm/virtme-run.sh index 191493258..e41d21c77 100755 --- a/src/tests/kvm/virtme-run.sh +++ b/src/tests/kvm/virtme-run.sh @@ -8,7 +8,6 @@ WRAPPER="$2" WRAPPER_ARGS="$3" TEST_BUILD_DIR="$4" VM_ENV="$5" -TEST_EXECUTABLE="$6" TEST_RESULT_FILE=$(mktemp -p "$TEST_BUILD_DIR" -t test-result-XXXXXX) echo 1 > "$TEST_RESULT_FILE" @@ -30,12 +29,19 @@ if [[ "$(stat -c '%t:%T' -L /proc/$$/fd/0)" == "0:0" ]]; then rm -f $XDG_RUNTIME_DIR/fake-stdin.$$ fi +SCRIPT="\ + env $VIRTME_ENV $DIRNAME/run-kvm-test.sh \ + \\\"$WRAPPER\\\" \\\"$WRAPPER_ARGS\\\" \ + \\\"$TEST_RESULT_FILE\\\" \ + $(printf "\"%s\" " "${@:6}")\ +" + virtme-run \ --memory=256M \ --rw \ --pwd \ --kimg "$IMAGE" \ - --script-sh "sh -c \"env $VIRTME_ENV $DIRNAME/run-kvm-test.sh \\\"$WRAPPER\\\" \\\"$WRAPPER_ARGS\\\" \\\"$TEST_RESULT_FILE\\\" \\\"$TEST_EXECUTABLE\\\"\"" \ + --script-sh "sh -c \"$SCRIPT\"" \ --qemu-opts -cpu host,pdcm=off -smp 2 TEST_RESULT="$(cat "$TEST_RESULT_FILE")"