File: .unittests

package info (click to toggle)
swift 2.19.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 16,768 kB
  • sloc: python: 197,574; sh: 636; pascal: 253; makefile: 69; xml: 32
file content (18 lines) | stat: -rwxr-xr-x 611 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

TOP_DIR=$(python -c "import os; print os.path.dirname(os.path.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 $@
rvalue=$?
rm -f .coverage
cd -
exit $rvalue