mirror of https://github.com/rq/rq.git
Delete run_tests (#1281)
The file is obsolete and `pytest` should be used directly.
This commit is contained in:
parent
1d8ea8e7a3
commit
e8795f941a
32
run_tests
32
run_tests
|
@ -1,32 +0,0 @@
|
|||
#!/bin/sh
|
||||
check_redis_running() {
|
||||
redis-cli echo "just checking" > /dev/null
|
||||
return $?
|
||||
}
|
||||
|
||||
# Quit early if Redis server isn't running
|
||||
if ! check_redis_running; then
|
||||
echo "Redis not running." >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if command -v rg >/dev/null; then
|
||||
safe_rg=rg
|
||||
else
|
||||
# Fall back for systems that don't have rg installed
|
||||
safe_rg=cat
|
||||
fi
|
||||
|
||||
export RUN_SLOW_TESTS_TOO=1
|
||||
if [ "$1" = '-f' ]; then # Poor man's argparse
|
||||
unset RUN_SLOW_TESTS_TOO
|
||||
shift 1
|
||||
fi
|
||||
|
||||
# For use on build server, we need exit code to be representative of success/failure
|
||||
if [ "$1" = '-x' ]; then
|
||||
shift 1
|
||||
/usr/bin/env python -m pytest -v tests $@ 2>&1
|
||||
else
|
||||
/usr/bin/env python -m pytest -v tests $@ 2>&1 | egrep -v '^test_' | $safe_rg
|
||||
fi
|
Loading…
Reference in New Issue