Debian Codegraph @

tests/pre-commit.sh

raw symbols SCIP
1 #!/bin/bash
2
3 here="$( cd "$( dirname $(realpath "${BASH_SOURCE[0]}") )" >/dev/null 2>&1 && pwd )"
4 root=$(realpath ${here}/..)
5
6 set -xeu
7
8 on_error() {
9 exit_status=$?
10 echo An error occurred
11 }
12
13 trap on_error ERR
14
15 export PYTHONPATH=${root}
16 # 1. runs of discus with all the possible options, to check for regressions
17 # 2. check the coding style
18 # 3. run the unittests
19 parallel -- "parallel ${root}/discus.py -- -h -c -d -s -t -g -m -k -v -r '-p 3'" \
20 "${root}/discus.py" \
21 "flake8 $(find ${root} -name *.py)" \
22 "python3 -m unittest tests.unit_tests -v"