[Libguestfs] [PATCH 2/2] tests: add a basic run test

Pino Toscano ptoscano at redhat.com
Wed Mar 5 10:17:46 UTC 2014


Add a simple test which just runs the basic options of supermin, so it
can be tested even if the other tests (all being network tests) are
disabled.
---
 tests/Makefile.am   |  3 ++-
 tests/test-basic.sh | 28 ++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100755 tests/test-basic.sh

diff --git a/tests/Makefile.am b/tests/Makefile.am
index b6f8416..fd059d5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -19,7 +19,8 @@
 
 EXTRA_DIST = $(TESTS)
 
-TESTS =
+TESTS = \
+	test-basic.sh
 
 if NETWORK_TESTS
 TESTS += \
diff --git a/tests/test-basic.sh b/tests/test-basic.sh
new file mode 100755
index 0000000..d91bbd9
--- /dev/null
+++ b/tests/test-basic.sh
@@ -0,0 +1,28 @@
+#!/bin/bash -
+# supermin
+# (C) Copyright 2014 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+set -e
+
+# Test the basic run of supermin
+../src/supermin --help
+
+# Very simple test for the version string
+../src/supermin --version | grep ^supermin
+
+# Check that listing drivers work
+../src/supermin --list-drivers
-- 
1.8.3.1




More information about the Libguestfs mailing list