From fe30eb7e82e1cb3c2e3e4071df1f33ef459d9ae2 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Sun, 3 Jul 2016 16:50:27 +0200 Subject: [PATCH] Add 'basic.sh' test. --- .gitignore | 1 + Makefile.am | 13 +++++++++++-- tests/basic.sh | 24 ++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 tests/basic.sh 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 + +# 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 . + +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