mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 03:53:22 +02:00
Corrected pulling PR number from the executable name.
This commit is contained in:
parent
f046d3b87d
commit
0c3e3e977e
3 changed files with 15 additions and 17 deletions
|
@ -190,7 +190,7 @@ void Test::startTestsEvaluation(const bool isRunningFromCommandLine,
|
||||||
_isRunningInAutomaticTestRun = isRunningInAutomaticTestRun;
|
_isRunningInAutomaticTestRun = isRunningInAutomaticTestRun;
|
||||||
|
|
||||||
if (snapshotDirectory.isNull()) {
|
if (snapshotDirectory.isNull()) {
|
||||||
// Get list of JPEG images in folder, sorted by name
|
// Get list of PNG images in folder, sorted by name
|
||||||
QString previousSelection = _snapshotDirectory;
|
QString previousSelection = _snapshotDirectory;
|
||||||
QString parent = previousSelection.left(previousSelection.lastIndexOf('/'));
|
QString parent = previousSelection.left(previousSelection.lastIndexOf('/'));
|
||||||
if (!parent.isNull() && parent.right(1) != "/") {
|
if (!parent.isNull() && parent.right(1) != "/") {
|
||||||
|
|
|
@ -270,23 +270,21 @@ void TestRunner::startLocalServerProcesses() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestRunner::runInterfaceWithTestScript() {
|
void TestRunner::runInterfaceWithTestScript() {
|
||||||
QString commandLine;
|
QString exeFile = QString("\"") + QDir::toNativeSeparators(_installationFolder) +
|
||||||
|
"\\interface.exe\"";
|
||||||
|
|
||||||
|
QString url = QString("hifi://localhost");
|
||||||
if (_runServerless->isChecked()) {
|
if (_runServerless->isChecked()) {
|
||||||
// Move to an empty area
|
// Move to an empty area
|
||||||
commandLine =
|
url = url + "/9999,9999,9999/0.0,0.0,0.0,1.0";
|
||||||
QString("\"") + QDir::toNativeSeparators(_installationFolder) +
|
|
||||||
"\\interface.exe\" --url hifi://localhost/9999,9999,9999/0.0,0.0,0.0,1.0 --testScript https://raw.githubusercontent.com/" + _user +
|
|
||||||
"/hifi_tests/" + _branch + "/tests/testRecursive.js quitWhenFinished --testResultsLocation " +
|
|
||||||
_snapshotFolder;
|
|
||||||
} else {
|
|
||||||
// There is no content, so no need to move
|
|
||||||
commandLine = QString("\"") + QDir::toNativeSeparators(_installationFolder) +
|
|
||||||
"\\interface.exe\" --url hifi://localhost --testScript https://raw.githubusercontent.com/" + _user +
|
|
||||||
"/hifi_tests/" + _branch +
|
|
||||||
"/tests/content/entity/zone/testRecursive.js quitWhenFinished --testResultsLocation " + _snapshotFolder;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString testScript =
|
||||||
|
QString("https://raw.githubusercontent.com/") + _user + "/hifi_tests/" + _branch + "/tests/testRecursive.js";
|
||||||
|
|
||||||
|
QString commandLine = exeFile + " --url " + url + " --testScript " + testScript +
|
||||||
|
" quitWhenFinished --testResultsLocation " + _snapshotFolder;
|
||||||
|
|
||||||
interfaceWorker->setCommandLine(commandLine);
|
interfaceWorker->setCommandLine(commandLine);
|
||||||
emit startInterface();
|
emit startInterface();
|
||||||
}
|
}
|
||||||
|
@ -508,10 +506,10 @@ QString TestRunner::getPRNumberFromURL(const QString& url) {
|
||||||
try {
|
try {
|
||||||
QStringList urlParts = url.split("/");
|
QStringList urlParts = url.split("/");
|
||||||
QStringList filenameParts = urlParts[urlParts.size() - 1].split("-");
|
QStringList filenameParts = urlParts[urlParts.size() - 1].split("-");
|
||||||
if (filenameParts.size() != 5) {
|
if (filenameParts.size() <= 3) {
|
||||||
throw "URL not in expected format, should look like `https://deployment.highfidelity.com/jobs/pr-build/label%3Dwindows/13023/HighFidelity-Beta-Interface-PR14006-be76c43.exe`";
|
throw "URL not in expected format, should look like `https://deployment.highfidelity.com/jobs/pr-build/label%3Dwindows/13023/HighFidelity-Beta-Interface-PR14006-be76c43.exe`";
|
||||||
}
|
}
|
||||||
return filenameParts[3];
|
return filenameParts[filenameParts.size() - 2];
|
||||||
} catch (QString errorMessage) {
|
} catch (QString errorMessage) {
|
||||||
QMessageBox::critical(0, "Internal error: " + QString(__FILE__) + ":" + QString::number(__LINE__), errorMessage);
|
QMessageBox::critical(0, "Internal error: " + QString(__FILE__) + ":" + QString::number(__LINE__), errorMessage);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
|
|
@ -498,7 +498,7 @@
|
||||||
<string>Serveless</string>
|
<string>Serveless</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QCheckBox" name="checkBoxRunLatest">
|
<widget class="QCheckBox" name="checkBoxRunLatest">
|
||||||
|
@ -529,7 +529,7 @@
|
||||||
<x>150</x>
|
<x>150</x>
|
||||||
<y>98</y>
|
<y>98</y>
|
||||||
<width>461</width>
|
<width>461</width>
|
||||||
<height>24</height>
|
<height>28</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
Loading…
Reference in a new issue