Unverified Commit f9a6b11c authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[R-package] fix incorrect passing builds in valgrind checks (fixes #3704) (#3705)

* try to fix valgrind checks

* fix redirection

* uncomment other CIs
parent 967b45c6
......@@ -10,10 +10,11 @@ RDvalgrind \
--vanilla \
-d "valgrind --tool=memcheck --leak-check=full --track-origins=yes" \
-f testthat.R \
2>&1 > ${ALL_LOGS_FILE} || exit -1
> ${ALL_LOGS_FILE} 2>&1 || exit -1
cat ${ALL_LOGS_FILE}
echo "writing valgrind output to ${VALGRIND_LOGS_FILE}"
cat ${ALL_LOGS_FILE} | grep -E "^\=" > ${VALGRIND_LOGS_FILE}
bytes_definitely_lost=$(
......@@ -22,8 +23,8 @@ bytes_definitely_lost=$(
| sed 's/^.*definitely lost\: \(.*\) bytes.*$/\1/' \
| tr -d ","
)
echo "valgrind found ${bytes_definitely_lost} bytes definitely lost"
if [[ ${bytes_definitely_lost} -gt 0 ]]; then
echo "valgrind found ${bytes_definitely_lost} bytes definitely lost"
exit -1
fi
......@@ -33,8 +34,8 @@ bytes_indirectly_lost=$(
| sed 's/^.*indirectly lost\: \(.*\) bytes.*$/\1/' \
| tr -d ","
)
echo "valgrind found ${bytes_indirectly_lost} bytes indirectly lost"
if [[ ${bytes_indirectly_lost} -gt 0 ]]; then
echo "valgrind found ${bytes_indirectly_lost} bytes indirectly lost"
exit -1
fi
......@@ -60,8 +61,8 @@ bytes_possibly_lost=$(
| sed 's/^.*possibly lost\: \(.*\) bytes.*$/\1/' \
| tr -d ","
)
echo "valgrind found ${bytes_possibly_lost} bytes possibly lost"
if [[ ${bytes_possibly_lost} -gt 336 ]]; then
echo "valgrind found ${bytes_possibly_lost} bytes possibly lost"
exit -1
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment