Kouhei Sutou
null+****@clear*****
Tue Jul 19 17:53:19 JST 2016
Kouhei Sutou 2016-07-19 17:53:19 +0900 (Tue, 19 Jul 2016) New Revision: bb5c69998ebc278533da56a12fa03abcbb74a71c https://github.com/groonga/grntest/commit/bb5c69998ebc278533da56a12fa03abcbb74a71c Message: Normalize plugin path in object_list Modified files: lib/grntest/test-runner.rb Modified: lib/grntest/test-runner.rb (+21 -5) =================================================================== --- lib/grntest/test-runner.rb 2016-06-02 21:24:25 +0900 (acee5bf) +++ lib/grntest/test-runner.rb 2016-07-19 17:53:19 +0900 (4c159af) @@ -640,11 +640,23 @@ http { end def normalize_body(body) - if body.is_a?(Hash) and body["exception"] - exception = Marshal.load(Marshal.dump(body["exception"])) - message = exception["message"] - exception["message"] = normalize_path_in_error_message(message) - body.merge("exception" => exception) + case body + when Hash + if body["exception"] + exception = Marshal.load(Marshal.dump(body["exception"])) + message = exception["message"] + exception["message"] = normalize_path_in_error_message(message) + body.merge("exception" => exception) + else + body.each do |key, value| + case value + when Hash + path = value["path"] + value["path"] = normalize_plugin_path(path) if path + end + end + body + end else body end @@ -666,6 +678,10 @@ http { end end + def normalize_plugin_path(path) + path.gsub(/\.libs\//, "").gsub(/\.dll\z/, ".so") + end + def test_script_path @worker.test_script_path end -------------- next part -------------- HTML����������������������������... 下载