forked from nose-devs/nose2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.sh
executable file
·48 lines (43 loc) · 999 Bytes
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
command -v nose2 >/dev/null >&2 || {
source /usr/local/bin/virtualenvwrapper.sh
workon nose2
}
nargs=""
skip="no"
root=`dirname $0`
for var in "$@"
do
case "$skip" in
no)
case "$var" in
-v) nargs="$nargs -v"
;;
--pdb) nargs="$nargs --debug"
;;
-w) nargs="$nargs -t"
skip="copy"
;;
-c) skip="yes"
;;
# filename to mod name, : to .
*)
l="${#root}"+1
var="${var:$l}"
var="${var//\//.}"
var="${var//.py/}"
nargs="$nargs ${var//:/.}"
;;
esac
;;
yes)
skip="no"
;;
copy)
skip="no"
nargs="$nargs $var"
;;
esac
done
cd $root
nose2 $nargs