All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH OSSTEST v2] standalone: Log things we are running via with_logging
@ 2015-12-04 15:27 Ian Campbell
  2015-12-08 14:26 ` Ian Jackson
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Campbell @ 2015-12-04 15:27 UTC (permalink / raw)
  To: ian.jackson, xen-devel; +Cc: Ian Campbell

Turning on set -x generally in this script is too verbose, so run the
command in a subshell which sets -x.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: Use set -x in a sub shell
---
 standalone | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/standalone b/standalone
index c804b74..499cb6c 100755
--- a/standalone
+++ b/standalone
@@ -195,7 +195,7 @@ with_logging() {
     if command -v savelog >/dev/null ; then
         savelog -c 300 -n "$log" >/dev/null
     fi
-    "$@" 2>&1 | tee "$log"
+    ( set -x ; "$@" ) 2>&1 | tee "$log"
     rc=${PIPESTATUS[0]}
     if [ $rc -ne 0 ] ; then
 	echo "FAILED rc=${rc}" >&2
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH OSSTEST v2] standalone: Log things we are running via with_logging
  2015-12-04 15:27 [PATCH OSSTEST v2] standalone: Log things we are running via with_logging Ian Campbell
@ 2015-12-08 14:26 ` Ian Jackson
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Jackson @ 2015-12-08 14:26 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("[PATCH OSSTEST v2] standalone: Log things we are running via with_logging"):
> Turning on set -x generally in this script is too verbose, so run the
> command in a subshell which sets -x.
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

(I will pick this up into my queue)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-08 14:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-04 15:27 [PATCH OSSTEST v2] standalone: Log things we are running via with_logging Ian Campbell
2015-12-08 14:26 ` Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.