From d954bb82a33a7d845c3d98657ec9890a6ea56fc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 9 Aug 2016 04:22:48 +0200 Subject: [PATCH] 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. --- linux/system-config/block-snapshot | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux/system-config/block-snapshot b/linux/system-config/block-snapshot index 4f0b80c2..840753e6 100755 --- a/linux/system-config/block-snapshot +++ b/linux/system-config/block-snapshot @@ -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