about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-06-08 07:00:08 +0000
committerEric Wong <normalperson@yhbt.net>2010-06-08 07:00:08 +0000
commit2760d1e0d459a8e92eadf78cdf9f09d6a3109003 (patch)
tree57df2907f32e5eaedac9eb927a60ee2e685ad367 /t
parent9110e76b36e224434aaa853625844f3b1ad69ae1 (diff)
downloadunicorn-2760d1e0d459a8e92eadf78cdf9f09d6a3109003.tar.gz
In parallel with other of Rubies, of course.  We need to rely on
RUBY_ENGINE since RUBY_VERSION is 1.8.7 and that conflicts with
the most popular MRI version.

Since Rubinius doesn't support some command-line options, we
still need to rely on MRI for a few things.  Also fixing an
embarrassing UUoC in the process.
Diffstat (limited to 't')
-rw-r--r--t/GNUmakefile7
-rw-r--r--t/test-lib.sh3
2 files changed, 7 insertions, 3 deletions
diff --git a/t/GNUmakefile b/t/GNUmakefile
index 0d4a4b4..e80c43a 100644
--- a/t/GNUmakefile
+++ b/t/GNUmakefile
@@ -14,12 +14,15 @@ ifeq ($(RUBY_VERSION),)
   $(error unable to detect RUBY_VERSION)
 endif
 
+RUBY_ENGINE := $(shell $(RUBY) -e 'puts((RUBY_ENGINE rescue "ruby"))')
+export RUBY_ENGINE
+
 T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
 
 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
@@ -48,7 +51,7 @@ $(deps):
         @mv $@.$(pid) $@
 dep: $(deps)
 
-test_prefix := $(CURDIR)/../test/install-$(RUBY_VERSION)
+test_prefix := $(CURDIR)/../test/$(RUBY_ENGINE)-$(RUBY_VERSION)
 $(test_prefix)/.stamp:
         $(MAKE) -C .. test-install
 
diff --git a/t/test-lib.sh b/t/test-lib.sh
index e5c4b2f..22497f3 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -7,7 +7,8 @@ set +u
 set -e
 RUBY="${RUBY-ruby}"
 RUBY_VERSION=${RUBY_VERSION-$($RUBY -e 'puts RUBY_VERSION')}
-t_pfx=$PWD/trash/$T-$RUBY_VERSION
+RUBY_ENGINE=${RUBY_ENGINE-$($RUBY -e 'puts((RUBY_ENGINE rescue "ruby"))')}
+t_pfx=$PWD/trash/$T-$RUBY_ENGINE-$RUBY_VERSION
 set -u
 
 PATH=$PWD/bin:$PATH