forked from PyAV-Org/PyAV
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest
More file actions
executable file
·37 lines (29 loc) · 689 Bytes
/
Copy pathtest
File metadata and controls
executable file
·37 lines (29 loc) · 689 Bytes
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
#!/bin/bash
# Exit as soon as something errors.
set -e
if [[ ! "$_PYAV_ACTIVATED" ]]; then
export here="$(cd "$(dirname "${BASH_SOURCE[0]}")"; pwd)"
source "$here/activate.sh"
fi
cd "$PYAV_ROOT"
TESTSUITE="${1-main}"
istest() {
[[ "$TESTSUITE" == all || "$TESTSUITE" == "$1" ]]
return $?
}
if istest main; then
$PYAV_PYTHON setup.py test
fi
if istest examples; then
for name in $(find examples -name '*.py'); do
echo
echo === $name
cd "$PYAV_ROOT"
mkdir -p "sandbox/$1"
cd "sandbox/$1"
if ! python "$PYAV_ROOT/$name"; then
echo FAILED $name with code $?
exit $?
fi
done
fi