aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorPekka Enberg <penberg@kernel.org>2011-08-22 16:57:27 +0300
committerChristopher Li <sparse@chrisli.org>2011-08-24 20:43:19 -0700
commita7a00d5108c36b8baaf54814aa1f42583dabc754 (patch)
tree7b270e1a6cfb81efd16b73295f83e9006135fb9f /validation
parent6afef22e1e3c2a7e6dab464706c80f4541f90a4b (diff)
downloadsparse-dev-a7a00d5108c36b8baaf54814aa1f42583dabc754.tar.gz
Show expected vs. actual output on test failure
This patch changes 'make check' output to show sparse output compared to expected results upon unexpected test failure. For example, static-forward-decl.c output would look like this if it would not be tagged as "known to fail": TEST static forward declaration (static-forward-decl.c) error: actual error text does not match expected error text. --- static-forward-decl.c.error.expected 2011-08-22 06:29:40.000000000 +0000 +++ static-forward-decl.c.error.got 2011-08-22 06:29:40.000000000 +0000 @@ -0,0 +1 @@ +static-forward-decl.c:3:5: warning: symbol 'f' was not declared. Should it be static? error: see static-forward-decl.c.error.* for further investigation. info: test 'static-forward-decl.c' is known to fail This makes it easier to detect and analyze test breakage. Cc: Christopher Li <sparse@chrisli.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'validation')
-rwxr-xr-xvalidation/test-suite1
1 files changed, 1 insertions, 0 deletions
diff --git a/validation/test-suite b/validation/test-suite
index 42f7bd7d..3c011c6a 100755
--- a/validation/test-suite
+++ b/validation/test-suite
@@ -130,6 +130,7 @@ do_test()
if [ "$?" -ne "0" ]; then
error "actual $stream text does not match expected $stream text."
error "see $file.$stream.* for further investigation."
+ cat "$file".$stream.diff
test_failed=1
fi
done