chiark / gitweb /
server/tests.at: Don't run strace(1) unconditionally.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 24 May 2014 13:00:03 +0000 (14:00 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 20 Jul 2014 00:42:31 +0000 (01:42 +0100)
It slows things down, might not be available, and doesn't work in
Scratchbox (because QEmu doesn't implement ptrace(2)).

server/tests.at

index 7a64cb4..e3813d7 100644 (file)
@@ -91,12 +91,19 @@ $3
 ## have the child process run in another.
 ) && :; } | {
   cd $1
-  mkdir -p strace-hack/
   echo TRIPE $2 >&2
-  (cd strace-hack/
-   ulimit -c hard >/dev/null 2>&1
-   strace -f -o ../tripe.trace \
-     TRIPE -d.. $2 >../server-output.full 2>../server-errors)
+  case "${TRIPE_TEST_STRACE-nil}" in
+    nil)
+      TRIPE -d. $2 >server-output.full 2>server-errors
+      ;;
+    *)
+      mkdir -p strace-hack/
+      (cd strace-hack/
+       ulimit -c hard >/dev/null 2>&1
+       strace -f -o ../tripe.trace \
+        TRIPE -d.. $2 >../server-output.full 2>../server-errors)
+      ;;
+  esac
   stat=$?
   echo $stat >server-status
   if test $stat -ne 0; then