Kouhei Sutou
null+****@clear*****
Mon Jan 26 19:10:29 JST 2015
Kouhei Sutou 2015-01-26 19:10:29 +0900 (Mon, 26 Jan 2015) New Revision: 51f1be596043c5e8571800da28e6008b72ada7e5 https://github.com/groonga/grntest/commit/51f1be596043c5e8571800da28e6008b72ada7e5 Message: http: pass GRN_* environment variables to nginx Modified files: lib/grntest/test-runner.rb Modified: lib/grntest/test-runner.rb (+11 -2) =================================================================== --- lib/grntest/test-runner.rb 2015-01-26 19:10:05 +0900 (351c5af) +++ lib/grntest/test-runner.rb 2015-01-26 19:10:29 +0900 (d57ad08) @@ -359,7 +359,7 @@ EOC config_file_path = context.temporary_directory_path + "groonga-httpd.conf" config_file_path.open("w") do |config_file| - config_file.puts(<<EOF) + config_file.puts(<<-GLOBAL) daemon off; master_process off; worker_processes 1; @@ -369,7 +369,16 @@ pid #{pid_file_path}; events { worker_connections 1024; } + GLOBAL + ENV.each do |key, value| + next unless key.start_with?("GRN_") + config_file.puts(<<-ENV) +env #{key}; + ENV + end + + config_file.puts(<<-HTTP) http { server { access_log groonga-httpd-access.log; @@ -382,7 +391,7 @@ http { } } } -EOF + HTTP end config_file_path end -------------- next part -------------- HTML����������������������������... Download