]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake-runtask-strace: simple shell script to wrap tasks in a strace call
authorJoshua Lock <josh@linux.intel.com>
Fri, 8 Oct 2010 17:20:44 +0000 (18:20 +0100)
committerSaul Wold <sgw@linux.intel.com>
Mon, 15 Nov 2010 05:08:27 +0000 (21:08 -0800)
Signed-off-by: Joshua Lock <josh@linux.intel.com>
bitbake/bin/bitbake-runtask-strace [new file with mode: 0755]

diff --git a/bitbake/bin/bitbake-runtask-strace b/bitbake/bin/bitbake-runtask-strace
new file mode 100755 (executable)
index 0000000..1741a84
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+STRACE=`which strace`
+
+if [ ! -x "$STRACE" ]; then
+    bitbake-runtask $1 $2 $3 $4
+else
+    strace -f -o $TRACE_LOGFILE-$3.log -e trace=open,execve bitbake-runtask $1 $2 $3 $4
+fi