summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2017-01-23 10:52:24 -0800
committerEryu Guan <eguan@redhat.com>2017-01-27 16:06:12 +0800
commit4bf2c4461c704ce58a80a3dad3ffa7cca1ffb70f (patch)
treeecc8d5111b4c2320972dcc69012e1a813bf51d56 /tools
parent58da38734d16c0c54ceaaf83407bba84f2c8b0f1 (diff)
mvtest: change "FSQA Test No." when we renumber tests
We have a number of tests (and submitters) who write tests containing "FSQA Test No." (as opposed to "FS QA Test No."), so update the mvtest script to change both forms. Also fix a sed bug that deletes too many group lines. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/mvtest4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/mvtest b/tools/mvtest
index 20bc23ea..572ae14e 100755
--- a/tools/mvtest
+++ b/tools/mvtest
@@ -37,14 +37,14 @@ dgroupfile="tests/${dgroup}/group"
git mv "tests/${src}" "tests/${dest}"
git mv "tests/${src}.out" "tests/${dest}.out"
-sed -e "s/^# FS QA Test No. ${sid}$/# FS QA Test No. ${did}/g" -i "tests/${dest}"
+sed -e "s/^# FS[[:space:]]*QA.*Test.*[0-9]\+$/# FS QA Test No. ${did}/g" -i "tests/${dest}"
sed -e "s/^QA output created by ${sid}$/QA output created by ${did}/g" -i "tests/${dest}.out"
sed -e "s/test-${sid}/test-${did}/g" -i "tests/${dest}.out"
grpline="$(grep "^${sid} " "${sgroupfile}")"
newgrpline="$(echo "${grpline}" | sed -e "s/^${sid} /${did} /g")"
-sed -e "/^${sid}.*$/d" -i "${sgroupfile}"
+sed -e "/^${sid} .*$/d" -i "${sgroupfile}"
cp "${dgroupfile}" "${dgroupfile}.new"
append "${dgroupfile}.new" "${newgrpline}"
"${dir}/sort-group" "${dgroupfile}.new"