Add Makefile for generating extcmd_test when it doesn't exist

extcmd_test contains the external-command parser from icinga-core
and allows the commandpipe tests to check if the commands would
be accepted by the core

refs #4258
This commit is contained in:
Jannis Moßhammer 2013-06-06 16:41:28 +02:00 committed by Eric Lippmann
parent 590262ebb4
commit 03ad76b739
2 changed files with 10 additions and 0 deletions

6
test/php/Makefile Normal file
View File

@ -0,0 +1,6 @@
GCC=gcc
PROGRAM=extcmd_test
SOURCE=${PROGRAM}.c
all:
cd bin/ && gcc ${SOURCE} -o ${PROGRAM}

View File

@ -6,6 +6,10 @@ SCRIPTNAME=$(readlink -f $0)
DIR=$(dirname $SCRIPTNAME)
PHPUNIT=$(which phpunit)
if [[ ! -x ./bin/extcmd_test ]]; then
make
fi;
if [[ ! -x $PHPUNIT ]]; then
echo "PHPUnit not found!"
exit 1