Set strict mode in test script

Exits with an error if a command is not found, any undefined variable is
used, or a command in a pipeline returns an error.

Should make Travis detect failed tests.
This commit is contained in:
Alex Willmer 2018-04-01 02:11:37 +01:00
parent f92d88c241
commit 0896e95e2c
1 changed files with 3 additions and 0 deletions

3
test
View File

@ -1,4 +1,7 @@
#/bin/sh #/bin/sh
set -o errexit
set -o nounset
set -o pipefail
UNIT2="$(which unit2)" UNIT2="$(which unit2)"