File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 3232printf " \n${GREEN} Running memory leak checks...${NC} \n"
3333valgrind --leak-check=full --error-exitcode=200 --log-fd=3 \
3434 bin/tests -f " test/queries/queries-good.sql" -f " test/queries/queries-bad.sql" \
35- 3>&1 > /dev/null 2> /dev/null
35+ 3>&1> /dev/null;
36+
3637MEM_LEAK_RET=$?
38+ RET=1
3739
38- if [ $MEM_LEAK_RET -ne 200 ]; then
39- printf " ${GREEN} Memory leak check succeeded!${NC} \n"
40- MEM_LEAK_RET=0
40+ if [ $MEM_LEAK_RET -eq 0 ]; then
41+ printf " ${GREEN} Memory leak check succeeded!${NC} \n"
42+ MEM_LEAK_RET=0
43+ RET=0
44+ elif [ $MEM_LEAK_RET -eq 200 ]; then
45+ printf " ${RED} Memory leak check failed!${NC} \n"
46+ elif [ $MEM_LEAK_RET -eq 127 ]; then
47+ printf " ${RED} Memory leak check failed: command 'valgrind' not found!${NC} \n"
4148else
42- MEM_LEAK_RET=1
43- RET=1
44- printf " ${RED} Memory leak check failed!${NC} \n"
49+ printf " ${RED} Memory leak check failed: error code ${MEM_LEAK_RET} !${NC} \n"
4550fi
4651
4752# ################################################
You can’t perform that action at this time.
0 commit comments