[PATCH 06/16] testsuite: add & use warning()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux