diff --git a/configure.ac b/configure.ac index 581cc6d..7d0bfab 100644 --- a/configure.ac +++ b/configure.ac @@ -891,8 +891,10 @@ AC_CONFIG_FILES([Makefile models/Makefile examples/Makefile scripts/Makefile - ctools.pc], - [if test -f test/test_cscripts.sh; then chmod +x test/test_cscripts.sh; fi]) + ctools.pc + testconf.sh], + [if test -f test/test_cscripts.sh; then chmod +x test/test_cscripts.sh; fi; + if test -f testconf.sh; then chmod +x testconf.sh; fi]) AC_OUTPUT diff --git a/testconf.sh.in b/testconf.sh.in new file mode 100755 index 0000000..07f1c44 --- /dev/null +++ b/testconf.sh.in @@ -0,0 +1,62 @@ +#!/bin/sh +# ===================================================================== +# Test ctools configuration script (used for continuous integration; +# assumes that ctools have been installed) +# +# Copyright (C) 2014 Juergen Knoedlseder +# +# 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 3 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, see . +# ===================================================================== +# +# Exit on any error +# ================= +set -e + +# +# Set fixed parameters +# ==================== +test_dir="home" + +# +# Set parameters +# ============== +prefix="@prefix@" + +# +# Save current working directory +# ============================== +base=$PWD + +# +# Create test directory +# ===================== +@MKDIR_P@ "$test_dir" +cd "$test_dir" + +# +# Configure ctools +# ================ +export CTOOLS="$prefix" +. $CTOOLS/bin/ctools-init.sh >& config.log +output=`cat config.log` +if [ "x$output" != x ]; then + echo "*** Configuration script was not silent ***" + echo "$output" + exit +fi + +# +# Signal completion +# ================= +echo "Configuration test successful."