File: toxwrap.sh

package info (click to toggle)
python-pypowervm 1.1.16%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 7,356 kB
  • sloc: python: 29,449; xml: 174; makefile: 21; sh: 14
file content (24 lines) | stat: -rwxr-xr-x 683 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash

set -o pipefail

ARGS=$1

if [[ "$ARGS" =~ ^"pdb " ]]; then
    # Run tests in the foreground, allowing pdb to break
    set -- $ARGS
    PATTERN="$2"
    if ! [ $PATTERN ]; then
        PATTERN=.
    fi
    python -m testtools.run `testr list-tests "$PATTERN" | grep "$PATTERN"`
elif [[ "$ARGS" =~ "until-failure" ]]; then
    # --until-failure is not compatible with --subunit see:
    #
    # https://bugs.launchpad.net/testrepository/+bug/1411804
    #
    # this work around exists until that is addressed
    python setup.py testr --slowest --testr-args="$ARGS"
else
    python setup.py testr --slowest --testr-args="--subunit $ARGS" | subunit-trace -f
fi