summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@gnu.org>2016-07-03 16:50:27 +0200
committerMathieu Lirzin <mthl@gnu.org>2016-07-03 16:50:27 +0200
commitfe30eb7e82e1cb3c2e3e4071df1f33ef459d9ae2 (patch)
tree6e2794a8fd16fe6598d30da1240d7e63e09fb280
parent987f83b000bcc0549c685d652fddd8a742ee7dca (diff)
downloadcuirass-fe30eb7e82e1cb3c2e3e4071df1f33ef459d9ae2.tar
cuirass-fe30eb7e82e1cb3c2e3e4071df1f33ef459d9ae2.tar.gz
Add 'basic.sh' test.
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am13
-rw-r--r--tests/basic.sh24
3 files changed, 36 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index d34a698..fe03839 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@
/build-aux/config.sub
/build-aux/install-sh
/build-aux/missing
+/build-aux/test-driver
/cache/
/config.cache
/configure
diff --git a/Makefile.am b/Makefile.am
index aa822ad..6d558df 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,15 +15,22 @@ nodist_pkgmodule_DATA = \
src/cuirass/config.scm \
src/cuirass/config.go
-TEST_EXTENSIONS = .scm
-AM_TESTS_ENVIRONMENT = env GUILE_AUTO_COMPILE='0'
+TEST_EXTENSIONS = .scm .sh
+AM_TESTS_ENVIRONMENT = \
+ env GUILE_AUTO_COMPILE='0' \
+ testsrcdir='$(abs_top_srcdir)/tests' \
+ testbuilddir='$(abs_top_builddir)/tests'
SCM_LOG_DRIVER = \
$(builddir)/pre-inst-env $(GUILE) \
$(srcdir)/build-aux/test-driver.scm
+SH_LOG_COMPILER = $(top_builddir)/pre-inst-env $(SHELL)
+AM_SH_LOG_FLAGS = -x -e
+
TESTS = \
tests/base.scm \
+ tests/basic.sh \
tests/database.scm \
tests/utils.scm
@@ -64,6 +71,8 @@ gen-ChangeLog:
EXTRA_DIST = \
.dir-locals.el \
+ tests/gnu-system.scm \
+ tests/hello-subset.scm \
$(TESTS)
DISTCLEANFILES = src/cuirass/config.scm
diff --git a/tests/basic.sh b/tests/basic.sh
new file mode 100644
index 0000000..f265958
--- /dev/null
+++ b/tests/basic.sh
@@ -0,0 +1,24 @@
+# basic.sh -- check cuirass basic behavior
+# Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
+
+# This file is part of Cuirass.
+
+# Cuirass 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 3 of the License, or
+# (at your option) any later version.
+
+# Cuirass 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 Cuirass. If not, see <http://www.gnu.org/licenses/>.
+
+db_file=${testbuilddir}/test.db
+spec_file=${testsrcdir}/hello-subset.scm
+
+trap 'rm -f "$db_file"' EXIT
+
+cuirass --database $db_file --one-shot $spec_file