block-snapshot: set qubes.xml path for test VMs

Since it is running with totally different environment, QUBES_XML_PATH
isn't passed from test runner. Apply heuristic based on VM name.
This commit is contained in:
Marek Marczykowski-Górecki 2016-08-09 04:22:48 +02:00
parent f17f80ee9d
commit d954bb82a3
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -251,6 +251,10 @@ case "$command" in
domain=$(cat "$HOTPLUG_STORE-domain")
if [ "$domain" ]; then
# Dont stop on errors
if [ -r /var/lib/qubes/qubes-test.xml -a \
"${domain#test-}" != "$domain" ]; then
export QUBES_XML_PATH=/var/lib/qubes/qubes-test.xml
fi
/usr/bin/qvm-template-commit --offline-mode "$domain" || true
fi
fi