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>
This commit is contained in:
parent
3650cb941f
commit
31bc1c80ab
@ -27,6 +27,12 @@ endif
|
|||||||
|
|
||||||
virtme_run = find_program('virtme-run.sh')
|
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
|
foreach test_case: privileged_tests
|
||||||
test('kvm-' + test_case['name'], virtme_run,
|
test('kvm-' + test_case['name'], virtme_run,
|
||||||
suite: ['core', 'mutter/kvm', 'mutter/kvm/' + test_case['suite']],
|
suite: ['core', 'mutter/kvm', 'mutter/kvm/' + test_case['suite']],
|
||||||
@ -34,12 +40,14 @@ foreach test_case: privileged_tests
|
|||||||
kernel_image_target,
|
kernel_image_target,
|
||||||
],
|
],
|
||||||
workdir: mutter_srcdir,
|
workdir: mutter_srcdir,
|
||||||
|
env: test_env,
|
||||||
args: [
|
args: [
|
||||||
kernel_image_path,
|
kernel_image_path,
|
||||||
meta_dbus_runner.full_path(),
|
meta_dbus_runner.full_path(),
|
||||||
'--kvm',
|
'--kvm',
|
||||||
test_case['executable'].full_path(),
|
test_case['executable'].full_path(),
|
||||||
meson.current_build_dir(),
|
meson.current_build_dir(),
|
||||||
|
vm_env,
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
endforeach
|
endforeach
|
||||||
|
@ -8,6 +8,7 @@ WRAPPER="$2"
|
|||||||
WRAPPER_ARGS="$3"
|
WRAPPER_ARGS="$3"
|
||||||
TEST_EXECUTABLE="$4"
|
TEST_EXECUTABLE="$4"
|
||||||
TEST_BUILD_DIR="$5"
|
TEST_BUILD_DIR="$5"
|
||||||
|
VM_ENV="$6"
|
||||||
|
|
||||||
TEST_RESULT_FILE=$(mktemp -p "$TEST_BUILD_DIR" -t test-result-XXXXXX)
|
TEST_RESULT_FILE=$(mktemp -p "$TEST_BUILD_DIR" -t test-result-XXXXXX)
|
||||||
echo 1 > "$TEST_RESULT_FILE"
|
echo 1 > "$TEST_RESULT_FILE"
|
||||||
@ -16,6 +17,7 @@ VIRTME_ENV="\
|
|||||||
HOME=$HOME \
|
HOME=$HOME \
|
||||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH \
|
LD_LIBRARY_PATH=$LD_LIBRARY_PATH \
|
||||||
XDG_DATA_DIRS=$XDG_DATA_DIRS \
|
XDG_DATA_DIRS=$XDG_DATA_DIRS \
|
||||||
|
$VM_ENV \
|
||||||
"
|
"
|
||||||
|
|
||||||
virtme-run \
|
virtme-run \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user