Page MenuHomeClusterLabs Projects

No OneTemporary

diff --git a/BasicSanity.sh b/BasicSanity.sh
new file mode 100755
index 0000000000..0d1a3f6a73
--- /dev/null
+++ b/BasicSanity.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+test_home=`dirname $0`
+valgrind=""
+verbose=""
+tests=""
+
+if [ "$test_home" = "." ]; then
+ test_home="$PWD"
+fi
+
+function info() {
+ printf "$*\n"
+}
+
+function error() {
+ printf " * ERROR: $*\n"
+}
+
+info "Test home is:\t$test_home"
+
+while true ; do
+ case "$1" in
+ all) tests="pengine lrmd fencing cli"; shift;;
+ pengine|lrmd|fencing|cli) tests="$tests $1"; shift;;
+ -V|--verbose) verbose="-V"; shift;;
+ -v|--valgrind) valgrind="-v"; shift;;
+ --) shift ; break ;;
+ "") break;;
+ *) echo "unknown option: $1"; exit 1;;
+ esac
+done
+
+if [ -z "$tests" ]; then
+ tests="pengine lrmd fencing cli"
+fi
+
+for t in $tests; do
+ info "Executing the $t regression tests"
+ info "============================================================"
+ if [ -e $test_home/$t/regression.py ]; then
+ # Fencing, lrmd
+ chmod a+x $test_home/$t/regression.py
+ sudo $test_home/$t/regression.py $verbose
+
+ elif [ -e $test_home/$t ]; then
+ # pengine, cli
+ $test_home/$t/regression.sh $verbose $valgrind
+
+ elif [ $t = cli -a -e $test_home/tools ]; then
+ # Running cli tests from the source tree
+ $test_home/tools/regression.sh $verbose $valgrind
+
+ else
+ error "Cannot find $t test in $test_home"
+ exit 1
+ fi
+done
+
diff --git a/Makefile.am b/Makefile.am
index dac1165c1a..f2d8965911 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,82 +1,85 @@
#
# Pacemaker code
#
# Copyright (C) 2004 Andrew Beekhof
#
# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
EXTRA_DIST = autogen.sh ConfigureMe README.in libltdl.tar m4/gnulib-cache.m4
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure DRF/config-h.in \
DRF/stamp-h.in libtool.m4 ltdl.m4 libltdl.tar
CORE = $(LIBLTDL_DIR) replace include lib mcp pengine cib crmd fencing lrmd tools xml
SUBDIRS = $(CORE) cts extra doc
doc_DATA = AUTHORS COPYING COPYING.LIB
noinst_PROGRAMS = scratch
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
+testdir = $(datadir)/$(PACKAGE)/tests/
+test_SCRIPTS = BasicSanity.sh
+
# Scratch file for ad-hoc testing
scratch_SOURCES = scratch.c
scratch_LDADD = $(top_builddir)/lib/common/libcrmcommon.la
core:
@echo "Building only core components: $(CORE)"
list='$(CORE)'; for subdir in $$list; do echo "Building $$subdir"; make -C $$subdir all || exit 1; done
core-install:
@echo "Installing only core components: $(CORE)"
list='$(CORE)'; for subdir in $$list; do echo "Installing $$subdir"; make -C $$subdir install || exit 1; done
core-clean:
@echo "Cleaning only core components: $(CORE)"
list='$(CORE)'; for subdir in $$list; do echo "Cleaning $$subdir"; make -C $$subdir clean || exit 1; done
install-exec-local:
$(INSTALL) -d $(DESTDIR)/$(LCRSODIR)
$(INSTALL) -d -m 750 $(DESTDIR)/$(CRM_CONFIG_DIR)
$(INSTALL) -d -m 750 $(DESTDIR)/$(CRM_STATE_DIR)
$(INSTALL) -d -m 750 $(DESTDIR)/$(CRM_BLACKBOX_DIR)
-chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_CONFIG_DIR)
-chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_STATE_DIR)
-chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_BLACKBOX_DIR)
if BUILD_CS_PLUGIN
rm -f $(DESTDIR)$(LCRSODIR)/pacemaker.lcrso $(DESTDIR)$(LCRSODIR)/service_crm.so
cp $(DESTDIR)$(libdir)/service_crm.so $(DESTDIR)$(LCRSODIR)/pacemaker.lcrso
endif
if BUILD_HEARTBEAT_SUPPORT
$(INSTALL) -d $(DESTDIR)/$(HB_DAEMON_DIR)
ln -sf $(CRM_DAEMON_DIR)/attrd $(DESTDIR)$(HB_DAEMON_DIR)/
ln -sf $(CRM_DAEMON_DIR)/cib $(DESTDIR)$(HB_DAEMON_DIR)/
ln -sf $(CRM_DAEMON_DIR)/crmd $(DESTDIR)$(HB_DAEMON_DIR)/
ln -sf $(CRM_DAEMON_DIR)/pengine $(DESTDIR)$(HB_DAEMON_DIR)/
ln -sf $(CRM_DAEMON_DIR)/stonithd $(DESTDIR)$(HB_DAEMON_DIR)/
endif
# Use chown because the user/group may not exist
clean-generic:
rm -f $(TARFILE) *.tar.bz2 *.sed
dist-clean-local:
rm -f autoconf automake autoheader
maintainer-clean-local:
rm -f libltdl.tar
.PHONY: rpm pkg handy handy-copy

File Metadata

Mime Type
text/x-diff
Expires
Mon, Sep 1, 7:10 PM (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2280362
Default Alt Text
(4 KB)

Event Timeline