Ticket #747: 0002-ask-to-the-user-trying-runtests.sh-without-having-in.patch

File 0002-ask-to-the-user-trying-runtests.sh-without-having-in.patch, 1.3 KB (added by Amirouche, 11 years ago)
  • runtests.sh

    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 b done  
    6262
    6363if [ "$need_arg" = 1 ]
    6464then
    65   testdir="$basedir/mediagoblin/tests"
    66   set -x
    67   exec "$PYTEST" "$@" "$testdir" --boxed
     65  testdir="$basedir/mediagoblin/tests";
     66  eval "$PYTEST --boxed $@ $testdir";
    6867else
    69   set -x
    70   exec "$PYTEST" "$@" --boxed
     68  eval "$PYTEST --boxed $@";
     69fi
     70
     71ret=$?
     72
     73if [ $ret = 0 ]; then
     74    echo "Everything seems ok :)";
     75else
     76    echo "Snap! Something went wrong. *Don't* fill a bug at http://issues.mediagoblin.org/ we are certainly already aware of it."
     77    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.";
     78    echo "Thanks for trying mediagoblin"
    7179fi