From 81f65a3a2c5f4d1a5e8d74a4525181d8ae7d5408 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Fri, 2 Apr 2021 11:11:10 +0100 Subject: [PATCH] tests: libvirt: Catch issues with incorrect /var and /etc in package. * gnu/tests/virtualization.scm (run-libvirt-test): Chdir to "/tmp" before running test. Add "connect" test. --- gnu/tests/virtualization.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gnu/tests/virtualization.scm b/gnu/tests/virtualization.scm index e95787ee19..9f9d3a5e26 100644 --- a/gnu/tests/virtualization.scm +++ b/gnu/tests/virtualization.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2017 Christopher Baines ;;; Copyright © 2020 Ludovic Courtès ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2021 Pierre Langlois ;;; ;;; This file is part of GNU Guix. ;;; @@ -92,10 +93,20 @@ (define marionette 0 (marionette-eval `(begin + (chdir "/tmp") (system* ,(string-append #$libvirt "/bin/virsh") "-c" "qemu:///system" "version")) marionette)) + (test-eq "connect" + 0 + (marionette-eval + `(begin + (chdir "/tmp") + (system* ,(string-append #$libvirt "/bin/virsh") + "-c" "qemu:///system" "connect")) + marionette)) + (test-end) (exit (= (test-runner-fail-count (test-runner-current)) 0)))))