From patchwork Tue Aug 30 19:24:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pekka Enberg X-Patchwork-Id: 1114232 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7UJOLdU015778 for ; Tue, 30 Aug 2011 19:24:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756212Ab1H3TYV (ORCPT ); Tue, 30 Aug 2011 15:24:21 -0400 Received: from filtteri5.pp.htv.fi ([213.243.153.188]:56535 "EHLO filtteri5.pp.htv.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756191Ab1H3TYU (ORCPT ); Tue, 30 Aug 2011 15:24:20 -0400 Received: from localhost (localhost [127.0.0.1]) by filtteri5.pp.htv.fi (Postfix) with ESMTP id 85EED5A62C2; Tue, 30 Aug 2011 22:24:18 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at pp.htv.fi Received: from smtp6.welho.com ([213.243.153.40]) by localhost (filtteri5.pp.htv.fi [213.243.153.188]) (amavisd-new, port 10024) with ESMTP id AzRMKHAksmZU; Tue, 30 Aug 2011 22:24:18 +0300 (EEST) Received: from localhost.localdomain (cs181136138.pp.htv.fi [82.181.136.138]) by smtp6.welho.com (Postfix) with ESMTP id 0CD285BC005; Tue, 30 Aug 2011 22:24:18 +0300 (EEST) From: Pekka Enberg To: linux-sparse@vger.kernel.org Cc: Pekka Enberg , Ben Pfaff , =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= , Christopher Li , Linus Torvalds Subject: [PATCH v2] sparse: Reduce 'test-suite' run output Date: Tue, 30 Aug 2011 22:24:16 +0300 Message-Id: <1314732256-6113-1-git-send-email-penberg@kernel.org> X-Mailer: git-send-email 1.7.4.1 MIME-Version: 1.0 Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 30 Aug 2011 19:24:22 +0000 (UTC) There's more than 100 tests in the validation test suite. That makes it cumbersome to notice test breakage in because the results don't fit on single page. We don't expect to see most tests to pass so it's much more convenient to only be verbose for failing test cases. This patch changes the 'test-suite' output to report progress on a single line unless a test case fails. Current master 'make check' output looks as follows: Makefile:53: Your system does not have libxml, disabling c2xml TEST preprocessor/preprocessor14.c ( Preprocessor #14) error: actual output text does not match expected output text. error: see preprocessor/preprocessor14.c.output.* for further investigation. --- preprocessor/preprocessor14.c.output.expected 2011-08-26 05:47:22.000000000 +0000 +++ preprocessor/preprocessor14.c.output.got 2011-08-26 05:47:22.000000000 +0000 @@ -1,2 +1,2 @@ - +, info: test 'preprocessor/preprocessor14.c' is known to fail TEST static-forward-decl.c ( static forward declaration) error: actual error text does not match expected error text. error: see static-forward-decl.c.error.* for further investigation. --- static-forward-decl.c.error.expected 2011-08-26 05:47:22.000000000 +0000 +++ static-forward-decl.c.error.got 2011-08-26 05:47:22.000000000 +0000 @@ -0,0 +1 @@ +static-forward-decl.c:3:5: warning: symbol 'f' was not declared. Should it be static? info: test 'static-forward-decl.c' is known to fail TEST varargs1.c ( Varargs bogus warning regression test #1) Out of 102 tests, 100 passed, 2 failed (2 of them are known to fail) Cc: Ben Pfaff Cc: Jonathan Neuschäfer Cc: Christopher Li Cc: Linus Torvalds Signed-off-by: Pekka Enberg --- - v1 -> v2: Fix non-terminal output formatting validation/test-suite | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/validation/test-suite b/validation/test-suite index 3c011c6..543a94a 100755 --- a/validation/test-suite +++ b/validation/test-suite @@ -94,8 +94,11 @@ do_test() return 2 fi test_name=$last_result - - echo " TEST $test_name ($file)" + if test -t 1; then + printf "\r TEST %-80s" "$file ($test_name)" + else + echo " TEST $test_name ($file)" + fi # does the test provide a specific command ? cmd=`eval echo $default_path/$default_cmd` @@ -128,6 +131,7 @@ do_test() for stream in output error; do diff -u "$file".$stream.expected "$file".$stream.got > "$file".$stream.diff if [ "$?" -ne "0" ]; then + echo "" error "actual $stream text does not match expected $stream text." error "see $file.$stream.* for further investigation." cat "$file".$stream.diff @@ -163,6 +167,7 @@ do_test_suite() # prints some numbers tests_nr=`expr $ok_tests + $ko_tests` + echo "" echo -n "Out of $tests_nr tests, $ok_tests passed, $ko_tests failed" echo " ($known_ko_tests of them are known to fail)" if [ "$unhandled_tests" -ne "0" ]; then