run_tests.sh cleanup

Issue #7 resolved
Former user created an issue

Right now, run_tests.sh fails if you have dash as /bin/sh, and also fails to check for errors on e.g. cd.

{{{

!diff

HG changeset patch

User tv@eagain.net

Date 1244507473 25200

Node ID abff07ed151138f391c165ad7c9cc5952fe51acb

Parent 7dbe9f0387a9f462d3d3cbb2ee3129cb17489ca2

Clean up run_tests.sh

Avoid bashisms, abort on errors and simplify.

diff -r 7dbe9f0387a9 -r abff07ed1511 run_tests.sh
--- a/run_tests.sh Mon Jun 08 17:30:23 2009 -0700
+++ b/run_tests.sh Mon Jun 08 17:31:13 2009 -0700
@@ -1,10 +1,5 @@
#!/bin/sh
# todo: make a nose plugin that executes sphinx doctests :)
-pushd docs
-make doctest
-
-if [ $? -ne 0 ]; then
- exit 1
-fi
-popd
+set -e
+make -C docs doctest
nosetests --with-doctest $@

}}}

Comments (2)

  1. Anonymous

    $ help set|grep -- -e|head -1 -e Exit immediately if a command exits with a non-zero status.

    Basically, make the shell ensure that none of the commands fail (unless the error is explicitly handled or ignored).

  2. Log in to comment