From: Fam Zheng Date: Wed, 24 Sep 2014 03:05:57 +0000 (+0800) Subject: qemu-iotests: Fail test if explicit test case number is unknown X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~546^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c9d17ad0dd3f04cdef44d58db97ea9864fbcdee7;p=sdk%2Femulator%2Fqemu.git qemu-iotests: Fail test if explicit test case number is unknown When we expand a number range, we just print "$id - unknown test, ignored", this is convenient if we want to run a range of tests. When we designate a test case number explicitly, we shouldn't just ignore it if the case script doesn't exist. Print an error and fail the test. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common index 89c6dde..9e12bec 100644 --- a/tests/qemu-iotests/common +++ b/tests/qemu-iotests/common @@ -376,10 +376,16 @@ BEGIN { for (t='$start'; t<='$end'; t++) printf "%03d\n",t }' \ echo $id >>$tmp.list else # oops - echo "$id - unknown test, ignored" + if [ "$start" == "$end" -a "$id" == "$end" ] + then + echo "$id - unknown test" + exit 1 + else + echo "$id - unknown test, ignored" + fi fi fi - done + done || exit 1 fi done