mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-02-26 08:22:31 +00:00
build system: option for running unit tests with valgrind
This commit is contained in:
parent
89ee5e50f3
commit
0fc23cd7bd
@ -27,3 +27,4 @@ AC_DEFUN([AX_GTEST],[
|
||||
])
|
||||
|
||||
AX_GTEST
|
||||
AC_PATH_PROG(VALGRIND, valgrind,, $PATH)
|
||||
|
@ -66,6 +66,7 @@ RANLIB = @RANLIB@
|
||||
RCC = @RCC@
|
||||
STRIP = @STRIP@
|
||||
UIC = @UIC@
|
||||
VALGRIND = @VALGRIND@
|
||||
WINDRES = @WINDRES@
|
||||
|
||||
# Variable stuff as set by configure
|
||||
|
@ -11,6 +11,13 @@ namespace :tests do
|
||||
task :run_unit => 'tests:unit' do
|
||||
$gtest_apps.each { |app| run "LC_ALL=C ./tests/unit/#{app}/#{app}" }
|
||||
end
|
||||
|
||||
if !c(:VALGRIND).to_s.empty?
|
||||
desc "Build and run the unit tests under valgrind's memcheck"
|
||||
task :run_valgrind_unit => 'tests:unit' do
|
||||
$gtest_apps.each { |app| run "LC_ALL=C #{c(:VALGRIND)} --tool=memcheck --num-callers=12 ./tests/unit/#{app}/#{app}" }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
$build_system_modules[:gtest] = {
|
||||
|
Loading…
Reference in New Issue
Block a user