Kouhei Sutou
null+****@clear*****
Thu Mar 12 12:04:54 JST 2015
Kouhei Sutou 2015-03-12 12:04:54 +0900 (Thu, 12 Mar 2015) New Revision: f2e378d1f2cda088508ecc1dd1819a565fcdaca9 https://github.com/groonga/grntest/commit/f2e378d1f2cda088508ecc1dd1819a565fcdaca9 Message: Add --valgrind-gen-suppressions It's useful for creating suppressions Modified files: lib/grntest/test-runner.rb lib/grntest/tester.rb Modified: lib/grntest/test-runner.rb (+3 -0) =================================================================== --- lib/grntest/test-runner.rb 2015-03-12 12:01:20 +0900 (a7dea14) +++ lib/grntest/test-runner.rb 2015-03-12 12:04:54 +0900 (1a672d6) @@ -269,6 +269,9 @@ EOC SUPPRESSIONS end command_line << "--suppressions=#{valgrind_suppressions_file_path}" + if****@teste*****_gen_suppressions? + command_line << "--gen-suppressions=all" + end command_line << "--verbose" else spawn_options[:chdir] = context.temporary_directory_path.to_s Modified: lib/grntest/tester.rb (+12 -0) =================================================================== --- lib/grntest/tester.rb 2015-03-12 12:01:20 +0900 (334a2bb) +++ lib/grntest/tester.rb 2015-03-12 12:04:54 +0900 (e7fcb7c) @@ -170,6 +170,12 @@ module Grntest tester.valgrind = command || tester.default_valgrind end + parser.on("--[no-]valgrind-gen-suppressions", + "Generate suppressions for Valgrind", + "(#{tester.valgrind_gen_suppressions?})") do |boolean| + tester.valgrind_gen_suppressions = boolean + end + parser.on("--[no-]keep-database", "Keep used database for debug after test is finished", "(#{tester.keep_database?})") do |boolean| @@ -213,6 +219,7 @@ module Grntest attr_accessor :output attr_accessor :gdb, :default_gdb attr_accessor :valgrind, :default_valgrind + attr_writer :valgrind_gen_suppressions attr_writer :reporter, :keep_database, :use_color attr_reader :test_patterns, :test_suite_patterns attr_reader :exclude_test_patterns, :exclude_test_suite_patterns @@ -270,6 +277,10 @@ module Grntest @use_color end + def valgrind_gen_suppressions? + @valgrind_gen_suppressions + end + def target_test?(test_name) selected_test?(test_name) and not excluded_test?(test_name) end @@ -354,6 +365,7 @@ module Grntest def initialize_memory_checkers @vagrind = nil @default_valgrind = "valgrind" + @vagrind_gen_suppressions = false end def command_exist?(name) -------------- next part -------------- HTML����������������������������...Download