diff mbox

mvtest: change "FSQA Test No." when we renumber tests

Message ID 20170123185224.GF14029@birch.djwong.org (mailing list archive)
State New, archived
Headers show

Commit Message

Darrick J. Wong Jan. 23, 2017, 6:52 p.m. UTC
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>
---
 tools/mvtest |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Eryu Guan Jan. 24, 2017, 3:20 a.m. UTC | #1
On Mon, Jan 23, 2017 at 10:52:24AM -0800, Darrick J. Wong wrote:
> 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.

Seems that's another reason to use "./new" to create test template :)

> 
> Also fix a sed bug that deletes too many group lines.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Thank you!

Eryu
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tools/mvtest b/tools/mvtest
index 20bc23e..572ae14 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"