[PATCH 1/3] Align FAILED to test name to be parsable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Gilles Espinasse <g.esp@xxxxxxx>

So 'grep FAILED log' is now meaningfull.
Let both stdout and sderr be displayed after a failed test
---
 test |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/test b/test
index 9340afe..2bb482c 100755
--- a/test
+++ b/test
@@ -222,12 +222,13 @@ do_test() {
     # source script in a subshell, so it has access to our
     # namespace, but cannot change it.
     echo -ne "$_script... "
-    if ( set -ex ; . $_script )  2> $targetdir/log
+    if ( set -ex ; . $_script ) &> $targetdir/log
     then
       echo "succeeded"
       _fail=0
     else
-      echo "FAILED - see $targetdir/log for details"
+      echo "FAILED"
+      cat $targetdir/log
       _fail=1
     fi
     if [ "$savelogs" == "1" ]; then
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux