mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-25 15:38:46 +02:00
Added date/time to testResultsFolder.
This commit is contained in:
parent
77901e5089
commit
84cc4c18a4
2 changed files with 11 additions and 18 deletions
|
@ -31,21 +31,13 @@ Test::Test() {
|
||||||
mismatchWindow.setModal(true);
|
mismatchWindow.setModal(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Test::createTestResultsFolderPathIfNeeded(QString directory) {
|
bool Test::createTestResultsFolderPath(QString directory) {
|
||||||
// The test results folder is located in the root of the tests (i.e. for recursive test evaluation)
|
QDateTime now = QDateTime::currentDateTime();
|
||||||
if (testResultsFolderPath == "") {
|
testResultsFolderPath = directory + "/" + TEST_RESULTS_FOLDER + "--" + now.toString(DATETIME_FORMAT);
|
||||||
testResultsFolderPath = directory + "/" + TEST_RESULTS_FOLDER;
|
|
||||||
QDir testResultsFolder(testResultsFolderPath);
|
QDir testResultsFolder(testResultsFolderPath);
|
||||||
|
|
||||||
if (testResultsFolder.exists()) {
|
|
||||||
testResultsFolder.removeRecursively();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create a new test results folder
|
// Create a new test results folder
|
||||||
return QDir().mkdir(testResultsFolderPath);
|
return QDir().mkdir(testResultsFolderPath);
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Test::zipAndDeleteTestResultsFolder() {
|
void Test::zipAndDeleteTestResultsFolder() {
|
||||||
|
@ -194,7 +186,7 @@ void Test::startTestsEvaluation() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Quit if test results folder could not be created
|
// Quit if test results folder could not be created
|
||||||
if (!createTestResultsFolderPathIfNeeded(pathToTestResultsDirectory)) {
|
if (!createTestResultsFolderPath(pathToTestResultsDirectory)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ public:
|
||||||
|
|
||||||
void appendTestResultsToFile(QString testResultsFolderPath, TestFailure testFailure, QPixmap comparisonImage);
|
void appendTestResultsToFile(QString testResultsFolderPath, TestFailure testFailure, QPixmap comparisonImage);
|
||||||
|
|
||||||
bool createTestResultsFolderPathIfNeeded(QString directory);
|
bool createTestResultsFolderPath(QString directory);
|
||||||
void zipAndDeleteTestResultsFolder();
|
void zipAndDeleteTestResultsFolder();
|
||||||
|
|
||||||
bool isAValidDirectory(QString pathname);
|
bool isAValidDirectory(QString pathname);
|
||||||
|
@ -83,6 +83,7 @@ private:
|
||||||
// Used for accessing GitHub
|
// Used for accessing GitHub
|
||||||
const QString user { "NissimHadar" };
|
const QString user { "NissimHadar" };
|
||||||
const QString branch { "addRecursionToAutotester" };
|
const QString branch { "addRecursionToAutotester" };
|
||||||
|
const QString DATETIME_FORMAT { "yyyy-MM-dd_hh-mm-ss" };
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_test_h
|
#endif // hifi_test_h
|
Loading…
Reference in a new issue