diff options
| author | John Snow <jsnow@redhat.com> | 2017-04-27 16:51:00 -0400 |
|---|---|---|
| committer | Max Reitz <mreitz@redhat.com> | 2017-04-28 18:40:41 +0200 |
| commit | cc02e89eb4eb8b1cc43b2bc168dc0fca48ee721f (patch) | |
| tree | f5c06c9499b541e7a78d0eb9c0712c0f319f441d | |
| parent | 4f38497b0fc03dcb24c9014c2cf34d324ab20c1e (diff) | |
| download | focaccia-qemu-cc02e89eb4eb8b1cc43b2bc168dc0fca48ee721f.tar.gz focaccia-qemu-cc02e89eb4eb8b1cc43b2bc168dc0fca48ee721f.zip | |
iotests: fix exclusion option
If you are running out-of-tree, the -x option to exclude a certain iotest is broken. Replace porcelain usage of ls with a sturdier awk command. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20170427205100.9505-3-jsnow@redhat.com Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
| -rw-r--r-- | tests/qemu-iotests/common | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common index fa8e69e74c..f2a7199c4b 100644 --- a/tests/qemu-iotests/common +++ b/tests/qemu-iotests/common @@ -86,7 +86,8 @@ s/ .*//p elif $xgroup then # arg after -x - [ ! -s $tmp.list ] && ls [0-9][0-9][0-9] [0-9][0-9][0-9][0-9] >$tmp.list 2>/dev/null + # Populate $tmp.list with all tests + awk '/^[0-9]{3,}/ {print $1}' "${source_iotests}/group" > $tmp.list 2>/dev/null group_list=`sed -n <"$source_iotests/group" -e 's/$/ /' -e "/^[0-9][0-9][0-9].* $r /"'{ s/ .*//p }'` |