forked from fivepiece/btc-bash-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
26 lines (24 loc) · 672 Bytes
/
test.sh
File metadata and controls
26 lines (24 loc) · 672 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash -x
echo "" > tests.log
set -x
shopt -s expand_aliases
source ./activate.sh
set_network_versions bitcoin
set +x
b=0
readarray tests < <(find . -type f -name test_*.sh -printf "${btcb_home}/%P\n")
for testsh in ${tests[@]}; do
set -x
source ${testsh} 2>&1 | grep -v "read -N2 byte\|printf %b '\\\x[0-F][0-F]\|read -N2 hexchunk" >> tests.log
# this used to check "$?". the best solution for this uglyness is something like a 100mb output limit on travis-ci :)
if (( ${PIPESTATUS[0]} != 0 )); then
set +x
echo "${testsh} failed" 1>&2
tail -1000 tests.log
return 1
fi
set +x
done
set +x
b="$?"
return "$b"