1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-25 17:04:03 +00:00
scrapy/bin/runtests.sh
pablo 7b34e08392 sorted out running of unittests:
1. removed scrapy.tests.run module which didn't work well because of a problem
   with Twisted trial
2. added runtests.bat script for running tests in windows
3. added additional lookup path for trial in unix systems
2009-05-16 20:11:23 -03:00

25 lines
570 B
Bash
Executable File

#!/bin/sh
# look for twisted trial command in common known locations
if [ -x /usr/bin/trial ]; then
trial="/usr/bin/trial"
elif [ -x /usr/lib/twisted/bin/trial ]; then
trial="/usr/lib/twisted/bin/trial"
elif [ -x /usr/lib64/twisted/bin/trial ]; then
trial="/usr/lib64/twisted/bin/trial"
else
echo "Unable to run tests: trial command (included with Twisted) not found"
exit 1
fi
# disable custom settings for running tests in a neutral environment
export SCRAPY_SETTINGS_DISABLED=1
if [ $# -eq 0 ]; then
$trial scrapy
else
$trial "$@"
fi