summaryrefslogtreecommitdiff
path: root/.unittests
diff options
context:
space:
mode:
authorTim Burke <tim.burke@gmail.com>2019-10-15 15:06:35 -0700
committerTim Burke <tim.burke@gmail.com>2019-10-15 15:08:42 -0700
commit86952dd3edf4ca45f8df7440cb8b6d31d9e415d7 (patch)
treedc760c5b75a53e8c14c0de1e52eec59ce31debf8 /.unittests
parent294472464a8dfeab1f680eac78d4dd8c45552395 (diff)
downloadswift-86952dd3edf4ca45f8df7440cb8b6d31d9e415d7.tar.gz
tests: Stop invoking python just to get the real source directory
While we're at it, stop checking for a seven-year-old version of nose -- we already list a newer version in test-requirements.txt anyway. Change-Id: I97beace3094f11286730b99653dc1e8f699c5aec
Diffstat (limited to '.unittests')
-rwxr-xr-x.unittests12
1 files changed, 2 insertions, 10 deletions
diff --git a/.unittests b/.unittests
index 7faed77dc..aecedf813 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 -