diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-11-12 20:10:55 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-11-13 15:26:29 +0000 |
commit | ab360c48d4bf6ddb3f14c0f2434e235dfea3a184 (patch) | |
tree | 13ff736449d581370701d5ae5a45b819690aebe4 | |
parent | ac2ddfd90a7f5f424b19fbfbfb06d4dfff0547fa (diff) | |
download | libguestfs-ab360c48d4bf6ddb3f14c0f2434e235dfea3a184.tar.gz libguestfs-ab360c48d4bf6ddb3f14c0f2434e235dfea3a184.tar.xz libguestfs-ab360c48d4bf6ddb3f14c0f2434e235dfea3a184.zip |
align: Add a test for virt-alignment-scan.
-rw-r--r-- | align/Makefile.am | 10 | ||||
-rwxr-xr-x | align/test-virt-alignment-scan.sh | 25 |
2 files changed, 33 insertions, 2 deletions
diff --git a/align/Makefile.am b/align/Makefile.am index d8b33a48..4e3fdfe8 100644 --- a/align/Makefile.am +++ b/align/Makefile.am @@ -18,6 +18,7 @@ include $(top_srcdir)/subdir-rules.mk EXTRA_DIST = \ + test-virt-alignment-scan.sh \ virt-alignment-scan.pod CLEANFILES = stamp-virt-alignment-scan.pod @@ -71,6 +72,11 @@ stamp-virt-alignment-scan.pod: virt-alignment-scan.pod # Tests. -# TESTS_ENVIRONMENT = $(top_builddir)/run --test +TESTS_ENVIRONMENT = $(top_builddir)/run --test -# TESTS = test-virt-alignment-scan.sh +TESTS = + +if ENABLE_APPLIANCE +TESTS += \ + test-virt-alignment-scan.sh +endif diff --git a/align/test-virt-alignment-scan.sh b/align/test-virt-alignment-scan.sh new file mode 100755 index 00000000..058981eb --- /dev/null +++ b/align/test-virt-alignment-scan.sh @@ -0,0 +1,25 @@ +#!/bin/bash - +# libguestfs +# Copyright (C) 2012 Red Hat Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +./virt-alignment-scan -a ../tests/guests/fedora.img +r=$? + +# 0, 2 and 3 are reasonable non-error exit codes. Others are errors. +if [ $r -ne 0 -a $r -ne 2 -a $r -ne 3 ]; then + exit $r +fi |