diff --git a/scripts/docker/test-server.sh b/scripts/docker/test-server.sh index 9595cf10150..e122216161a 100755 --- a/scripts/docker/test-server.sh +++ b/scripts/docker/test-server.sh @@ -15,7 +15,11 @@ ${ARTISAN} db:seed --class CountriesSeederTable --force # Ensure storage directories are present STORAGE=${MONICADIR}/storage -mkdir -p ${STORAGE}/{logs,app/public,framework/views,framework/cache,framework/sessions} +mkdir -p ${STORAGE}/logs +mkdir -p ${STORAGE}/app/public +mkdir -p ${STORAGE}/framework/views +mkdir -p ${STORAGE}/framework/cache +mkdir -p ${STORAGE}/framework/sessions chown -R monica:apache ${STORAGE} chmod -R g+rw ${STORAGE} diff --git a/scripts/tests/fix-bintray.sh b/scripts/tests/fix-bintray.sh index 7a4d3ebdb80..32c22ff6ffa 100755 --- a/scripts/tests/fix-bintray.sh +++ b/scripts/tests/fix-bintray.sh @@ -1,8 +1,9 @@ #!/bin/bash -set -v +set -evuo pipefail SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && /bin/pwd -P) +source $SELF_PATH/realpath.sh ROOT=$(realpath $SELF_PATH/../..) SLUG=${SLUG:-monicahq} diff --git a/scripts/tests/realpath.sh b/scripts/tests/realpath.sh new file mode 100644 index 00000000000..edb09368b20 --- /dev/null +++ b/scripts/tests/realpath.sh @@ -0,0 +1,16 @@ +realpath () +{ + f=$@; + if [ -z "$f" ]; then + f=$(pwd) + fi + if [ -d "$f" ]; then + base=""; + dir="$f"; + else + base="/$(basename "$f")"; + dir=$(dirname "$f"); + fi; + dir=$(cd "$dir" && /bin/pwd -P); + echo "$dir$base" +} diff --git a/scripts/tests/runtests.sh b/scripts/tests/runtests.sh index fc1eaab368f..77fdaf28828 100755 --- a/scripts/tests/runtests.sh +++ b/scripts/tests/runtests.sh @@ -2,7 +2,9 @@ set -evuo pipefail SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && /bin/pwd -P) +source $SELF_PATH/realpath.sh ROOT=$(realpath $SELF_PATH/../..) + HOST=localhost $SELF_PATH/start-selenium.sh diff --git a/scripts/tests/start-selenium.sh b/scripts/tests/start-selenium.sh index f9ac4572b32..4d43bf55bd5 100755 --- a/scripts/tests/start-selenium.sh +++ b/scripts/tests/start-selenium.sh @@ -1,21 +1,9 @@ #!/bin/bash -realpath () -{ - f=$@; - if [ -d "$f" ]; then - base=""; - dir="$f"; - else - base="/$(basename "$f")"; - dir=$(dirname "$f"); - fi; - dir=$(cd "$dir" && /bin/pwd -P); - echo "$dir$base" -} set -evuo pipefail SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && /bin/pwd -P) +source $SELF_PATH/realpath.sh ROOT=$(realpath $SELF_PATH/../..) if [ -z "${DISPLAY:-}" ]; then