Rakefile in pitchfork-0.1.2 vs Rakefile in pitchfork-0.2.0

- old
+ new

@@ -9,10 +9,18 @@ t.test_files = FileList["test/unit/**/test_*.rb"] t.options = '-v' if ENV['CI'] || ENV['VERBOSE'] t.warning = true end +Rake::TestTask.new("test:integration") do |t| + t.libs << "test" + t.libs << "lib" + t.test_files = FileList["test/integration/**/test_*.rb"] + t.options = '-v' if ENV['CI'] || ENV['VERBOSE'] + t.warning = true +end + namespace :test do # It's not so much that these tests are slow, but they tend to fork # and/or register signal handlers, so they if something goes wrong # they are likely to get stuck forever. # The unicorn test suite has historically ran them in individual process @@ -30,11 +38,11 @@ # Unicorn had its own POSIX-shell based testing framework. # It's quite hard to work with and it would be good to convert all this # to Ruby integration tests, but while pitchfork is a moving target it's # preferable to edit the test suite as little as possible. - task integration: :compile do + task legacy_integration: :compile do File.write("test/integration/random_blob", File.read("/dev/random", 1_000_000)) lib = File.expand_path("lib", __dir__) path = "#{File.expand_path("exe", __dir__)}:#{ENV["PATH"]}" old_path = ENV["PATH"] ENV["PATH"] = "#{path}:#{old_path}" @@ -65,8 +73,8 @@ cmd = ["ragel", "-G2", "pitchfork_http.rl", "-o", "pitchfork_http.c"] system(*cmd) or raise "== #{cmd.join(' ')} failed ==" end end -task test: %i(test:unit test:slow test:integration) +task test: %i(test:unit test:slow test:integration test:legacy_integration) task default: %i(ragel compile test)