File tree 2 files changed +26
-6
lines changed
2 files changed +26
-6
lines changed Original file line number Diff line number Diff line change @@ -91,9 +91,9 @@ DEBUG_FLAGS="${DEBUG_AND_RELEASE_FLAGS} -DCMAKE_BUILD_TYPE=Debug"
91
91
RELEASE_FLAGS=" ${DEBUG_AND_RELEASE_FLAGS} -DCMAKE_BUILD_TYPE=RelWithDebInfo"
92
92
93
93
# Where are we, without relying on realpath or readlink?
94
- if [ " $( dirname $0 ) " == " ." ]; then
94
+ if [ " $( dirname $0 ) " = " ." ]; then
95
95
DIR=" $( pwd) "
96
- elif [ $( dirname $0 ) = = " .." ]; then
96
+ elif [ " $( dirname $0 ) " = " .." ]; then
97
97
DIR=" $( dirname " $( pwd) " ) "
98
98
else
99
99
DIR=" $( cd " $( dirname " $0 " ) " ; pwd) "
@@ -216,15 +216,27 @@ if [ "$SKIP_TESTS" = "ON" ]; then
216
216
exit 0
217
217
fi
218
218
219
- # Write stderr to error.log and to console.
220
- # TODO: valgrind
219
+ if [ " $VALGRIND " = " ON" ]; then
220
+ # Defines "run_valgrind" shell function.
221
+ . $DIR /valgrind.sh
222
+ else
223
+ # Define a no-op function.
224
+ run_valgrind ()
225
+ {
226
+ $@
227
+ }
228
+ fi
229
+
230
+ # Write stderr to error.log and to console. Turn off tracing to avoid spurious
231
+ # log messages that CHECK_LOG considers failures.
221
232
mkfifo pipe || true
222
233
if [ -e pipe ]; then
234
+ set +o xtrace
223
235
tee error.log < pipe &
224
- ./src/libmongoc/test-libmongoc -d -F test-results.json 2> pipe
236
+ run_valgrind ./src/libmongoc/test-libmongoc -d -F test-results.json 2> pipe
225
237
rm pipe
226
238
else
227
- ./src/libmongoc/test-libmongoc -d -F test-results.json
239
+ run_valgrind ./src/libmongoc/test-libmongoc -d -F test-results.json
228
240
fi
229
241
230
242
# Check if the error.log exists, and is more than 0 byte
Original file line number Diff line number Diff line change 53
53
...
54
54
fun:_mongoc_do_init
55
55
}
56
+ {
57
+ ignore_sasl_load_plugin_leak
58
+ Memcheck:Leak
59
+ ...
60
+ fun:_sasl_load_plugins
61
+ ...
62
+ fun:_mongoc_do_init
63
+ }
You can’t perform that action at this time.
0 commit comments