From 9a439f77aada273a18fb473b84641e4611344ab5 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 6 Oct 2009 00:55:34 -0700 Subject: tests: move trash files to their own trash/ directory Avoid cluttering the directory we write tests in --- t/.gitignore | 2 -- t/GNUmakefile | 11 ++++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 't') diff --git a/t/.gitignore b/t/.gitignore index d2d3d0e..3003730 100644 --- a/t/.gitignore +++ b/t/.gitignore @@ -1,5 +1,3 @@ /test-results-* /test-bin-* -/*.code -/*.log /random_blob diff --git a/t/GNUmakefile b/t/GNUmakefile index 76776da..8613baa 100644 --- a/t/GNUmakefile +++ b/t/GNUmakefile @@ -21,8 +21,8 @@ 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_code = $@-$(RUBY_VERSION).code -t_log = $@-$(RUBY_VERSION).log +t_code = trash/$@-$(RUBY_VERSION).code +t_log = trash/$@-$(RUBY_VERSION).log t_run = $(TRACER) $(SHELL) $(TEST_OPTS) $@ # prefix stdout messages with ':', and stderr messages with '!' @@ -63,12 +63,17 @@ random_blob: $(addsuffix .sh,$(req_random_blob)): random_blob +$(T): trash/.gitignore $(T): export ruby := $(ruby) $(T): export PATH := $(CURDIR)/test-bin-$(RUBY_VERSION):$(PATH) $(T): test-bin-$(RUBY_VERSION)/rainbows $(run_test) +trash/.gitignore: + mkdir -p $(@D) + echo '*' > $@ + clean: - $(RM) -r *.log *.code test-bin-$(RUBY_VERSION) + $(RM) -r trash/*.log trash/*.code test-bin-$(RUBY_VERSION) .PHONY: $(T) clean -- cgit v1.2.3-24-ge0c7