Squish: Fix and update tst_rename_file

Change-Id: Idc8134dd0df5df530285525783532c21014087a8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Robert Loehning
2020-02-11 19:30:03 +01:00
parent 0a447dfec8
commit 38d4ccbdcb

View File

@@ -58,11 +58,8 @@ def main():
previous = filenames[-1]
for filename in filenames:
tempFiletype = filetype
if (filetype == "Resources" and previous in ("test", "TEST")
or filetype == "QML" and not previous.endswith(".qml")):
if filetype == "QML" and not previous.endswith(".qml"):
tempFiletype = "Other files"
elif filetype == "Sources" and previous in ("test", "TEST"):
tempFiletype = "Headers"
renameFile(templateDir, usedProFile, projectName + "." + tempFiletype,
previous, filename)
# QTCREATORBUG-13176 does update the navigator async
@@ -114,7 +111,7 @@ def renameFile(projectDir, proFile, branch, oldname, newname):
"Verify that file with new name exists: %s" % newFilePath)
test.compare(readFile(newFilePath), oldFileText,
"Comparing content of file before and after renaming")
test.verify(waitFor("newname in safeReadFile(proFile)", 2000),
test.verify(waitFor("' ' + newname in safeReadFile(proFile)", 2000),
"Verify that new filename '%s' was added to pro-file." % newname)
if oldname not in newname:
test.verify(oldname not in readFile(proFile),