blob: fa20fdb52c988ef80932c6f9fcb5c578fdfd1399 (
plain)
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
|
#!/usr/bin/env bash
toplevel=$(git rev-parse --show-toplevel)
testdir=${toplevel}/tests/selenium
function run_lint {
if ! make -C "$toplevel" lint; then
echo "Linting errors"
exit 1
fi
}
function run_selenium {
# autodiscover and run the tests
pytest --capture=no --verbose --durations=10 "$testdir"
}
if [ "$INFO" == "lint" ]; then
echo "running lint tests"
run_lint
else
case $BROWSER in
*chrome*)
echo "running tests on chrome"
run_selenium
;;
*firefox*)
echo "running tests on firefox"
run_selenium
;;
*)
echo "bad INFO variable, got $INFO"
exit 1
;;
esac
fi
|