Debian Codegraph @

debian/tests/run_unittest

raw symbols SCIP
1 #! /bin/sh
2
3 set -e
4
5 mkdir -p .pybuild/tmp
6 export QT_QPA_PLATFORM=offscreen
7 export QTWEBENGINE_DISABLE_SANDBOX=1
8 export MPLCONFIGDIR=.pybuild/tmp
9 python3 -m unittest discover -v \
10 --pattern="test_*.py" \
11 2>&1 | tee .pybuild/tmp/report.txt
12 F=$(grep FAILED .pybuild/tmp/report.txt)
13
14 # if .pybuild/tmp/report.txt contains a line like
15 # FAILED (failures=3, skipped=1, expected failures=15)
16 # this will succeed when failures are less than 10
17
18 [ -z "$F" ] || (N=$(cat .pybuild/tmp/report.txt | sed -n 's/.*failures=\([0-9]*\),.*/\1/ p'); test $N -le "10")
19