From 0592bff4efbe981fce9771441bfbcddcba7372ec Mon Sep 17 00:00:00 2001 From: Marius Hein Date: Mon, 3 Jun 2013 15:13:42 +0200 Subject: [PATCH] Build server Add absolute directory for helper scripts refs #4067 refs #4213 refs #4099 refs #4098 refs #4214 --- bin/createdoc.sh | 7 ++++++- test/js/checkswag.sh | 11 ++++++++--- test/js/runtests.sh | 13 +++++++++---- test/php/checkswag.sh | 11 ++++++++--- test/php/runtests.sh | 7 ++++++- 5 files changed, 37 insertions(+), 12 deletions(-) diff --git a/bin/createdoc.sh b/bin/createdoc.sh index 4e4dbc754..cb005fdd8 100755 --- a/bin/createdoc.sh +++ b/bin/createdoc.sh @@ -1,6 +1,11 @@ #!/bin/sh -for filepath in `find ../doc -type f -name "*.md"`; do +set -o nounset + +SCRIPTNAME=$(readlink -f $0) +DIR=$(dirname $SCRIPTNAME) + +for filepath in `find $DIR/../doc -type f -name "*.md"`; do markdown $filepath > `dirname $filepath`/`basename $filepath .md`.html done diff --git a/test/js/checkswag.sh b/test/js/checkswag.sh index 9f1f6df4e..bfd8f26e4 100755 --- a/test/js/checkswag.sh +++ b/test/js/checkswag.sh @@ -1,8 +1,13 @@ #!/bin/sh -# Make sure that the destination directory for logs and reports exists -mkdir -p ../../build/log +set -o nounset -jshint --reporter=jslint "$@" ../.. > ../../build/log/jshint_results.xml +SCRIPTNAME=$(readlink -f $0) +DIR=$(dirname $SCRIPTNAME) + +# Make sure that the destination directory for logs and reports exists +mkdir -p $DIR/build/log + +jshint --reporter=jslint "$@" ../.. > $DIR/build/log/jshint_results.xml exit 0 diff --git a/test/js/runtests.sh b/test/js/runtests.sh index 71eb52a48..41af329ac 100755 --- a/test/js/runtests.sh +++ b/test/js/runtests.sh @@ -1,9 +1,14 @@ #!/bin/sh -# Make sure that the destination directory for logs and reports exists -mkdir -p ../../build/log +set -o nounset -mocha --reporter "xunit" --recursive "$@" . > ../../build/log/mocha_results.xml -mocha --reporter "cobertura" --recursive "$@" . > ../../build/log/mocha_coverage.xml +SCRIPTNAME=$(readlink -f $0) +DIR=$(dirname $SCRIPTNAME) + +# Make sure that the destination directory for logs and reports exists +mkdir -p $DIR/build/log + +mocha --reporter "xunit" --recursive "$@" . > $DIR/build/log/mocha_results.xml +mocha --reporter "cobertura" --recursive "$@" . > $DIR/build/log/mocha_coverage.xml exit 0 diff --git a/test/php/checkswag.sh b/test/php/checkswag.sh index f9e7c135c..dafbc52b1 100755 --- a/test/php/checkswag.sh +++ b/test/php/checkswag.sh @@ -1,8 +1,13 @@ #!/bin/sh -# Make sure that the destination directory for logs and reports exists -mkdir -p ../../build/log +set -o nounset -phpcs -p --standard=PSR2 --extensions=php --encoding=utf-8 --report-checkstyle=../../build/log/phpcs_results.xml --ignore=vendor "$@" ../.. +SCRIPTNAME=$(readlink -f $0) +DIR=$(dirname $SCRIPTNAME) + +# Make sure that the destination directory for logs and reports exists +mkdir -p $DIR/../../build/log + +phpcs -p --standard=PSR2 --extensions=php --encoding=utf-8 --report-checkstyle=$DIR/build/log/phpcs_results.xml --ignore=vendor "$@" ../.. exit 0 diff --git a/test/php/runtests.sh b/test/php/runtests.sh index aec3a0d49..a8b6901f4 100755 --- a/test/php/runtests.sh +++ b/test/php/runtests.sh @@ -1,7 +1,12 @@ #!/bin/sh +set -o nounset + +SCRIPTNAME=$(readlink -f $0) +DIR=$(dirname $SCRIPTNAME) + # Make sure that the destination directory for logs and reports exists -mkdir -p ../../build/log +mkdir -p $DIR/../../build/log phpunit "$@" .