Sha256: 2c7bd15880d41ec5767b94563d8572e35f6cd24c1b9aa1746326b72ba4e195bb
Contents?: true
Size: 1.41 KB
Versions: 11
Compression:
Stored size: 1.41 KB
Contents
# we can run tests in parallel with GNU make all:: pid := $(shell echo $$PPID) RUBY = ruby my_lib := $(shell cd ../lib && pwd) -include ../local.mk ifeq ($(RUBY_VERSION),) RUBY_VERSION := $(shell $(RUBY) -e 'puts RUBY_VERSION') endif ifeq ($(RUBY_VERSION),) $(error unable to detect RUBY_VERSION) endif RUBY_ENGINE := $(shell $(RUBY) -e 'puts((RUBY_ENGINE rescue "ruby"))') export RUBY_VERSION RUBY_ENGINE ifeq ($(RUBYLIB),) RUBYLIB := $(my_lib) else RUBYLIB := $(my_lib):$(RUBYLIB) endif export RUBYLIB 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_ENGINE)-$(RUBY_VERSION) TEST_OPTS = # TRACER = strace -f -o $(t_pfx).strace -s 100000 # TRACER = /usr/bin/time -o $(t_pfx).time ifdef V ifeq ($(V),2) TEST_OPTS += --trace else TEST_OPTS += --verbose endif endif random_blob: dd if=/dev/urandom bs=1M count=1 of=$@.$(pid) mv $@.$(pid) $@ $(T): random_blob dependencies := curl sqlite3 deps := $(addprefix .dep+,$(dependencies)) $(deps): dep_bin = $(lastword $(subst +, ,$@)) $(deps): @which $(dep_bin) > $@.$(pid) 2>/dev/null || : @test -s $@.$(pid) || \ { echo >&2 "E '$(dep_bin)' not found in PATH=$(PATH)"; exit 1; } @mv $@.$(pid) $@ $(T): $(deps) $(TRACER) $(SHELL) $(SH_TEST_OPTS) $@ $(TEST_OPTS) clean: $(RM) -r trash/*.log trash/*.code test-bin-$(RUBY_VERSION) .PHONY: $(T) clean
Version data entries
11 entries across 11 versions & 1 rubygems