about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-06-29 03:06:56 -0700
committerEric Wong <normalperson@yhbt.net>2009-06-29 04:07:01 -0700
commit0127374ed2e4028ca8e164c2cfba357b53960a10 (patch)
tree0bf1896748d71c083f29b4c3a952ee7a708a2804
parent93f55bb8802866e8f9a2d741ecec6a75973f2c72 (diff)
downloadunicorn-0127374ed2e4028ca8e164c2cfba357b53960a10.tar.gz
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).
-rw-r--r--GNUmakefile5
1 files changed, 4 insertions, 1 deletions
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 ,$@))