From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS33070 50.56.128.0/17 X-Spam-Status: No, score=-0.2 required=5.0 tests=AWL shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: archivist@yhbt.net Delivered-To: archivist@dcvr.yhbt.net Received: from rubyforge.org (50-56-192-79.static.cloud-ips.com [50.56.192.79]) by dcvr.yhbt.net (Postfix) with ESMTP id CD4EF1F5B6 for ; Sat, 28 Jul 2012 02:22:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id BB6702E060; Sat, 28 Jul 2012 02:22:46 +0000 (UTC) X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id C1B6E2E060 for ; Sat, 28 Jul 2012 02:22:37 +0000 (UTC) Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 05F6E1F43A; Sat, 28 Jul 2012 02:22:36 +0000 (UTC) Date: Sat, 28 Jul 2012 02:22:36 +0000 From: Eric Wong To: mongrel-unicorn@rubyforge.org Subject: [RFC/PATCH] remove Rails-oriented integration tests Message-ID: <20120728022236.GA6129@dcvr.yhbt.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: mongrel-unicorn@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: mongrel-unicorn-bounces@rubyforge.org Errors-To: mongrel-unicorn-bounces@rubyforge.org (This is a large patch which deletes a lot of files, so it's pointless to post in its entirety here. Full diffstat and --diff-filter=M output below. I've pushed this to the "pu" branch of git://bogomips.org/unicorn.git commit 91a3cde091d4ae6ff436681f155b3907daae1c04) It's too much overhead to keep Rails-specific tests working, especially when it's hauling in an ancient version of SQLite3. Since Rails 3 has settled down with Rack and unicorn_rails is unlikely to need changing in the future, we can drop these tests. --- GNUmakefile | 31 +-- script/isolate_for_tests | 18 -- Summary of full diffstat: 94 files changed, 2 insertions(+), 1598 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 61fb739..ea13486 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -32,16 +32,13 @@ MYLIBS = $(RUBYLIB):$(ISOLATE_LIBS) # dunno how to implement this as concisely in Ruby, and hell, I love awk awk_slow := awk '/def test_/{print FILENAME"--"$$2".n"}' 2>/dev/null -rails_vers := $(subst test/rails/app-,,$(wildcard test/rails/app-*)) slow_tests := test/unit/test_server.rb test/exec/test_exec.rb \ test/unit/test_signals.rb test/unit/test_upload.rb log_suffix = .$(RUBY_ENGINE).$(RUBY_VERSION).log -T_r := $(wildcard test/rails/test*.rb) -T := $(filter-out $(slow_tests) $(T_r), $(wildcard test/*/test*.rb)) +T := $(filter-out $(slow_tests), $(wildcard test/*/test*.rb)) T_n := $(shell $(awk_slow) $(slow_tests)) T_log := $(subst .rb,$(log_suffix),$(T)) T_n_log := $(subst .n,$(log_suffix),$(T_n)) -T_r_log := $(subst .r,$(log_suffix),$(T_r)) test_prefix = $(CURDIR)/test/$(RUBY_ENGINE)-$(RUBY_VERSION) ext := ext/unicorn_http @@ -93,7 +90,7 @@ $(slow_tests): $(test_prefix)/.stamp test-integration: $(test_prefix)/.stamp $(MAKE) -C t -test-all: test test-rails test-integration +test-all: test test-integration TEST_OPTS = -v check_test = grep '0 failures, 0 errors' $(t) >/dev/null @@ -199,30 +196,6 @@ doc_gz: for i in $(docs); do \ gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done -rails_git_url = git://github.com/rails/rails.git -rails_git := vendor/rails.git -$(rails_git)/info/cloned-stamp: - git clone --mirror -q $(rails_git_url) $(rails_git) - > $@ - -$(rails_git)/info/v2.2.3-stamp: $(rails_git)/info/cloned-stamp - cd $(rails_git) && git fetch - cd $(rails_git) && git rev-parse --verify refs/tags/v2.2.3 - > $@ - -rails_tests := $(addsuffix .r,$(addprefix $(T_r).,$(rails_vers))) -test-rails: $(rails_tests) -$(T_r).%.r: t = $(addsuffix $(log_suffix),$@) -$(T_r).%.r: rv = $(subst .r,,$(subst $(T_r).,,$@)) -$(T_r).%.r: extra = ' 'v$(rv) -$(T_r).%.r: arg = $(T_r) -$(T_r).%.r: export PATH := $(test_prefix)/bin:$(PATH) -$(T_r).%.r: export RUBYLIB := $(test_prefix):$(test_prefix)/lib:$(MYLIBS) -$(T_r).%.r: export UNICORN_RAILS_TEST_VERSION = $(rv) -$(T_r).%.r: export RAILS_GIT_REPO = $(CURDIR)/$(rails_git) -$(T_r).%.r: $(test_prefix)/.stamp $(rails_git)/info/v2.2.3-stamp - $(run_test) - ifneq ($(VERSION),) rfproject := mongrel rfpackage := unicorn diff --git a/script/isolate_for_tests b/script/isolate_for_tests index 5e6139c..00a3f2b 100755 --- a/script/isolate_for_tests +++ b/script/isolate_for_tests @@ -16,9 +16,6 @@ opts = { pid = fork do Isolate.now!(opts) do - if RUBY_VERSION.to_f < 2.0 - gem 'sqlite3-ruby', '1.2.5' - end gem 'raindrops', '0.8.0' gem 'kgio-monkey', '0.4.0' gem 'kgio', '2.7.4' @@ -33,18 +30,3 @@ File.open("#{dst}.#$$", "w") do |fp| fp.puts "ISOLATE_LIBS=#{lib_paths.join(':')}" end File.rename("#{dst}.#$$", dst) - -# pure Ruby gems can be shared across all Rubies -%w(3.0.0).each do |rails_ver| - opts[:path] = "tmp/isolate/rails-#{rails_ver}" - pid = fork do - Isolate.now!(opts) do - gem 'rake', '0.8.7' - gem 'rails', rails_ver - end - end - _, status = Process.waitpid2(pid) - status.success? or abort status.inspect - more = Dir["#{opts[:path]}/gems/*-*/lib"].map { |x| File.expand_path(x) } - lib_paths.concat(more) -end _______________________________________________ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying