From e0a824c50da39a38bab425c99ea5b667947e7fb5 Mon Sep 17 00:00:00 2001
From: Amirouche Boubekki <amirouche.boubekki@gmail.com>
Date: Thu, 8 Aug 2013 23:08:47 +0200
Subject: [PATCH 2/2] ask to the user trying runtests.sh without having
 installed the dependencies to do so

---
 runtests.sh | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/runtests.sh b/runtests.sh
index ae020fe..f772c7b 100755
--- a/runtests.sh
+++ b/runtests.sh
@@ -62,10 +62,18 @@ done
 
 if [ "$need_arg" = 1 ]
 then
-  testdir="$basedir/mediagoblin/tests"
-  set -x
-  exec "$PYTEST" "$@" "$testdir" --boxed
+  testdir="$basedir/mediagoblin/tests";
+  eval "$PYTEST --boxed $@ $testdir";
 else
-  set -x
-  exec "$PYTEST" "$@" --boxed
+  eval "$PYTEST --boxed $@";
+fi
+
+ret=$?
+
+if [ $ret = 0 ]; then
+    echo "Everything seems ok :)";
+else
+    echo "Snap! Something went wrong. *Don't* fill a bug at http://issues.mediagoblin.org/ we are certainly already aware of it."
+    echo "Review the above messages, if it's an 'ImportError' you might not have all application dependencies installed, you can do so by running 'python setup.py develop' in a virtualenv. If application dependencies are met, you might not be totally out of luck try to run mediagoblin anyway.";
+    echo "Thanks for trying mediagoblin"
 fi
-- 
1.8.4.rc1

