diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-06-11 08:47:41 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-06-11 08:48:07 +0000 |
commit | 0a3e9cacd7ca2feb91bae23b0c678d5e986f866f (patch) | |
tree | 321d8960d0a6711ccefdc12b759cfa890c4d93f2 /t/GNUmakefile | |
parent | 37687e027233072582c28bdd1530047a40ef7869 (diff) | |
download | rainbows-0a3e9cacd7ca2feb91bae23b0c678d5e986f866f.tar.gz |
Rubinius still has a few issues that prevent 100% support, but it basically works if log rotation or USR2 upgrades aren't required. Tickets for all known issues for Rubinius have been filed on the project's issue tracker. * rbx does not support -i/-p yet, so rely on MRI for that * "io/nonblock" is missing * avoiding any optional Gems for now (EM, Rev, etc..)
Diffstat (limited to 't/GNUmakefile')
-rw-r--r-- | t/GNUmakefile | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/t/GNUmakefile b/t/GNUmakefile index 2e86d24..2402257 100644 --- a/t/GNUmakefile +++ b/t/GNUmakefile @@ -4,6 +4,7 @@ all:: pid := $(shell echo $$PPID) +MRI = ruby RUBY = ruby rainbows_lib := $(shell cd ../lib && pwd) -include ../local.mk @@ -15,7 +16,8 @@ ifeq ($(RUBY_VERSION),) $(error unable to detect RUBY_VERSION) endif -export RUBY_VERSION +RUBY_ENGINE := $(shell $(RUBY) -e 'puts((RUBY_ENGINE rescue "ruby"))') +export RUBY_VERSION RUBY_ENGINE models += WriterThreadPool models += WriterThreadSpawn @@ -27,13 +29,15 @@ models += NeverBlock models += RevThreadSpawn models += RevThreadPool -rp := ) -ONENINE := $(shell case $(RUBY_VERSION) in 1.9.*$(rp) echo true;;esac) -ifeq ($(ONENINE),true) - models += Revactor - models += FiberSpawn - models += RevFiberSpawn - models += FiberPool +ifeq ($(RUBY_ENGINE),ruby) + rp := ) + ONENINE := $(shell case $(RUBY_VERSION) in 1.9.*$(rp) echo true;;esac) + ifeq ($(ONENINE),true) + models += Revactor + models += FiberSpawn + models += RevFiberSpawn + models += FiberPool + endif endif all_models := $(models) Base @@ -60,7 +64,7 @@ $(all_models): all:: $(T) # can't rely on "set -o pipefail" since we don't require bash or ksh93 :< -t_pfx = trash/$@-$(RUBY_VERSION) +t_pfx = trash/$@-$(RUBY_ENGINE)-$(RUBY_VERSION) TEST_OPTS = # TRACER = strace -f -o $(t_pfx).strace -s 100000 # TRACER = /usr/bin/time -o $(t_pfx).time @@ -73,11 +77,13 @@ ifdef V endif endif -test-bin-$(RUBY_VERSION)/rainbows: ruby_bin = $(shell which $(RUBY)) -test-bin-$(RUBY_VERSION)/rainbows: ../bin/rainbows +bindir := $(CURDIR)/bin-$(RUBY_ENGINE)-$(RUBY_VERSION) +bin_rainbows := $(bindir)/rainbows +$(bin_rainbows): ruby_bin = $(shell which $(RUBY)) +$(bin_rainbows): ../bin/rainbows mkdir -p $(@D) install -m 755 $^ $@.$(pid) - $(RUBY) -i -p -e '$$_.gsub!(%r{^#!.*$$},"#!$(ruby_bin)")' $@.$(pid) + $(MRI) -i -p -e '$$_.gsub!(%r{^#!.*$$},"#!$(ruby_bin)")' $@.$(pid) mv $@.$(pid) $@ random_blob: @@ -95,18 +101,18 @@ $(deps): { echo >&2 "E '$(dep_bin)' not found in PATH=$(PATH)"; exit 1; } @mv $@.$(pid) $@ -libs := tmp/isolate/ruby-$(RUBY_VERSION)/.libs +libs := tmp/isolate/$(RUBY_ENGINE)-$(RUBY_VERSION)/.libs $(libs): test_isolate.rb mkdir -p $(@D) $(RUBY) $< > $@+ mv $@+ $@ -t_deps := $(libs) $(deps) test-bin-$(RUBY_VERSION)/rainbows trash/.gitignore +t_deps := $(libs) $(deps) $(bin_rainbows) trash/.gitignore $(T): $(t_deps) $(MODEL_T): export model = $(firstword $(subst ., ,$@)) $(MODEL_T): script = $(subst $(model).,,$@) $(MODEL_T): export RUBY := $(RUBY) -$(MODEL_T): export PATH := $(CURDIR)/test-bin-$(RUBY_VERSION):$(PATH) +$(MODEL_T): export PATH := $(bindir):$(PATH) $(MODEL_T): $(t_deps) RUBYLIB=$(rainbows_lib):$$(cat $(libs)) \ $(TRACER) $(SHELL) $(SH_TEST_OPTS) $(script) $(TEST_OPTS) @@ -116,6 +122,6 @@ trash/.gitignore: echo '*' > $@ clean: - $(RM) -r trash/*.log trash/*.code test-bin-$(RUBY_VERSION) + $(RM) -r trash/*.log trash/*.code $(bindir) .PHONY: $(T) clean |