diff options
Diffstat (limited to 't')
-rw-r--r-- | t/.gitignore | 1 | ||||
-rw-r--r-- | t/GNUmakefile | 12 |
2 files changed, 12 insertions, 1 deletions
diff --git a/t/.gitignore b/t/.gitignore index 3003730..bee30c6 100644 --- a/t/.gitignore +++ b/t/.gitignore @@ -1,3 +1,4 @@ /test-results-* /test-bin-* /random_blob +/.dep+* diff --git a/t/GNUmakefile b/t/GNUmakefile index 5084643..d1b09cf 100644 --- a/t/GNUmakefile +++ b/t/GNUmakefile @@ -73,12 +73,22 @@ random_blob: $(T): random_blob +dependencies := socat curl +deps := $(addprefix .dep+,$(dependencies)) +$(deps): dep_bin = $(lastword $(subst +, ,$@)) +$(deps): + @which $(dep_bin) > $@+ 2>/dev/null || : + @test -s $@+ || \ + { echo >&2 "E `$(dep_bin)' not found in PATH=$(PATH)"; exit 1; } + @mv $@+ $@ +dep: $(deps) + $(MODEL_T): export model = $(firstword $(subst ., ,$@)) $(MODEL_T): script = $(subst $(model).,,$@) $(MODEL_T): trash/.gitignore $(MODEL_T): export RUBY := $(RUBY) $(MODEL_T): export PATH := $(CURDIR)/test-bin-$(RUBY_VERSION):$(PATH) -$(MODEL_T): test-bin-$(RUBY_VERSION)/rainbows +$(MODEL_T): test-bin-$(RUBY_VERSION)/rainbows dep $(TRACER) $(SHELL) $(SH_TEST_OPTS) $(script) $(TEST_OPTS) trash/.gitignore: |