Files
UnrealEngineUWP/Engine/Source/Editor/VirtualizationEditor/Private/ValidateVirtualizedContentCommandlet.h
paul chipchase c6b707f171 Add a new cmdline option '-ValidateContent' to the 'ValidateVirtualizedContent commandlet
#rb none
#jira UE-182196
#rnx
#preflight 642d2b1389339023eb66b663

- The new cmdline option will download each payload and make sure that the data is correct in addition to checking that the payload exists.
- Note: There is no way to control which backend returns the payload so the VA graph, or cmdline parameters would need to be changed be the caller to make sure they are checking the backend that they are interested in.
-- This new option is fairly slow and is intended to be used as part of an automated checking system rather than by users themselves, so needing to change the graph and running the commandlet once per backend that needs testing shouldn't be too hard to do.

[CL 24924696 by paul chipchase in ue5-main branch]
2023-04-05 04:22:43 -04:00

44 lines
1.4 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Commandlets/Commandlet.h"
#include "UObject/ObjectMacros.h"
#include "ValidateVirtualizedContentCommandlet.generated.h"
namespace UE { class FPackageTrailer; }
namespace UE { class FIoHashToPackagesLookup; }
class FIoHashToPackagesLookup;
struct FIoHash;
/**
* Iterates over all of the packages in a project and identifies which packages contain
* references to virtualized payloads. The commandlet will then check that all virtualized
* payloads can be found in persistent storage. Error messages will be logged for
* packages that contain virtualized payloads that cannot be found in one or more persistent
* storage backend.
*
* Because the commandlet is the VirtualizationEditor module it needs to be invoked
* with the command line:
* -run="VirtualizationEditor.ValidateVirtualizedContent"
*/
UCLASS()
class UValidateVirtualizedContentCommandlet
: public UCommandlet
{
private:
GENERATED_UCLASS_BODY()
//~ Begin UCommandlet Interface
virtual int32 Main(const FString& Params) override;
//~ End UCommandlet Interface
static int32 StaticMain(const FString& Params);
int32 ValidatePayloadsExists(const TMap<FString, UE::FPackageTrailer>& Packages, const TSet<FIoHash>& Payloads);
int32 ValidatePayloadContent(const TMap<FString, UE::FPackageTrailer>& Packages, const TSet<FIoHash>& Payloads, const UE::FIoHashToPackagesLookup& PkgLookupTable);
};