mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 02:37:12 +02:00
Filenames are sorted in memory.
This commit is contained in:
parent
6491ea23eb
commit
508a658752
1 changed files with 27 additions and 16 deletions
|
@ -43,7 +43,7 @@ void AWSInterface::extractTestFailuresFromZippedFolder() {
|
|||
// For a test results zip file called `D:/tt/TestResults--2018-10-02_16-54-11(9426)[DESKTOP-PMKNLSQ].zip`
|
||||
// the folder will be called `TestResults--2018-10-02_16-54-11(9426)[DESKTOP-PMKNLSQ]`
|
||||
// and, this folder will be in the working directory
|
||||
QStringList parts =_testResults.split('/');
|
||||
QStringList parts = _testResults.split('/');
|
||||
QString zipFolderName = _workingDirectory + "/" + parts[parts.length() - 1].split('.')[0];
|
||||
if (QDir(zipFolderName).exists()) {
|
||||
QDir dir = zipFolderName;
|
||||
|
@ -204,7 +204,11 @@ void AWSInterface::writeTable(QTextStream& stream) {
|
|||
QDir().rename(originalNamesSuccesses[i], _htmlSuccessesFolder + "/" + newNamesSuccesses[i]);
|
||||
}
|
||||
|
||||
// Mac does not read folders in lexicographic order, so this step is divided into 2
|
||||
// Each test consists of the test name and its index.
|
||||
QDirIterator it2(_htmlFailuresFolder);
|
||||
QStringList folderNames;
|
||||
|
||||
while (it2.hasNext()) {
|
||||
QString nextDirectory = it2.next();
|
||||
|
||||
|
@ -214,10 +218,17 @@ void AWSInterface::writeTable(QTextStream& stream) {
|
|||
}
|
||||
|
||||
QStringList pathComponents = nextDirectory.split('/');
|
||||
QString filename = pathComponents[pathComponents.length() - 1];
|
||||
int splitIndex = filename.lastIndexOf(".");
|
||||
QString testName = filename.left(splitIndex).replace(".", " / ");
|
||||
QString testNumber = filename.right(filename.length() - (splitIndex + 1));
|
||||
QString folderName = pathComponents[pathComponents.length() - 1];
|
||||
|
||||
folderNames << folderName;
|
||||
}
|
||||
|
||||
folderNames.sort();
|
||||
for (const auto& folderName : folderNames) {
|
||||
int splitIndex = folderName.lastIndexOf(".");
|
||||
QString testName = folderName.left(splitIndex).replace('.', " / ");
|
||||
|
||||
int testNumber = folderName.right(folderName.length() - (splitIndex + 1)).toInt();
|
||||
|
||||
// The failures are ordered lexicographically, so we know that we can rely on the testName changing to create a new table
|
||||
if (testName != previousTestName) {
|
||||
|
@ -232,7 +243,7 @@ void AWSInterface::writeTable(QTextStream& stream) {
|
|||
openTable(stream);
|
||||
}
|
||||
|
||||
createEntry(testNumber.toInt(), filename, stream, true);
|
||||
createEntry(testNumber, folderName, stream, true);
|
||||
}
|
||||
|
||||
closeTable(stream);
|
||||
|
@ -426,7 +437,7 @@ void AWSInterface::updateAWS() {
|
|||
[=](int exitCode, QProcess::ExitStatus exitStatus) { _busyWindow.hide(); });
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
QStringList parameters = QStringList() << filename ;
|
||||
QStringList parameters = QStringList() << filename;
|
||||
process->start(_pythonCommand, parameters);
|
||||
#elif defined Q_OS_MAC
|
||||
QStringList parameters = QStringList() << "-c" << _pythonCommand + " " + filename;
|
||||
|
|
Loading…
Reference in a new issue