mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Now search for tests
folder bottom-up.
This commit is contained in:
parent
2f040d0032
commit
9bd7f31ff3
1 changed files with 6 additions and 5 deletions
|
@ -476,13 +476,14 @@ QString Test::getExpectedImagePartialSourceDirectory(QString filename) {
|
|||
QString filenameWithoutExtension = filename.split(".")[0];
|
||||
QStringList filenameParts = filenameWithoutExtension.split("_");
|
||||
|
||||
// Note that the topmost "tests" folder is assumed to be the root
|
||||
int i { 0 };
|
||||
while (i < filenameParts.length() && filenameParts[i] != "tests") {
|
||||
++i;
|
||||
// Note that the bottom-most "tests" folder is assumed to be the root
|
||||
// This is required because the tests folder is named hifi_tests
|
||||
int i { filenameParts.length() - 1 };
|
||||
while (i >= 0 && filenameParts[i] != "tests") {
|
||||
--i;
|
||||
}
|
||||
|
||||
if (i == filenameParts.length()) {
|
||||
if (i < 0) {
|
||||
messageBox.critical(0, "Internal error #9", "Bad filename");
|
||||
exit(-1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue