Make it possible to control which startpar binary the testsuite is running.
This commit is contained in:
parent
cdca069db2
commit
094ef1c641
4
Makefile
4
Makefile
|
@ -13,6 +13,8 @@ HDRS = makeboot.h proc.h
|
|||
REST = COPYING Makefile startpar.8
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
STARTPAR := $(shell pwd)/startpar
|
||||
|
||||
ifneq ($(INC),)
|
||||
LIBS += -lblogger
|
||||
COPTS += -DUSE_BLOGD
|
||||
|
@ -43,7 +45,7 @@ install: startpar
|
|||
$(INSTALL_DATA) startpar.8 $(DESTDIR)$(man8dir)/.
|
||||
|
||||
check:
|
||||
$(MAKE) -C testsuite $@
|
||||
$(MAKE) STARTPAR=$(STARTPAR) -C testsuite $@
|
||||
|
||||
distclean: clean
|
||||
clean:
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
STARTPAR = ../startpar
|
||||
|
||||
all:
|
||||
|
||||
check:
|
||||
./runtests
|
||||
STARTPAR=$(STARTPAR) ./runtests
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
set -e
|
||||
|
||||
if [ -z "$STARTPAR" ] ; then
|
||||
STARTPAR=../startpar
|
||||
fi
|
||||
|
||||
mkdir -p etc/init.d
|
||||
touch etc/insserv.conf
|
||||
cat > etc/init.d/test <<EOF
|
||||
|
@ -21,14 +25,14 @@ EOF
|
|||
chmod a+rx etc/init.d/test
|
||||
|
||||
/sbin/insserv -p etc/init.d test
|
||||
../startpar -d etc/init.d -e etc -P S -R 2 -M start
|
||||
$STARTPAR -d etc/init.d -e etc -P S -R 2 -M start
|
||||
|
||||
rm -rf etc
|
||||
|
||||
|
||||
mkdir -p start
|
||||
touch start/working
|
||||
if ../startpar -a start ls 2>&1 | grep -q working ; then
|
||||
if $STARTPAR -a start ls 2>&1 | grep -q working ; then
|
||||
echo success: the ls command was running
|
||||
else
|
||||
echo error: the ls command was not running
|
||||
|
|
Loading…
Reference in New Issue