Skip to content

Commit f0442f5

Browse files
committed
enable logging for valgrind
1 parent 3fb8e99 commit f0442f5

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

valgrind.sh

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,27 +45,26 @@ then
4545
exit 1
4646
fi
4747

48-
49-
# WARNING: this script is not really ready to be used yet
50-
# valgrind cant run with asan so the entrie setup is a bit messy
51-
# not sure if i ever put enough love into this so its actually usable
52-
# but last time i lost my untracked valgrind.sh so this time i rather track
53-
# the messy one than to start from scratch again
54-
5548
export COMMIT_HASH
5649
if ! COMMIT_HASH="$(get_commit)"
5750
then
5851
err "failed to get commit hash"
5952
exit 1
6053
fi
6154

62-
# TODO: enable logging
55+
logfile="$LOGS_PATH_FULL_TW/${CFG_SRV_NAME}_$(date +%F_%H-%M-%S)${CFG_LOG_EXT}"
56+
cache_logpath "$logfile"
57+
6358
log_cmd='echo nologging'
59+
if is_cfg CFG_ENABLE_LOGGING
60+
then
61+
log_cmd="logfile $logfile"
62+
fi
6463

6564
read -rd '' run_cmd << EOF
6665
$CFG_ENV_RUNTIME valgrind \
6766
--tool=massif \
68-
./$CFG_BIN -f autoexec.cfg "$log_cmd;#sid:$SERVER_UUID:gdb.sh"
67+
./$CFG_BIN -f autoexec.cfg "$log_cmd;#sid:$SERVER_UUID:valgrind.sh"
6968
EOF
7069

7170
# valgrind \

0 commit comments

Comments
 (0)