devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fdtget-runtest.sh: Fix failures when /bin/sh isn't bash
@ 2012-03-21  2:23 Stephen Warren
       [not found] ` <1332296626-19707-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Warren @ 2012-03-21  2:23 UTC (permalink / raw)
  To: David Gibson, Jon Loeliger; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

On Ubuntu, /bin/sh is dash (at least by default), and dash's echo doesn't
accept the -e option. This means that fdtget-runtest.sh's EXPECT file will
contain "-e foo" rather than just "foo", which causes a test failure.

To work around this, run /bin/echo instead of (builtin) echo, which has
more chance of supporting the -e option.

Another possible fix is to change all the #! lines to /bin/bash rather
than /bin/sh, and change run_tests.sh to invoke sub-scripts using $SHELL
instead of just "sh". However, that would require bash specifically, which
may not be desirable.

Signed-off-by: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
---
 tests/fdtget-runtest.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tests/fdtget-runtest.sh b/tests/fdtget-runtest.sh
index 982fbe1..c3a3559 100755
--- a/tests/fdtget-runtest.sh
+++ b/tests/fdtget-runtest.sh
@@ -8,7 +8,7 @@ rm -f $LOG $EXPECT
 trap "rm -f $LOG $EXPECT" 0
 
 expect="$1"
-echo -e $expect >$EXPECT
+/bin/echo -e $expect >$EXPECT
 shift
 
 verbose_run_log_check "$LOG" $VALGRIND $DTGET "$@"
-- 
1.7.5.4

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

end of thread, other threads:[~2012-11-06 21:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-21  2:23 [PATCH] fdtget-runtest.sh: Fix failures when /bin/sh isn't bash Stephen Warren
     [not found] ` <1332296626-19707-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-03-21  3:26   ` David Gibson
     [not found]     ` <20120321032653.GB15997-MK4v0fQdeXQXU02nzanrWNbf9cGiqdzd@public.gmane.org>
2012-03-26  2:23       ` David Gibson
     [not found]         ` <20120326022350.GA13005-MK4v0fQdeXQXU02nzanrWNbf9cGiqdzd@public.gmane.org>
2012-03-26 13:11           ` Jon Loeliger
     [not found]             ` <E1SC9hv-0007Gm-Py-CYoMK+44s/E@public.gmane.org>
2012-03-26 23:37               ` David Gibson
     [not found]                 ` <20120326233709.GB9357-MK4v0fQdeXQXU02nzanrWNbf9cGiqdzd@public.gmane.org>
2012-03-31 14:17                   ` Jon Loeliger
2012-11-02 20:26   ` Mike Frysinger
     [not found]     ` <201211021626.50503.vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2012-11-05 17:39       ` Stephen Warren
     [not found]         ` <5097F9D2.2040103-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-11-06  7:26           ` David Gibson
     [not found]             ` <20121106072656.GF23553-W9XWwYn+TF0XU02nzanrWNbf9cGiqdzd@public.gmane.org>
2012-11-06 17:27               ` Stephen Warren
     [not found]                 ` <50994892.1070504-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-11-06 21:34                   ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).