File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 83
83
set -x
84
84
file_path="./dependency/libkvspic/kvspic-src/src/client/src/StreamEvent.c"
85
85
string_to_replace='pKinesisVideoStream->streamingAuthInfo.expiration = MIN(expiration, currentTime + MAX_ENFORCED_TOKEN_EXPIRATION_DURATION);'
86
- string_to_replace_with='pKinesisVideoStream->streamingAuthInfo.expiration = MIN(expiration, currentTime + MIN_STREAMING_TOKEN_EXPIRATION_DURATION);'
86
+ string_to_replace_with='pKinesisVideoStream->streamingAuthInfo.expiration = MIN( expiration, currentTime + MIN_STREAMING_TOKEN_EXPIRATION_DURATION);'
87
87
88
88
set +e
89
89
echo "Checking if the pattern exists before replacement:"
@@ -273,23 +273,27 @@ jobs:
273
273
set -o pipefail
274
274
set +e
275
275
276
- echo "Running Valgrind on ${{ matrix.sample-executable.name }}"
277
276
mkdir -p valgrind_logs
278
-
277
+
278
+ LOG_FILE="valgrind_logs/${{ matrix.sample-executable.name }}.log"
279
+
279
280
echo "::group::Application logs for ${{ matrix.sample-executable.name }}"
280
281
valgrind \
281
282
--leak-check=full \
282
283
--show-leak-kinds=all \
283
284
--track-origins=yes \
284
285
--error-exitcode=1 \
285
- --log-file=valgrind_logs/${{ matrix.sample-executable.name }}.log \
286
+ --log-file="$LOG_FILE" \
286
287
./${{ matrix.sample-executable.name }} "$KVS_STREAM_NAME" ${{ matrix.sample-executable.args }}
287
- valgrind_exit_code=$?
288
288
echo "::endgroup::"
289
289
290
290
echo "========== Valgrind Output =========="
291
- cat valgrind_logs/${{ matrix.sample-executable.name }}.log
291
+ cat "$LOG_FILE"
292
292
echo "====================================="
293
293
294
- exit "$valgrind_exit_code"
294
+ if grep -qE "definitely lost: [^0]" "$LOG_FILE" || grep -qE "indirectly lost: [^0]" "$LOG_FILE"; then
295
+ echo "❌ Valgrind found something definitely or indirectly lost"
296
+ exit 1
297
+ fi
298
+
295
299
shell : bash
You can’t perform that action at this time.
0 commit comments