[mutter] tests/kvm: Pass test executable last



commit 2df9ccd59823c52879b5c660dde6cfec480af305
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu Aug 4 12:47:14 2022 +0200

    tests/kvm: Pass test executable last
    
    This is in preparation to pass an arbitrary command with arguments.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2561>

 src/tests/kvm/meson.build     | 2 +-
 src/tests/kvm/run-kvm-test.sh | 4 ++--
 src/tests/kvm/virtme-run.sh   | 8 ++++----
 3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/tests/kvm/meson.build b/src/tests/kvm/meson.build
index 1d1b847f66..247bdf3574 100644
--- a/src/tests/kvm/meson.build
+++ b/src/tests/kvm/meson.build
@@ -45,9 +45,9 @@ foreach test_case: privileged_tests
       kernel_image_path,
       meta_dbus_runner.full_path(),
       '--kvm',
-      test_case['executable'].full_path(),
       meson.current_build_dir(),
       vm_env,
+      test_case['executable'].full_path(),
     ],
     is_parallel: false,
   )
diff --git a/src/tests/kvm/run-kvm-test.sh b/src/tests/kvm/run-kvm-test.sh
index a6fa901ec4..3f022d1479 100755
--- a/src/tests/kvm/run-kvm-test.sh
+++ b/src/tests/kvm/run-kvm-test.sh
@@ -4,8 +4,8 @@ set -e
 
 WRAPPER="$1"
 WRAPPER_ARGS="$2"
-TEST_EXECUTABLE="$3"
-TEST_RESULT="$4"
+TEST_RESULT="$3"
+TEST_EXECUTABLE="$4"
 
 export XDG_RUNTIME_DIR="/tmp/sub-runtime-dir-$UID"
 export GSETTINGS_SCHEMA_DIR="$PWD/build/data"
diff --git a/src/tests/kvm/virtme-run.sh b/src/tests/kvm/virtme-run.sh
index 7d2929bb15..191493258b 100755
--- a/src/tests/kvm/virtme-run.sh
+++ b/src/tests/kvm/virtme-run.sh
@@ -6,9 +6,9 @@ DIRNAME="$(dirname "$0")"
 IMAGE="$1"
 WRAPPER="$2"
 WRAPPER_ARGS="$3"
-TEST_EXECUTABLE="$4"
-TEST_BUILD_DIR="$5"
-VM_ENV="$6"
+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"
@@ -35,7 +35,7 @@ virtme-run \
   --rw \
   --pwd \
   --kimg "$IMAGE" \
-  --script-sh "sh -c \"env $VIRTME_ENV $DIRNAME/run-kvm-test.sh \\\"$WRAPPER\\\" \\\"$WRAPPER_ARGS\\\" 
\\\"$TEST_EXECUTABLE\\\" \\\"$TEST_RESULT_FILE\\\"\"" \
+  --script-sh "sh -c \"env $VIRTME_ENV $DIRNAME/run-kvm-test.sh \\\"$WRAPPER\\\" \\\"$WRAPPER_ARGS\\\" 
\\\"$TEST_RESULT_FILE\\\" \\\"$TEST_EXECUTABLE\\\"\"" \
   --qemu-opts -cpu host,pdcm=off -smp 2
 
 TEST_RESULT="$(cat "$TEST_RESULT_FILE")"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]