You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Prevent approved reference images to be copied to html test report for successful test
#jira UE-176364 #preflight 63e3d66d8374ef68dffe3565 #rb Chris.Constantinescu [CL 24085750 by jerome delattre in ue5-main branch]
This commit is contained in:
@@ -482,7 +482,7 @@ FImageComparisonResult FScreenShotManager::CompareScreenshot(const FString& InUn
|
||||
}
|
||||
|
||||
|
||||
FScreenshotExportResult FScreenShotManager::ExportScreenshotComparisonResult(FString ScreenshotName, FString RootExportFolder)
|
||||
FScreenshotExportResult FScreenShotManager::ExportScreenshotComparisonResult(FString ScreenshotName, FString RootExportFolder, bool bOnlyIncoming)
|
||||
{
|
||||
FPaths::NormalizeDirectoryName(RootExportFolder);
|
||||
|
||||
@@ -501,7 +501,9 @@ FScreenshotExportResult FScreenShotManager::ExportScreenshotComparisonResult(FSt
|
||||
return Results;
|
||||
}
|
||||
|
||||
CopyDirectory(Destination, ScreenshotResultsFolder / ScreenshotName);
|
||||
FString Pattern = bOnlyIncoming ? TEXT("Incoming.*") : TEXT("*");
|
||||
|
||||
CopyDirectory(Destination, ScreenshotResultsFolder / ScreenshotName, Pattern);
|
||||
|
||||
Results.Success = true;
|
||||
return Results;
|
||||
@@ -556,13 +558,13 @@ FString FScreenShotManager::GetDefaultExportDirectory() const
|
||||
return FPaths::Combine(FPaths::ProjectSavedDir(),TEXT("Exported/imageCompare"));
|
||||
}
|
||||
|
||||
void FScreenShotManager::CopyDirectory(const FString& DestDir, const FString& SrcDir)
|
||||
void FScreenShotManager::CopyDirectory(const FString& DestDir, const FString& SrcDir, const FString& Pattern)
|
||||
{
|
||||
TArray<FString> FilesToCopy;
|
||||
|
||||
FString AbsoluteSrcDir = FPaths::ConvertRelativePathToFull(SrcDir);
|
||||
|
||||
IFileManager::Get().FindFilesRecursive(FilesToCopy, *AbsoluteSrcDir, TEXT("*"), /*Files=*/true, /*Directories=*/false);
|
||||
IFileManager::Get().FindFilesRecursive(FilesToCopy, *AbsoluteSrcDir, *Pattern, /*Files=*/true, /*Directories=*/false);
|
||||
|
||||
ParallelFor(FilesToCopy.Num(), [&](int32 Index)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user