mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-07 10:02:24 +02:00
Ready.
This commit is contained in:
parent
88da09c2ab
commit
b35b7687b7
6 changed files with 50 additions and 13 deletions
|
@ -8,6 +8,7 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
#include "AWSInterface.h"
|
||||
#include "common.h"
|
||||
|
||||
#include <QDirIterator>
|
||||
#include <QJsonDocument>
|
||||
|
@ -29,7 +30,9 @@ void AWSInterface::createWebPageFromResults(const QString& testResults,
|
|||
QCheckBox* updateAWSCheckBox,
|
||||
QRadioButton* diffImageRadioButton,
|
||||
QRadioButton* ssimImageRadionButton,
|
||||
QLineEdit* urlLineEdit
|
||||
QLineEdit* urlLineEdit,
|
||||
const QString& branch,
|
||||
const QString& user
|
||||
) {
|
||||
_workingDirectory = workingDirectory;
|
||||
|
||||
|
@ -53,6 +56,13 @@ void AWSInterface::createWebPageFromResults(const QString& testResults,
|
|||
_urlLineEdit = urlLineEdit;
|
||||
_urlLineEdit->setEnabled(false);
|
||||
|
||||
|
||||
_urlLineEdit = urlLineEdit;
|
||||
_urlLineEdit->setEnabled(false);
|
||||
|
||||
_branch = branch;
|
||||
_user = user;
|
||||
|
||||
QString zipFilenameWithoutExtension = zipFilename.split('.')[0];
|
||||
extractTestFailuresFromZippedFolder(_workingDirectory + "/" + zipFilenameWithoutExtension);
|
||||
|
||||
|
@ -202,13 +212,21 @@ void AWSInterface::writeTitle(QTextStream& stream, const QStringList& originalNa
|
|||
|
||||
stream << "run on " << hostName << "</h1>\n";
|
||||
|
||||
int numberOfFailures = originalNamesFailures.length();
|
||||
int numberOfSuccesses = originalNamesSuccesses.length();
|
||||
stream << "<h2>";
|
||||
stream << "nitpick " << nitpickVersion;
|
||||
stream << ", tests from GitHub: " << _user << "/" << _branch;
|
||||
stream << "</h2>";
|
||||
|
||||
stream << "<h2>" << QString::number(numberOfFailures) << " failed, out of a total of " << QString::number(numberOfSuccesses) << " tests</h2>\n";
|
||||
_numberOfFailures = originalNamesFailures.length();
|
||||
_numberOfSuccesses = originalNamesSuccesses.length();
|
||||
|
||||
stream << "<h2>" << QString::number(_numberOfFailures) << " failed, out of a total of " << QString::number(_numberOfFailures + _numberOfSuccesses) << " tests</h2>\n";
|
||||
|
||||
stream << "\t" << "\t" << "<font color=\"red\">\n";
|
||||
stream << "\t" << "\t" << "<h1>The following tests failed:</h1>";
|
||||
|
||||
if (_numberOfFailures > 0) {
|
||||
stream << "\t" << "\t" << "<h1>The following tests failed:</h1>";
|
||||
}
|
||||
}
|
||||
|
||||
void AWSInterface::writeTable(QTextStream& stream, const QStringList& originalNamesFailures, const QStringList& originalNamesSuccesses) {
|
||||
|
@ -289,7 +307,10 @@ void AWSInterface::writeTable(QTextStream& stream, const QStringList& originalNa
|
|||
|
||||
closeTable(stream);
|
||||
stream << "\t" << "\t" << "<font color=\"blue\">\n";
|
||||
stream << "\t" << "\t" << "<h1>The following tests passed:</h1>";
|
||||
|
||||
if (_numberOfSuccesses > 0) {
|
||||
stream << "\t" << "\t" << "<h1>The following tests passed:</h1>";
|
||||
}
|
||||
|
||||
// Now do the same for passes
|
||||
folderNames.clear();
|
||||
|
|
|
@ -31,7 +31,10 @@ public:
|
|||
QCheckBox* updateAWSCheckBox,
|
||||
QRadioButton* diffImageRadioButton,
|
||||
QRadioButton* ssimImageRadionButton,
|
||||
QLineEdit* urlLineEdit);
|
||||
QLineEdit* urlLineEdit,
|
||||
const QString& branch,
|
||||
const QString& user
|
||||
);
|
||||
|
||||
void extractTestFailuresFromZippedFolder(const QString& folderName);
|
||||
void createHTMLFile();
|
||||
|
@ -70,9 +73,13 @@ private:
|
|||
QString AWS_BUCKET{ "hifi-qa" };
|
||||
|
||||
QLineEdit* _urlLineEdit;
|
||||
|
||||
QString _user;
|
||||
QString _branch;
|
||||
|
||||
QString _comparisonImageFilename;
|
||||
|
||||
int _numberOfFailures;
|
||||
int _numberOfSuccesses;
|
||||
};
|
||||
|
||||
#endif // hifi_AWSInterface_h
|
|
@ -38,7 +38,7 @@ Nitpick::Nitpick(QWidget* parent) : QMainWindow(parent) {
|
|||
|
||||
_ui.plainTextEdit->setReadOnly(true);
|
||||
|
||||
setWindowTitle("Nitpick - v3.1.2");
|
||||
setWindowTitle("Nitpick - " + nitpickVersion);
|
||||
|
||||
clientProfiles << "VR-High" << "Desktop-High" << "Desktop-Low" << "Mobile-Touch" << "VR-Standalone";
|
||||
_ui.clientProfileComboBox->insertItems(0, clientProfiles);
|
||||
|
@ -266,7 +266,7 @@ void Nitpick::on_createXMLScriptRadioButton_clicked() {
|
|||
}
|
||||
|
||||
void Nitpick::on_createWebPagePushbutton_clicked() {
|
||||
_testCreator->createWebPage(_ui.updateAWSCheckBox, _ui.diffImageRadioButton, _ui.ssimImageRadioButton, _ui.awsURLLineEdit);
|
||||
_testCreator->createWebPage(_ui.updateAWSCheckBox, _ui.diffImageRadioButton, _ui.ssimImageRadioButton, _ui.awsURLLineEdit, _ui.branchLineEdit->text(), _ui.userLineEdit->text());
|
||||
}
|
||||
|
||||
void Nitpick::about() {
|
||||
|
|
|
@ -1112,7 +1112,10 @@ void TestCreator::createWebPage(
|
|||
QCheckBox* updateAWSCheckBox,
|
||||
QRadioButton* diffImageRadioButton,
|
||||
QRadioButton* ssimImageRadionButton,
|
||||
QLineEdit* urlLineEdit
|
||||
QLineEdit* urlLineEdit,
|
||||
const QString& branch,
|
||||
const QString& user
|
||||
|
||||
) {
|
||||
QString testResults = QFileDialog::getOpenFileName(nullptr, "Please select the zipped test results to update from", nullptr,
|
||||
"Zipped TestCreator Results (TestResults--*.zip)");
|
||||
|
@ -1136,6 +1139,8 @@ void TestCreator::createWebPage(
|
|||
updateAWSCheckBox,
|
||||
diffImageRadioButton,
|
||||
ssimImageRadionButton,
|
||||
urlLineEdit
|
||||
urlLineEdit,
|
||||
branch,
|
||||
user
|
||||
);
|
||||
}
|
|
@ -107,7 +107,10 @@ public:
|
|||
QCheckBox* updateAWSCheckBox,
|
||||
QRadioButton* diffImageRadioButton,
|
||||
QRadioButton* ssimImageRadionButton,
|
||||
QLineEdit* urlLineEdit);
|
||||
QLineEdit* urlLineEdit,
|
||||
const QString& branch,
|
||||
const QString& user
|
||||
);
|
||||
|
||||
private:
|
||||
QProgressBar* _progressBar;
|
||||
|
|
|
@ -56,4 +56,5 @@ const double R_Y = 0.212655f;
|
|||
const double G_Y = 0.715158f;
|
||||
const double B_Y = 0.072187f;
|
||||
|
||||
const QString nitpickVersion { "v3.1.4" };
|
||||
#endif // hifi_common_h
|
Loading…
Reference in a new issue