mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:49:24 +02:00
Allow multiple evaluations.
This commit is contained in:
parent
913ad569c0
commit
5a79f272f3
2 changed files with 14 additions and 7 deletions
|
@ -216,16 +216,22 @@ void Test::startTestsEvaluation() {
|
||||||
resultImagesFullFilenames << fullCurrentFilename;
|
resultImagesFullFilenames << fullCurrentFilename;
|
||||||
|
|
||||||
QString expectedImagePartialSourceDirectory = getExpectedImagePartialSourceDirectory(currentFilename);
|
QString expectedImagePartialSourceDirectory = getExpectedImagePartialSourceDirectory(currentFilename);
|
||||||
|
|
||||||
// extract the digits at the end of the filename (exluding the file extension)
|
// Images are stored on GitHub as ExpectedImage_ddddd.png
|
||||||
|
// Extract the digits at the end of the filename (exluding the file extension)
|
||||||
QString expectedImageFilenameTail = currentFilename.left(currentFilename.length() - 4).right(NUM_DIGITS);
|
QString expectedImageFilenameTail = currentFilename.left(currentFilename.length() - 4).right(NUM_DIGITS);
|
||||||
QString expectedImageFilename = EXPECTED_IMAGE_PREFIX + expectedImageFilenameTail + IMAGE_FORMAT;
|
QString expectedImageStoredFilename = EXPECTED_IMAGE_PREFIX + expectedImageFilenameTail + IMAGE_FORMAT;
|
||||||
|
|
||||||
|
QString imageURLString(URLPrefix + "/" + githubUser + "/" + testsRepo + "/" + branch + "/" +
|
||||||
|
expectedImagePartialSourceDirectory + "/" + expectedImageStoredFilename);
|
||||||
|
|
||||||
|
expectedImagesURLs << imageURLString;
|
||||||
|
|
||||||
|
// The image retrieved from Github needs a unique name
|
||||||
|
QString expectedImageFilename = currentFilename.replace("/", "_").replace(".", "_EI.");
|
||||||
|
|
||||||
expectedImagesFilenames << expectedImageFilename;
|
expectedImagesFilenames << expectedImageFilename;
|
||||||
expectedImagesFullFilenames << pathToTestResultsDirectory + "/" + expectedImageFilename;
|
expectedImagesFullFilenames << pathToTestResultsDirectory + "/" + expectedImageFilename;
|
||||||
|
|
||||||
QString imageURLString(URLPrefix + "/" + githubUser + "/" + testsRepo + "/" + branch + "/" + expectedImagePartialSourceDirectory + "/" + expectedImageFilename);
|
|
||||||
expectedImagesURLs << imageURLString;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,8 @@ void AutoTester::saveImage(int index) {
|
||||||
QImage image = pixmap.toImage();
|
QImage image = pixmap.toImage();
|
||||||
image = image.convertToFormat(QImage::Format_ARGB32);
|
image = image.convertToFormat(QImage::Format_ARGB32);
|
||||||
|
|
||||||
image.save(_directoryName + "/" + _filenames[index], 0, 100);
|
QString fullPathname = _directoryName + "/" + _filenames[index];
|
||||||
|
image.save(fullPathname, 0, 100);
|
||||||
|
|
||||||
++_numberOfImagesDownloaded;
|
++_numberOfImagesDownloaded;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue