Brian Silverman | 516ceb2 | 2015-11-27 01:29:05 -0500 | [diff] [blame] | 1 | set -e |
2 | set -u | ||||
3 | |||||
4 | OUTPUT=$(TCMALLOC_LARGE_ALLOC_REPORT_THRESHOLD=10 build_tests/tcmalloc_build_test_binary 2>&1) | ||||
5 | |||||
6 | if [[ -z "${OUTPUT}" ]]; then | ||||
7 | echo 'Empty output!' >&2 | ||||
8 | exit 1 | ||||
9 | fi | ||||
10 | |||||
11 | PATTERN='tcmalloc: large alloc [0-9]+ bytes ==' | ||||
12 | |||||
13 | if [[ ! "${OUTPUT}" =~ ${PATTERN} ]]; then | ||||
14 | echo 'Unexpected output:' >&2 | ||||
15 | echo "${OUTPUT}" >&2 | ||||
16 | exit 1 | ||||
17 | fi |