From 0127374ed2e4028ca8e164c2cfba357b53960a10 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 29 Jun 2009 03:06:56 -0700 Subject: GNUmakefile: allow TRACER= to be specified for tests This can allow you to run make with: TRACER='strace -f -o $(t).strace -s 100000' to debug a test failure (it should be usable with truss, ltrace, and other similar tools). --- GNUmakefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index 6291f93..6a9bd7a 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -83,7 +83,10 @@ else quiet_post = && > $(stamp) )2>&1 | tee $(t); \ rm $(stamp) 2>/dev/null && $(check_test) endif -run_test = $(quiet_pre) setsid $(ruby) -w $(arg) $(TEST_OPTS) $(quiet_post) || \ + +# TRACER='strace -f -o $(t).strace -s 100000' +run_test = $(quiet_pre) \ + setsid $(TRACER) $(ruby) -w $(arg) $(TEST_OPTS) $(quiet_post) || \ (sed "s,^,$(extra): ," >&2 < $(t); exit 1) %.n: arg = $(subst .n,,$(subst --, -n ,$@)) -- cgit v1.2.3-24-ge0c7