diff --git a/bin/coco-client-test-runner b/bin/coco-client-test-runner index 2ec45aa29..6c90569aa 100755 --- a/bin/coco-client-test-runner +++ b/bin/coco-client-test-runner @@ -1,13 +1,10 @@ #!/bin/bash -# full script path include his name -_script="$(readlink -f ${BASH_SOURCE[0]})" - -# Script location path (dir) -_base="$(dirname $_script)" +# full script path +_scriptDir="$(cd "$(dirname "$0")" && pwd -P)" sleep 5 -cd $_base +cd $_scriptDir cd ../ until node_modules/karma/bin/karma start; do echo "Karma crashed with exit code $?. Respawning.." >&2 diff --git a/bin/coco-server-test-runner b/bin/coco-server-test-runner index 14310bd78..404d77c0a 100755 --- a/bin/coco-server-test-runner +++ b/bin/coco-server-test-runner @@ -1,11 +1,8 @@ #!/bin/bash -# full script path include his name -_script="$(readlink -f ${BASH_SOURCE[0]})" - -# Script location path (dir) -_base="$(dirname $_script)" - -cd $_base +# full script path +_scriptDir="$(cd "$(dirname "$0")" && pwd -P)" + +cd $_scriptDir cd ../ node_modules/jasmine-node/bin/jasmine-node test/server/ --coffee --autotest --captureExceptions diff --git a/bin/coco-test-server b/bin/coco-test-server index f9856b86b..9e6793e89 100755 --- a/bin/coco-test-server +++ b/bin/coco-test-server @@ -1,11 +1,8 @@ #!/bin/bash -# full script path include his name -_script="$(readlink -f ${BASH_SOURCE[0]})" - -# Script location path (dir) -_base="$(dirname $_script)" +# full script path +_scriptDir="$(cd "$(dirname "$0")" && pwd -P)" -cd $_base +cd $_scriptDir cd ../ node_modules/.bin/nodemon . --ext ".coffee|.js" --watch server --watch server.coffee --unittest