Revision 30084381 htools/offline-test.sh

b/htools/offline-test.sh
21 21
# programs, checking basic command line functionality.
22 22

  
23 23
set -e
24
set -o pipefail
24 25

  
25 26
. $(dirname $0)/cli-tests-defs.sh
26 27

  
......
49 50

  
50 51
echo Checking extra arguments
51 52
for prog in hspace hbal hinfo; do
52
  ! $prog unexpected-argument 2>&1 | \
53
  (! $prog unexpected-argument 2>&1 ) | \
53 54
    grep -q "Error: this program doesn't take any arguments"
54 55
done
55 56
echo OK
......
131 132

  
132 133
echo IAllocator checks
133 134
# test that on invalid files it can't parse the request
134
! hail /dev/null 2>&1 | grep -q "Invalid JSON"
135
(! hail /dev/null 2>&1 ) | grep -q "Invalid JSON"
135 136
! hail <(echo '[]') >/dev/null 2>&1
136
! hail <(echo '{}') 2>&1 | grep -q "key 'request' not found"
137
! hail <(echo '{"request": 0}') 2>&1 | grep -q "key 'request'"
137
(! hail <(echo '{}') 2>&1 ) | grep -q "key 'request' not found"
138
(! hail <(echo '{"request": 0}') 2>&1 ) | grep -q "key 'request'"
138 139
! hail $TESTDATA_DIR/hail-invalid-reloc.json >/dev/null 2>&1
139 140

  
140 141
# just test that it can read the file, print the cluster and generate

Also available in: Unified diff