diff --git a/src/test/resources/before_script.sh b/src/test/resources/before_script.sh index 8c05d4f0ade636fd87e480c4a2259abeb78b3d7f..30c66ef7415d4d7d364cba1ae3063d66330add67 100644 --- a/src/test/resources/before_script.sh +++ b/src/test/resources/before_script.sh @@ -1,25 +1,26 @@ -#!/bin/sh +#!/bin/bash TMP_FILE=/tmp/fess-build.$$ unzip target/releases/fess-*.zip 2>&1 > $TMP_FILE tail $TMP_FILE ./fess-*/bin/fess 2>&1 > $TMP_FILE & -sleep 3 + +pushd /tmp +git clone https://github.com/codelibs/fess-testdata.git +popd + tail $TMP_FILE touch `ls -d ./fess-*`/logs/fess-crawler.log tail -f ./fess-*/logs/*.log & counter=0 ret=1 -while [ $ret != 0 -a $counter != 60 ] ; do +while [ $ret != 0 -a $counter != 180 ] ; do echo "Ping Fess... $counter" - curl -v 127.0.0.1:8080/json/?type=ping - #ret=$? - ret=1 - sleep 5 - counter=`expr $counter + 1` + curl -v "localhost:8080/json/?type=ping" + ret=$? + sleep 1 + counter=$((counter + 1)) done -cd /tmp -git clone https://github.com/codelibs/fess-testdata.git diff --git a/src/test/resources/run.sh b/src/test/resources/run.sh index c20fbe157a661f34f199e2a56aa1f67ac6caa2a8..9b47cbf899a942279095dd806cc6c0512d12075d 100644 --- a/src/test/resources/run.sh +++ b/src/test/resources/run.sh @@ -1,14 +1,12 @@ #!/bin/bash -cd `dirname $0` -cd ../../.. -BASE_DIR=`pwd` +tail -f ./fess-*/logs/*.log & mvn test -P integrationTests -Dtest.fess.url="http://127.0.0.1:8080" -Dtest.es.url="http://127.0.0.1:9201" ret=$? if [ $ret != 0 ] ; then - for f in `find $BASE_DIR -type f | grep surefire-reports | grep -v /TEST-` ; do + for f in `find ./target -type f | grep surefire-reports | grep -v /TEST-` ; do cat $f done fi