diff --git a/.alltests b/.alltests index ac30d57386..75ccf9a527 100755 --- a/.alltests +++ b/.alltests @@ -2,7 +2,7 @@ set -e -TOP_DIR=$(python -c "import os; print os.path.dirname(os.path.realpath('$0'))") +TOP_DIR=$(dirname $(realpath "$0")) echo "==== Unit tests ====" resetswift diff --git a/.functests b/.functests index cd3c311298..82638240b8 100755 --- a/.functests +++ b/.functests @@ -3,7 +3,7 @@ # How-To debug functional tests: # SWIFT_TEST_IN_PROCESS=1 tox -e func -- --pdb test.functional.tests.TestFile.testCopy -SRC_DIR=$(python -c "import os; print(os.path.dirname(os.path.realpath('$0')))") +SRC_DIR=$(dirname $(realpath "$0")) cd ${SRC_DIR} > /dev/null export TESTS_DIR=${SRC_DIR}/test/functional diff --git a/.probetests b/.probetests index 386847f26b..4c8d4dd36a 100755 --- a/.probetests +++ b/.probetests @@ -1,6 +1,6 @@ #!/bin/bash -SRC_DIR=$(python -c "import os; print(os.path.dirname(os.path.realpath('$0')))") +SRC_DIR=$(dirname $(realpath "$0")) cd ${SRC_DIR}/test/probe nosetests --exe $@ diff --git a/.unittests b/.unittests index 7faed77dce..aecedf813e 100755 --- a/.unittests +++ b/.unittests @@ -1,17 +1,9 @@ #!/bin/bash -TOP_DIR=$(python -c "import os; print(os.path.dirname(os.path.realpath('$0')))") +TOP_DIR=$(dirname $(realpath "$0")) -python -c 'from distutils.version import LooseVersion as Ver; import nose, sys; sys.exit(0 if Ver(nose.__version__) >= Ver("1.2.0") else 1)' -if [ $? != 0 ]; then - cover_branches="" -else - # Having the HTML reports is REALLY useful for achieving 100% branch - # coverage. - cover_branches="--cover-branches --cover-html --cover-html-dir=$TOP_DIR/cover" -fi cd $TOP_DIR/test/unit -nosetests --exe --with-coverage --cover-package swift --cover-erase $cover_branches $@ +nosetests --exe --with-coverage --cover-package swift --cover-erase --cover-branches --cover-html --cover-html-dir="$TOP_DIR"/cover $@ rvalue=$? rm -f .coverage cd -