aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-12-11 01:26:47 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-12-11 14:13:38 +0100
commit6c10d780aaea82e888e28dbed259c49de9c15ee2 (patch)
treee0f8edad82cc97f9948cdba668645d646a104808
parent7a9da618ba96a30e8a09543cac030c4d44b829a7 (diff)
downloadsparse-6c10d780aaea82e888e28dbed259c49de9c15ee2.tar.gz
testsuite: fix parsing of tags used in the testcases
In testcases' tags, if a value contains 'check-' then this value will be used as the tagname instead of the value. Fix this by adding a bit more context in the regexp used for parsing these. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--validation/asm-empty-clobber.c2
-rw-r--r--validation/asm-goto-labels.c3
-rwxr-xr-xvalidation/test-suite4
3 files changed, 5 insertions, 4 deletions
diff --git a/validation/asm-empty-clobber.c b/validation/asm-empty-clobber.c
index eb1e1058..a79336da 100644
--- a/validation/asm-empty-clobber.c
+++ b/validation/asm-empty-clobber.c
@@ -23,6 +23,6 @@ do_trace:
}
/*
- * check-name: Asm with goto labels.
+ * check-name: Asm with goto labels.
*/
diff --git a/validation/asm-goto-labels.c b/validation/asm-goto-labels.c
index ac2bf2ad..85e1b61b 100644
--- a/validation/asm-goto-labels.c
+++ b/validation/asm-goto-labels.c
@@ -16,7 +16,8 @@ static inline int __static_cpu_has(unsigned char bit)
t_no:
return 0;
}
+
/*
- * check-name: Asm with goto labels.
+ * check-name: Asm with goto labels.
*/
diff --git a/validation/test-suite b/validation/test-suite
index 6935d40c..1b05c75e 100755
--- a/validation/test-suite
+++ b/validation/test-suite
@@ -84,8 +84,8 @@ get_tag_value()
check_assert=""
check_cpp_if=""
- lines=$(grep 'check-[a-z-]*' $1 | \
- sed -e 's/^.*\(check-[a-z-]*:*\) *\(.*\)$/\1 \2/')
+ lines=$(grep '^ \* check-[a-z-]*' $1 | \
+ sed -e 's/^ \* \(check-[a-z-]*:*\) *\(.*\)$/\1 \2/')
while read tag val; do
#echo "-> tag: '$tag'"