mirror of
https://github.com/chubin/cheat.sh.git
synced 2025-01-07 13:47:44 +03:00
tests/run-tests.sh: env variables configuration
This commit is contained in:
parent
dd09537378
commit
069fba46aa
@ -10,6 +10,12 @@
|
|||||||
# 2) configure CHTSH_URL
|
# 2) configure CHTSH_URL
|
||||||
# 3) run the script
|
# 3) run the script
|
||||||
|
|
||||||
|
PYTHON="${PYTHON:-../ve/bin/python}"
|
||||||
|
|
||||||
|
skip_online="${CHEATSH_TEST_SKIP_ONLINE:-NO}"
|
||||||
|
test_standalone="${CHEATSH_TEST_STANDALONE:-YES}"
|
||||||
|
show_details="${CHEATSH_TEST_SHOW_DETAILS:-YES}"
|
||||||
|
|
||||||
TMP=$(mktemp /tmp/cht.sh.tests-XXXXXXXXXXXXXX)
|
TMP=$(mktemp /tmp/cht.sh.tests-XXXXXXXXXXXXXX)
|
||||||
TMP2=$(mktemp /tmp/cht.sh.tests-XXXXXXXXXXXXXX)
|
TMP2=$(mktemp /tmp/cht.sh.tests-XXXXXXXXXXXXXX)
|
||||||
TMP3=$(mktemp /tmp/cht.sh.tests-XXXXXXXXXXXXXX)
|
TMP3=$(mktemp /tmp/cht.sh.tests-XXXXXXXXXXXXXX)
|
||||||
@ -28,9 +34,6 @@ failed=0
|
|||||||
fi
|
fi
|
||||||
} > "$TMP3"
|
} > "$TMP3"
|
||||||
|
|
||||||
skip_online=NO
|
|
||||||
test_standalone=YES
|
|
||||||
show_details=YES
|
|
||||||
|
|
||||||
while read -r number test_line; do
|
while read -r number test_line; do
|
||||||
if [ "$skip_online" = YES ]; then
|
if [ "$skip_online" = YES ]; then
|
||||||
@ -40,9 +43,11 @@ while read -r number test_line; do
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
test_line=$(echo $test_line | sed 's@ *#.*@@')
|
#shellcheck disable=SC2001
|
||||||
|
test_line=$(echo "$test_line" | sed 's@ *#.*@@')
|
||||||
|
|
||||||
if [ "$test_standalone" = YES ]; then
|
if [ "$test_standalone" = YES ]; then
|
||||||
|
test_line="${test_line//cht.sh /}"
|
||||||
python ../lib/standalone.py "$test_line" > "$TMP" 2> /dev/null
|
python ../lib/standalone.py "$test_line" > "$TMP" 2> /dev/null
|
||||||
elif [[ $test_line = "cht.sh "* ]]; then
|
elif [[ $test_line = "cht.sh "* ]]; then
|
||||||
test_line="${test_line//cht.sh /}"
|
test_line="${test_line//cht.sh /}"
|
||||||
|
Loading…
Reference in New Issue
Block a user