mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
valgrind: Write separate log files in tmp/valgrind-<DATE>-<PID>.log
Current code wrote a single valgrind.log in the top-level directory. This was overwritten with each valgrinded program, which wasn't much use. The new version writes multiple separate valgrind-*.log files containing the date and PID (so each is unique). It would nice if valgrind could delete log files that don't contain errors, but this doesn't appear to be possible.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -470,4 +470,3 @@ Makefile.in
|
||||
/tools/test.img
|
||||
/tools/virt-*.1
|
||||
/tools/virt-*.pl
|
||||
/valgrind.log*
|
||||
|
||||
@@ -919,7 +919,7 @@ AS_IF([test "x$VALGRIND" != "xno"],[
|
||||
fi
|
||||
|
||||
# Substitute the whole valgrind command.
|
||||
VG='$(VALGRIND) $(VALGRIND_NO_VGDB) --log-file=$(abs_top_builddir)/valgrind.log --leak-check=full --error-exitcode=119 --suppressions=$(abs_top_srcdir)/valgrind-suppressions'
|
||||
VG='$(VALGRIND) $(VALGRIND_NO_VGDB) --log-file=$(abs_top_builddir)/tmp/valgrind-%q{T}-%p.log --leak-check=full --error-exitcode=119 --suppressions=$(abs_top_srcdir)/valgrind-suppressions'
|
||||
],[
|
||||
# No valgrind, so substitute VG with something that will break.
|
||||
VG=VALGRIND_IS_NOT_INSTALLED
|
||||
|
||||
4
run.in
4
run.in
@@ -44,6 +44,10 @@ fi
|
||||
# Find this script.
|
||||
b=@abs_builddir@
|
||||
|
||||
# Set T to current date & time (mainly for valgrind logfile name).
|
||||
T=`date +%Y%m%d.%H.%M.%S`
|
||||
export T
|
||||
|
||||
# Set tmpdir and cachedir so the appliance doesn't conflict with
|
||||
# globally installed libguestfs.
|
||||
#
|
||||
|
||||
1
tmp/.gitignore
vendored
1
tmp/.gitignore
vendored
@@ -2,3 +2,4 @@
|
||||
/guestfs.*
|
||||
/libguestfs??????/
|
||||
/run-*
|
||||
/valgrind-*.log
|
||||
|
||||
Reference in New Issue
Block a user