Skip to content
Snippets Groups Projects
Commit bf75d752 authored by Thomas Huth's avatar Thomas Huth Committed by Alex Bennée
Browse files

tests/qemu-iotests/check: Allow tests without groups


The regular expressions in the "check" script currently expect that there
is always a space after the test number in the group file, so you can't
have a test in there without a group unless the line still ends with a
space - which is quite error prone since some editors might remove spaces
at the end of lines automatically.
Thus let's fix the regular expressions so that it is also possible to
have lines with one test number only in the group file.

Suggested-by: default avatarMax Reitz <mreitz@redhat.com>
Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
Message-Id: <20190717111947.30356-2-thuth@redhat.com>
Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
parent 2b0c4fa1
No related branches found
No related tags found
No related merge requests found
......@@ -488,7 +488,7 @@ testlist options
BEGIN { for (t='$start'; t<='$end'; t++) printf "%03d\n",t }' \
| while read id
do
if grep -s "^$id " "$source_iotests/group" >/dev/null
if grep -s "^$id\( \|\$\)" "$source_iotests/group" >/dev/null
then
# in group file ... OK
echo $id >>$tmp.list
......@@ -547,7 +547,7 @@ else
touch $tmp.list
else
# no test numbers, do everything from group file
sed -n -e '/^[0-9][0-9][0-9]*/s/[ ].*//p' <"$source_iotests/group" >$tmp.list
sed -n -e '/^[0-9][0-9][0-9]*/s/^\([0-9]*\).*/\1/p' <"$source_iotests/group" >$tmp.list
fi
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment