testing: make start-local-mozreview fail on all script errors (
bug 1279881) r?glob
Make start-local-mozreview fail on any script error, not just 'mozreview
start'. Also avoid the much more strict 'set -u' because it doesn't
play nice with scripts that call virtualenv.
MozReview-Commit-ID: CXn0mKhN8Wr
--- a/start-local-mozreview
+++ b/start-local-mozreview
@@ -1,32 +1,33 @@
#!/bin/bash
# This script starts the mozreview servers, creates a default user, some bugs
# and a properly configured mercurial repository for pushing reviews.
# You need to source this script (e.g. run with ". start-local-mozreview") in
# order for the environment variables to be set correctly.
+set -eo pipefail
+
TEST_MOZREVIEW_NAME=mozreview-test
TEST_REPO_NAME=local-mozreview-test-repo
VCT_PATH=`pwd`
cd ..
PARENT_PATH=`pwd`
cd $VCT_PATH
REPO_PATH=$PARENT_PATH/$TEST_REPO_NAME
TEST_MOZREVIEW_PATH=$PARENT_PATH/$TEST_MOZREVIEW_NAME
export MOZREVIEW_HOME=$TEST_MOZREVIEW_PATH
. venv/bin/activate
./mozreview stop $TEST_MOZREVIEW_PATH
-if ! ./mozreview start --reviewboard-port=55556 $TEST_MOZREVIEW_PATH; then
- exit 1
-fi
+
+./mozreview start --reviewboard-port=55556 $TEST_MOZREVIEW_PATH
$(./mozreview shellinit)
./mozreview create-repo test-repo
./mozreview create-user default@example.com password 'Default User :default' \
--uid 2000 --scm-level 1 --bugzilla-group editbugs
./reviewboard associate-ldap-user default default@example.com