summaryrefslogtreecommitdiffstats
path: root/rescue/Makefile.am
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-09-04 14:02:58 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-09-04 14:43:26 +0100
commit05beac65e58ef20899c7a50888a2854c07f83db9 (patch)
tree9d6047bfa61a75a026523bc69226d37f01829596 /rescue/Makefile.am
parent8248a346d71ed7fc964595f6e973ff6593cdc217 (diff)
downloadlibguestfs-05beac65e58ef20899c7a50888a2854c07f83db9.tar.gz
libguestfs-05beac65e58ef20899c7a50888a2854c07f83db9.tar.xz
libguestfs-05beac65e58ef20899c7a50888a2854c07f83db9.zip
rescue: Add an expect-driven test for the virt-rescue command.
This command was not tested at all. As a result we didn't notice that it was broken for a long time (RHBZ#853159). This adds a test that drives the command through a pty. It uses the perl 'Expect' module, although this is not required.
Diffstat (limited to 'rescue/Makefile.am')
-rw-r--r--rescue/Makefile.am9
1 files changed, 9 insertions, 0 deletions
diff --git a/rescue/Makefile.am b/rescue/Makefile.am
index d0b23cae..6e775d09 100644
--- a/rescue/Makefile.am
+++ b/rescue/Makefile.am
@@ -18,6 +18,7 @@
include $(top_srcdir)/subdir-rules.mk
EXTRA_DIST = \
+ test-virt-rescue.pl \
virt-rescue.pod
CLEANFILES = stamp-virt-rescue.pod
@@ -63,3 +64,11 @@ stamp-virt-rescue.pod: virt-rescue.pod
--license GPLv2+ \
$<
touch $@
+
+# Tests.
+
+TESTS_ENVIRONMENT = $(top_builddir)/run --test
+
+if ENABLE_APPLIANCE
+TESTS = test-virt-rescue.pl
+endif ENABLE_APPLIANCE