Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | From 59fd750a84bbe5874dec936d2bee9ef11a1b6505 Mon Sep 17 00:00:00 2001 |
| 2 | From: Li xin <lixin.fnst@cn.fujitsu.com> |
| 3 | Date: Tue, 21 Jul 2015 02:01:22 +0900 |
| 4 | Subject: [PATCH] Fix the test output format |
| 5 | |
| 6 | Upstream-Status: Pending |
| 7 | |
| 8 | Signed-off-by: Roy Li <rongqing.li@windriver.com> |
| 9 | Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com> |
| 10 | --- |
| 11 | test/regress | 6 +++--- |
| 12 | test/regress2 | 11 +++++------ |
| 13 | 2 files changed, 8 insertions(+), 9 deletions(-) |
| 14 | |
| 15 | diff --git a/test/regress b/test/regress |
| 16 | index 2ce1705..d086a47 100755 |
| 17 | --- a/test/regress |
| 18 | +++ b/test/regress |
| 19 | @@ -74,6 +74,7 @@ probe_hardware() |
| 20 | if [ $numnodes -lt 2 ] ; then |
| 21 | echo "need at least two nodes with at least $NEEDPAGES each of" |
| 22 | echo "free memory for mempolicy regression tests" |
| 23 | + echo "FAIL: numa regress" |
| 24 | exit 77 # Skip test |
| 25 | fi |
| 26 | } |
| 27 | @@ -207,10 +208,9 @@ main() |
| 28 | rm A B |
| 29 | |
| 30 | if [ "$EXIT" = 0 ] ; then |
| 31 | - echo '========SUCCESS' |
| 32 | + echo 'PASS: numactl regress' |
| 33 | else |
| 34 | - echo '========FAILURE' |
| 35 | - exit 1 |
| 36 | + echo 'FAIL: numactl regress' |
| 37 | fi |
| 38 | } |
| 39 | |
| 40 | diff --git a/test/regress2 b/test/regress2 |
| 41 | index aa6ea41..450c510 100755 |
| 42 | --- a/test/regress2 |
| 43 | +++ b/test/regress2 |
| 44 | @@ -9,12 +9,11 @@ testdir=`dirname "$0"` |
| 45 | export PATH=${builddir}:$PATH |
| 46 | |
| 47 | T() { |
| 48 | - echo "$@" |
| 49 | - if ! $VALGRIND "$@" ; then |
| 50 | - echo $1 FAILED!!!! |
| 51 | - exit 1 |
| 52 | - fi |
| 53 | - echo |
| 54 | + if ! $VALGRIND "$@" 2>&1 1>/dev/null; then |
| 55 | + echo "FAIL: $1" |
| 56 | + else |
| 57 | + echo "PASS: $1" |
| 58 | + fi |
| 59 | } |
| 60 | |
| 61 | # still broken |
| 62 | -- |
| 63 | 1.8.4.2 |
| 64 | |