From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH 06/16] testsuite: add & use warning()
Date: Fri, 8 Dec 2017 14:14:45 +0100 [thread overview]
Message-ID: <20171208131455.7786-7-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20171208131455.7786-1-luc.vanoostenryck@gmail.com>
Allow this new helper to indicate wich file trigger the
warning and replace the existing call to 'echo "warning: ...'.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
validation/test-suite | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/validation/test-suite b/validation/test-suite
index f04d81779..420214c65 100755
--- a/validation/test-suite
+++ b/validation/test-suite
@@ -51,6 +51,14 @@ verbose()
return 0
}
+##
+# warning(string) - prints a warning
+warning()
+{
+ [ "$quiet" -ne 1 ] && echo "warning: $1"
+ return 0
+}
+
##
# error(string[, die]) - prints an error and exits with value die if given
error()
@@ -253,7 +261,7 @@ do_test()
# can this test be handled by test-suite ?
# (it has to have a check-name key in it)
if [ "$check_name" = "" ]; then
- echo "warning: test '$file' unhandled"
+ warning "$file: test unhandled"
unhandled_tests=$(($unhandled_tests + 1))
return 2
fi
--
2.15.0
next prev parent reply other threads:[~2017-12-08 13:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-08 13:14 [PATCH 00/16] testsuite improvements Luc Van Oostenryck
2017-12-08 13:14 ` [PATCH 01/16] testsuite: make the '%.t' rule depends on PROGRAMS too Luc Van Oostenryck
2017-12-08 13:14 ` [PATCH 02/16] testsuite: fix a few more incorrect check-commands Luc Van Oostenryck
2017-12-08 13:14 ` [PATCH 03/16] testsuite: convert to the new pattern syntax Luc Van Oostenryck
2017-12-08 13:14 ` [PATCH 04/16] testsuite: remove old ugly " Luc Van Oostenryck
2017-12-08 13:14 ` [PATCH 05/16] testsuite: move verbose/error() before get_tag_value() Luc Van Oostenryck
2017-12-08 13:14 ` Luc Van Oostenryck [this message]
2017-12-08 13:14 ` [PATCH 07/16] testsuite: reset 'quiet' at the start of each testcase Luc Van Oostenryck
2017-12-08 13:14 ` [PATCH 08/16] testsuite: fix invalid 'check-...' tags Luc Van Oostenryck
2017-12-08 13:14 ` [PATCH 09/16] testsuite: validate the " Luc Van Oostenryck
2017-12-08 13:14 ` [PATCH 10/16] testsuite: early return in getopt loop Luc Van Oostenryck
2017-12-08 13:14 ` [PATCH 11/16] testsuite: move do_test_suite out of the " Luc Van Oostenryck
2017-12-08 13:14 ` [PATCH 12/16] testsuite: move no-arg " Luc Van Oostenryck
2017-12-08 13:14 ` [PATCH 13/16] testsuite: change do_usage text Luc Van Oostenryck
2017-12-08 13:14 ` [PATCH 14/16] testsuite: allow to test only a subdir Luc Van Oostenryck
2017-12-08 13:14 ` [PATCH 15/16] testsuite: default to shift in the getopt loop Luc Van Oostenryck
2017-12-08 13:14 ` [PATCH 16/16] testsuite: add support for 'format -a' Luc Van Oostenryck
2017-12-09 2:09 ` [PATCH 00/16] testsuite improvements Christopher Li
2017-12-10 17:25 ` Luc Van Oostenryck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171208131455.7786-7-luc.vanoostenryck@gmail.com \
--to=luc.vanoostenryck@gmail.com \
--cc=linux-sparse@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).