From 6220609718bcad4643c8e1ecf9b961300b79e840 Mon Sep 17 00:00:00 2001 From: Pablo Hoffman Date: Fri, 30 Jan 2009 23:20:49 +0000 Subject: [PATCH] added bin/runtests.sh script to run tests --HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40816 --- scrapy/trunk/bin/runtests.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 scrapy/trunk/bin/runtests.sh diff --git a/scrapy/trunk/bin/runtests.sh b/scrapy/trunk/bin/runtests.sh new file mode 100755 index 000000000..20a73c45d --- /dev/null +++ b/scrapy/trunk/bin/runtests.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +# look for twisted trial command in common known locations +if [ -x /usr/bin/trial ]; then + trial="/usr/bin/trial" +elif [ -x /usr/lib64/twisted/bin/trial ]; then + trial="/usr/lib64/twisted/bin/trial" +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 +