You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
desc "run with valgrind"
valgrind_task("--leak-check=full --show-leak-kinds=all", :valgrind => PROFILING_PROGRAM)
desc "run with callgrind"
valgrind_task("--tool=callgrind --dump-instr=yes --cache-sim=yes --branch-sim=yes", :callgrind => PROFILING_PROGRAM)
desc "run with cachegrind"
task :cachegrind => PROFILING_PROGRAM do |t|
cachegrind_out_file = "/tmp/cachegrind-out-file"
with_ld_library_path('.') do
sh "valgrind #{VALGRIND_OPTS} --tool=cachegrind --branch-sim=yes --cachegrind-out-file=#{cachegrind_out_file} ./#{t.prerequisites.first}"
end
sh "cg_annotate #{cachegrind_out_file}"
end
desc "build the test program"
file TEST_PROGRAM => TEST_OBJECTS + LIB_OBJECTS do |t|
sh "#{CXX} -Werror #{t.prerequisites.join(" ")} -o #{t.name}"
end
desc "build the theft_test program"
file "theft_test" => THEFT_TEST_OBJECTS + LIB_OBJECTS do |t|
sh "#{CXX} -Werror #{t.prerequisites.join(" ")} -ltheft -o #{t.name}"
end
task :test => TEST_PROGRAM do
sh "./#{TEST_PROGRAM} #{ENV['ARGS']}"
end
desc "Run the test program with valgrind"
valgrind_task("--leak-check=full --show-leak-kinds=all --error-exitcode=2", :test_with_valgrind => TEST_PROGRAM)
desc "Run theft_test with valgrind"
valgrind_task("--leak-check=full --show-leak-kinds=all", :theft_test_with_valgrind => "theft_test")
No description provided.
The text was updated successfully, but these errors were encountered: