From 75417f5e3d32645859d94cec82255dc130ec4a2e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 18:55:34 +0200 Subject: Adding upstream version 2020.10.7. Signed-off-by: Daniel Baumann --- scripts/run_travis.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 scripts/run_travis.sh (limited to 'scripts/run_travis.sh') diff --git a/scripts/run_travis.sh b/scripts/run_travis.sh new file mode 100755 index 0000000..fa20fdb --- /dev/null +++ b/scripts/run_travis.sh @@ -0,0 +1,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 -- cgit v1.2.3