[mutter] tests/kvm: Forward the test environment variables to the VM
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] tests/kvm: Forward the test environment variables to the VM
- Date: Mon, 28 Mar 2022 16:41:22 +0000 (UTC)
commit 31bc1c80abb30a6d1a4f5890b74cffbe30222d07
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Wed Feb 9 10:47:50 2022 +0100
tests/kvm: Forward the test environment variables to the VM
This will help with finding the right libdefault.so and correctly setup
the GLib test framework.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2152>
src/tests/kvm/meson.build | 8 ++++++++
src/tests/kvm/virtme-run.sh | 2 ++
2 files changed, 10 insertions(+)
---
diff --git a/src/tests/kvm/meson.build b/src/tests/kvm/meson.build
index ec5f6a084b..bdd74ff54a 100644
--- a/src/tests/kvm/meson.build
+++ b/src/tests/kvm/meson.build
@@ -27,6 +27,12 @@ endif
virtme_run = find_program('virtme-run.sh')
+vm_env_entries = []
+foreach name, value: test_env_variables
+ vm_env_entries += ['@0@=@1@'.format(name, value)]
+endforeach
+vm_env = ' '.join(vm_env_entries)
+
foreach test_case: privileged_tests
test('kvm-' + test_case['name'], virtme_run,
suite: ['core', 'mutter/kvm', 'mutter/kvm/' + test_case['suite']],
@@ -34,12 +40,14 @@ foreach test_case: privileged_tests
kernel_image_target,
],
workdir: mutter_srcdir,
+ env: test_env,
args: [
kernel_image_path,
meta_dbus_runner.full_path(),
'--kvm',
test_case['executable'].full_path(),
meson.current_build_dir(),
+ vm_env,
]
)
endforeach
diff --git a/src/tests/kvm/virtme-run.sh b/src/tests/kvm/virtme-run.sh
index eb62a67981..ec05f913c8 100755
--- a/src/tests/kvm/virtme-run.sh
+++ b/src/tests/kvm/virtme-run.sh
@@ -8,6 +8,7 @@ WRAPPER="$2"
WRAPPER_ARGS="$3"
TEST_EXECUTABLE="$4"
TEST_BUILD_DIR="$5"
+VM_ENV="$6"
TEST_RESULT_FILE=$(mktemp -p "$TEST_BUILD_DIR" -t test-result-XXXXXX)
echo 1 > "$TEST_RESULT_FILE"
@@ -16,6 +17,7 @@ VIRTME_ENV="\
HOME=$HOME \
LD_LIBRARY_PATH=$LD_LIBRARY_PATH \
XDG_DATA_DIRS=$XDG_DATA_DIRS \
+$VM_ENV \
"
virtme-run \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]