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