Skip to content

Commit 70db39a

Browse files
committed
Ignore possibly lost
1 parent 7ffe814 commit 70db39a

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/samples.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
set -x
8484
file_path="./dependency/libkvspic/kvspic-src/src/client/src/StreamEvent.c"
8585
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);'
8787
8888
set +e
8989
echo "Checking if the pattern exists before replacement:"
@@ -273,23 +273,27 @@ jobs:
273273
set -o pipefail
274274
set +e
275275
276-
echo "Running Valgrind on ${{ matrix.sample-executable.name }}"
277276
mkdir -p valgrind_logs
278-
277+
278+
LOG_FILE="valgrind_logs/${{ matrix.sample-executable.name }}.log"
279+
279280
echo "::group::Application logs for ${{ matrix.sample-executable.name }}"
280281
valgrind \
281282
--leak-check=full \
282283
--show-leak-kinds=all \
283284
--track-origins=yes \
284285
--error-exitcode=1 \
285-
--log-file=valgrind_logs/${{ matrix.sample-executable.name }}.log \
286+
--log-file="$LOG_FILE" \
286287
./${{ matrix.sample-executable.name }} "$KVS_STREAM_NAME" ${{ matrix.sample-executable.args }}
287-
valgrind_exit_code=$?
288288
echo "::endgroup::"
289289
290290
echo "========== Valgrind Output =========="
291-
cat valgrind_logs/${{ matrix.sample-executable.name }}.log
291+
cat "$LOG_FILE"
292292
echo "====================================="
293293
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+
295299
shell: bash

0 commit comments

Comments
 (0)