2023-05-04 11:05:46 -04:00
<?xml version='1.0' ?>
2023-09-11 12:55:31 -04:00
<BuildGraph xmlns= "http://www.epicgames.com/BuildGraph" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://www.epicgames.com/BuildGraph ./Graph/Schema.xsd" >
2023-05-04 11:05:46 -04:00
<EnvVar Name= "UE_HORDE_JOBID" />
<Property Name= "TestNames" Value= "" />
2023-09-11 12:55:31 -04:00
<Property Name= "AllTestablePlatforms" Value= "Win64;Mac;Linux;LinuxArm64;Android;IOS" />
2023-05-04 11:05:46 -04:00
<Property Name= "MobilePlatforms" Value= "Android;IOS" />
<Property Name= "BuildPlatforms" Value= "Win64;Mac;Linux" />
<Property Name= "PlatformsBuiltFromWin64" Value= "Win64;Android" />
<Property Name= "PlatformsBuiltFromMac" Value= "Mac;IOS" />
2023-09-11 12:55:31 -04:00
<Property Name= "PlatformsBuiltFromLinux" Value= "Linux;LinuxArm64" />
2023-05-04 11:05:46 -04:00
<Property Name= "AlternateDevicePoolPlatformsProperty" Value= "" />
2023-06-01 16:57:35 -04:00
<!-- Platform specific macros -->
<Macro Name= "Catch2BuildAppendExtraCMakeArgsPlatform" Arguments= "Platform" />
<Macro Name= "Catch2BuildAppendExtraCMakeArgs" Arguments= "ExtraArgValue" >
<Property Name= "ExtraCMakeArgs" Value= "-CMakeAdditionalArguments="$(CommonExtraCmakeArgs)$(ExtraArgValue)"" />
</Macro>
<Macro Name= "SelectAgentType" Arguments= "Platform;BuildPlatform" />
<Macro Name= "SetupPlatformProperties" Arguments= "Platform;BuildPlatform" OptionalArguments= "AlternateDevicePool" >
<Property Name= "AllTestablePlatforms" Value= "$(AllTestablePlatforms);$(Platform)" />
<Do If= "'$(BuildPlatform)' == 'Win64'" >
<Property Name= "PlatformsBuiltFromWin64" Value= "$(PlatformsBuiltFromWin64);$(Platform)" />
</Do>
<Do If= "'$(BuildPlatform)' == 'Mac'" >
<Property Name= "PlatformsBuiltFromMac" Value= "$(PlatformsBuiltFromMac);$(Platform)" />
</Do>
<Do If= "'$(BuildPlatform)' == 'Linux'" >
<Property Name= "PlatformsBuiltFromLinux" Value= "$(PlatformsBuiltFromLinux);$(Platform)" />
</Do>
<Do If= "'$(AlternateDevicePool)' != ''" >
<Property Name= "AlternateDevicePoolPlatformsProperty" Value= "$(AlternateDevicePoolPlatformsProperty);$(AlternateDevicePool)" />
</Do>
</Macro>
<Macro Name= "SetupAllPlatformProperties" />
<!-- All test metadata scripts along with platform specific versions for both public and internal paths -->
2023-05-04 11:05:46 -04:00
<Include Script= "LowLevelTests/*.xml" />
<Include Script= "../Platforms/*/Build/LowLevelTests/*.xml" />
<Include Script= "../Restricted/NotForLicensees/Build/LowLevelTests/*.xml" />
<Include Script= "../Restricted/NotForLicensees/Platforms/*/Build/LowLevelTests/*.xml" />
2023-06-01 16:57:35 -04:00
<Expand Name= "SetupAllPlatformProperties" />
2023-05-04 11:05:46 -04:00
<Option Name= "BuildCatch2Libs" DefaultValue= "false" Description= "True if building Catch2 static libraries" />
<Option Name= "TestCatch2Libs" DefaultValue= "false" Description= "True if additionally building Catch2 with extras and tests" />
<Option Name= "Catch2LibVariation" DefaultValue= "VS2019" Description= "Catch2 library variation, e.g. VS2022" />
<Option Name= "SubmitBuiltCatch2Libs" DefaultValue= "false" Description= "True if submitting the built Catch2 static libraries" />
<Property Name= "Catch2LatestVersion" Value= "v3.0.1" />
<!-- Check if this is a release branch -->
<Option Name= "IsReleaseBranch" DefaultValue= "false" Description= "True if release branch, false otherwise" />
<Option Name= "PreflightChange" DefaultValue= "" Description= "Preflight CL number if preflight, empty otherwise" />
<!-- Test Options -->
<Option Name= "RunAllTests" DefaultValue= "true" Description= "Run All Available Tests (except Foundation)" />
<!-- If we set one of the Run*Tests option we don't want to run all the tests, just the selected ones. -->
<Property Name= "RunsAllTests" Value= "$(RunAllTests)" />
<ForEach Name= "TestName" Values= "$(TestNames)" >
<!-- Don't turn of all tests if only Foundation is in the list. -->
<Do If= "'$(TestName)' != 'Foundation'" >
<Property Name= "RunsAllTests" Value= "false" If= "$(Run$(TestName)Tests)" />
</Do>
</ForEach>
<!-- Platform Options -->
<Option Name= "TestAllSupportedPlatforms" DefaultValue= "true" Description= "Test All Supported Platforms" />
<Option Name= "TestPlatformWin64" DefaultValue= "false" Description= "Test Platform Win64" />
<Option Name= "TestPlatformLinux" DefaultValue= "false" Description= "Test Platform Linux" />
2023-09-11 12:55:31 -04:00
<Option Name= "TestPlatformLinuxArm64" DefaultValue= "false" Description= "Test Platform LinuxArm64" />
2023-05-04 11:05:46 -04:00
<Option Name= "TestPlatformMac" DefaultValue= "false" Description= "Test Platform Mac" />
<Option Name= "TestPlatformAndroid" DefaultValue= "false" Description= "Test Platform Android" />
<Option Name= "TestPlatformIOS" DefaultValue= "false" Description= "Test Platform IOS" />
<!-- If we set one of the TestPlatform* option we don't want to run on all the platforms, just the selected ones. -->
<Property Name= "TestsAllSupportedPlatforms" Value= "$(TestAllSupportedPlatforms)" />
<ForEach Name= "Platform" Values= "$(AllTestablePlatforms)" >
<Property Name= "TestsAllSupportedPlatforms" Value= "false" If= "$(TestPlatform$(Platform))" />
</ForEach>
<Property Name= "GauntletDeviceService" Value= "https://horde.devtools.epicgames.com" />
<Option Name= "TestArgs" DefaultValue= "" Description= "Extra test arguments." />
<Option Name= "GauntletDevicePool" DefaultValue= "UE4" Description= "Gauntlet Device Pool to use to run target platform tests" />
<Option Name= "AlternateGauntletDevicePool" DefaultValue= "UE5" Description= "Alternate Gauntlet Device Pool to use to run target platform tests" />
2023-05-12 14:46:26 -04:00
<Option Name= "AlternateDevicePoolPlatforms" DefaultValue= "$(AlternateDevicePoolPlatformsProperty)" Description= "Platforms that need to use the Alternate Gauntlet Device Pool" />
2023-05-04 11:05:46 -04:00
<Option Name= "Device" DefaultValue= "" Description= "Device address to run tests on" />
<Option Name= "Configuration" DefaultValue= "Development" Description= "Configuration type: development, debug, test, shipping etc." />
<Option Name= "AttachToDebugger" DefaultValue= "false" Description= "Wait for debugger to attach." />
<Property Name= "TestNodes" Value= "" />
<Property Name= "AfterTestNodes" Value= "" />
<Property Name= "Catch2BuildNodes" Value= "" />
<!-- Override build tags -->
<Option Name= "OverrideTags" DefaultValue= "" Description= "Override default tags for all tests, used for special types of tests" />
<!-- Special test configs -->
<Option Name= "PerTestTimeout" DefaultValue= "0" Description= "Individual test timeout (not for entire test run). 0 means no timeout is captured." />
<!-- After Steps -->
2023-09-06 19:12:03 -04:00
<Option Name= "RunAfterSteps" DefaultValue= "false" Description= "If set RunAfterSteps is True then we should run aftersteps for this run." />
2023-05-04 11:05:46 -04:00
<Macro Name= "ExpandAfterSteps" Arguments= "Platform;TestName" >
<Node Name= "$(TestName) AfterStep $(Platform)" >
<Expand Name= "$(TestName)AfterSteps" Platform= "$(Platform)" />
</Node>
<Label Category= "After" Name= "$($(TestName)Short) After $(Platform)" Requires= "$(TestName) AfterStep $(Platform)" />
<Property Name= "AfterTestNodes" Value= "$(AfterTestNodes);$(TestName) AfterStep $(Platform)" If= "$(RunAllTests) Or $(Run$(TestName)Tests)" />
</Macro>
2023-08-10 11:53:46 -04:00
<Macro Name= "BuildAndStageTest" Arguments= "Platform;TestName" >
<Property Name= "LocalAchiveDirectory" Value= "$(RootDir)/$($(TestName)Target)" />
<Do If= "'$($(TestName)StagesWithProjectFile)' == 'True'" >
<Command Name= "BuildCookRun" Arguments= "-Build -NoBootstrapExe -NoCodeSign -SkipCook -Stage -NoSubmit -Archive -ArchiveDirectory=$(LocalAchiveDirectory) -project=$($(TestName)Target) -configuration=$(Configuration) -platform=$(Platform) $($(Platform)$(TestName)ExtraCompilationArgs)" />
</Do>
<Do If= "'$($(TestName)StagesWithProjectFile)' != 'True'" >
<Compile Target= "$($(TestName)Target)" Configuration= "$(Configuration)" Platform= "$(Platform)" AllowXGE= "false" Arguments= "$($(Platform)$(TestName)ExtraCompilationArgs)" />
</Do>
</Macro>
2023-05-04 11:05:46 -04:00
<Macro Name= "DeployAndTest" Arguments= "TestName;Platform" >
2023-08-10 11:53:46 -04:00
<Property Name= "PlatformStageDirName" Value= "$(Platform)" />
<Property Name= "PlatformStageDirName" Value= "Windows" If= "'$(Platform)' == 'Win64'" />
2023-05-04 11:05:46 -04:00
<Property Name= "DevicePool" Value= "$(GauntletDevicePool)" />
<Property Name= "DevicePool" Value= "$(AlternateGauntletDevicePool)" If= "ContainsItem('$(AlternateDevicePoolPlatforms)', '$(Platform)', ';')" />
2023-08-10 11:53:46 -04:00
<Property Name= "TestArgsExt" Value= "$(TestArgs) -deviceurl=$(GauntletDeviceService) -devicepool=$(DevicePool)" />
2023-05-04 11:05:46 -04:00
<Property Name= "TestModeSuffix" Value= "" />
<Property Name= "TestTags" Value= "" />
<Property Name= "TestTags" Value= "$($(Platform)$(TestName)Tags)" If= "'$($(Platform)$(TestName)Tags)' != ''" />
<Property Name= "TestTags" Value= "$(OverrideTags)" If= "'$(OverrideTags)' != ''" />
<Property Name= "TestArgsExt" Value= "$(TestArgsExt) -tags="$(TestTags)"" />
<Property Name= "TestArgsExt" Value= "$(TestArgsExt) --buildmachine" If= "$(IsBuildMachine)" />
<Property Name= "TestArgsExt" Value= "$(TestArgsExt) -timeout=$(PerTestTimeout)" />
2023-08-10 11:53:46 -04:00
<Property Name= "TestArgsExt" Value= "$(TestArgsExt) $($(TestName)GauntletArgs)" />
<Property Name= "TestArgsExt" Value= "$(TestArgsExt) -extra-args="$($(TestName)ExtraArgs)"" />
2023-05-04 11:05:46 -04:00
<Property Name= "TestArgsExt" Value= "$(TestArgsExt) $($(Platform)ExtraArgs)" />
<Do If= "'$(Device)' != ''" >
<Property Name= "TestArgsExt" Value= "$(TestArgsExt) -device=$(Device) " />
</Do>
<Do If= "'$(AttachToDebugger)' != 'false'" >
<Property Name= "TestArgsExt" Value= "$(TestArgsExt) -AttachToDebugger " />
</Do>
<Do If= "'$($(TestName)ReportType)' != ''" >
<Property Name= "TestArgsExt" Value= "$(TestArgsExt) -ReportType=$($(TestName)ReportType)" />
</Do>
<Do If= "'$($(TestName)UsesCatch2)' != 'True'" >
<Property Name= "TestArgsExt" Value= "" />
</Do>
2023-08-10 11:53:46 -04:00
<Property Name= "TestArgsExt" Value= "$(TestArgsExt) -SkipStage -Build="$(RootDir)\$($(TestName)Target)\$(PlatformStageDirName)"" If= "'$($(TestName)StagesWithProjectFile)' == 'True'" />
2023-09-11 12:55:31 -04:00
<Property Name= "TestArgsExt" Value= "$(TestArgsExt) -build="$($(TestName)BinariesRelative)/$(Platform)/$($(TestName)Target)$(TestModeSuffix)"" If= "'$($(TestName)StagesWithProjectFile)' != 'True'" />
<Property Name= "AppRunsContainerized" Value= "$($(Platform)$(TestName)RunContainerized)" />
<Do If= "'$(AppRunsContainerized)' == 'True'" >
<Property Name= "TestTargetLowercase" Value= "" />
<StringOp Input= "$($(TestName)Target)" Method= "ToLower" Output= "TestTargetLowercase" />
<Property Name= "BinariesRelativeForwardSlash" Value= "" />
<StringOp Input= "$($(TestName)BinariesRelative)" Method= "Replace" Arguments= "\;/" Output= "BinariesRelativeForwardSlash" />
<!-- Builds docker image -->
<Expand Name= "$(Platform)DockerCleanup" AppNameLowercase= "$(TestTargetLowercase)" />
<Expand Name= "$(Platform)DockerSetup" AppNameLowercase= "$(TestTargetLowercase)" AppDir= "$(BinariesRelativeForwardSlash)/$(Platform)/$($(TestName)Target)$(TestModeSuffix)" />
<Property Name= "TestArgsExt" Value= "$(TestArgsExt) -containerized" />
</Do>
2023-08-10 11:53:46 -04:00
2023-05-04 11:05:46 -04:00
<Command Name= "RunLowLevelTests"
2023-08-10 11:53:46 -04:00
Arguments="-test=LowLevelTests -testapp=$($(TestName)Target)$(TestModeSuffix) -platform=$(Platform) -configuration=$(Configuration) $(TestArgsExt) -VeryVerbose"/>
2023-09-11 12:55:31 -04:00
<Do If= "'$(AppRunsContainerized)' == 'True'" >
<Property Name= "TestTargetLowercase" Value= "" />
<StringOp Input= "$($(TestName)Target)" Method= "ToLower" Output= "TestTargetLowercase" />
<!-- Stop any running docker container and remove image -->
<Expand Name= "$(Platform)DockerCleanup" AppNameLowercase= "$(TestTargetLowercase)" />
</Do>
2023-05-04 11:05:46 -04:00
</Macro>
<ForEach Name= "BuildPlatform" Values= "$(BuildPlatforms)" >
<ForEach Name= "Platform" Values= "$(PlatformsBuiltFrom$(BuildPlatform))" >
<Property Name= "AgentType" Value= "$(BuildPlatform)" />
2023-06-01 16:57:35 -04:00
<Expand Name= "SelectAgentType" Platform= "$(Platform)" BuildPlatform= "$(BuildPlatform)" />
2023-05-04 11:05:46 -04:00
<Property Name= "BuildAgentType" Value= "$(AgentType)" />
2023-09-11 12:55:31 -04:00
<Do If= "'$(Platform)' == 'Linux' Or '$(Platform)' == 'LinuxArm64'" >
2023-05-04 11:05:46 -04:00
<Property Name= "BuildAgentType" Value= "Win64" />
</Do>
<Agent Name= "Catch2 Build $(Platform)" Type= "$(BuildAgentType)" >
<Node Name= "Catch2 Build Library $(Platform)" >
<Property Name= "Generator" Value= "Makefile" />
<Property Name= "TargetConfigs" Value= "debug+release" />
<Property Name= "ExtraCMakeArgs" Value= "" />
<Property Name= "TargetPlatform" Value= "$(Platform)" />
<Property Name= "CommonExtraCmakeArgs" Value= "" />
<Property Name= "CommonExtraCmakeArgs" Value= "$(CommonExtraCmakeArgs) -DCATCH_DEVELOPMENT_BUILD=ON -DBUILD_TESTING=ON -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_ENABLE_CONFIGURE_TESTS=ON " If= "$(TestCatch2Libs)" />
<Do If= "'$(Platform)' == 'Android'" >
<Property Name= "ExtraCMakeArgs" Value= "-TargetArchitecture=arm64" />
</Do>
<Do If= "'$(Platform)' == 'Linux'" >
<Property Name= "ExtraCMakeArgs" Value= "-TargetArchitecture=x86_64-unknown-linux-gnu -CMakeAdditionalArguments="$(CommonExtraCmakeArgs)-DBUILD_WITH_LIBCXX=ON"" />
</Do>
2023-09-11 12:55:31 -04:00
<Do If= "'$(Platform)' == 'LinuxArm64'" >
<Property Name= "TargetPlatform" Value= "Linux" />
<Property Name= "ExtraCMakeArgs" Value= "-TargetArchitecture=aarch64-unknown-linux-gnueabi -CMakeAdditionalArguments="$(CommonExtraCmakeArgs)-DBUILD_WITH_LIBCXX=ON"" />
</Do>
2023-05-04 11:05:46 -04:00
<Do If= "'$(Platform)' == 'Win64'" >
<Property Name= "Generator" Value= "VS2019" />
<Do If= "'$(Catch2LibVariation)' == 'VS2022'" >
<Property Name= "Generator" Value= "VS2022" />
</Do>
<Property Name= "ExtraCMakeArgs" Value= "-TargetArchitecture=x64 -CMakeAdditionalArguments="$(CommonExtraCmakeArgs)-DSET_CONFIG_NO_COLOUR_WIN32=OFF"" />
</Do>
2023-06-01 16:57:35 -04:00
<Expand Name= "Catch2BuildAppendExtraCMakeArgsPlatform" Platform= "$(Platform)" />
2023-05-04 11:05:46 -04:00
<Do If= "'$(BuildPlatform)' == 'Mac'" >
<Property Name= "Generator" Value= "Xcode" />
<Property Name= "TargetConfigs" Value= "Debug+Release" />
<Property Name= "ExtraCMakeArgs" Value= "-CmakeAdditionalArguments="$(CommonExtraCmakeArgs)-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_OSX_ARCHITECTURES=arm64;x86_64"" />
</Do>
<Command Name= "BuildCMakeLib"
Arguments="-CMakeGenerator=$(Generator) -MakeTarget=Catch2 -TargetLib=Catch2 -TargetLibVersion=$(Catch2LatestVersion) -BinOutputPath=Binaries -LibOutputPath=lib -TargetPlatform=$(TargetPlatform) -TargetConfigs=$(TargetConfigs) -SkipCreateChangelist $(ExtraCMakeArgs)"/>
</Node>
<Property Name= "Catch2BuildNodes" Value= "$(Catch2BuildNodes);Catch2 Build Library $(Platform)" />
</Agent>
<Agent Name= "Low Level Tests $(Platform)" Type= "$(AgentType)" >
<ForEach Name= "TestName" Values= "$(TestNames)" >
<Property Name= "TestSupportedOnPlatform" Value= "false" />
<Property Name= "TestRunsOnPlatform" Value= "false" />
<Property Name= "RunsTestOnPlatform" Value= "false" />
<Property Name= "TestSupportedOnPlatform" Value= "true" If= "Contains('$($(TestName)SupportedPlatforms)', '$(Platform)')" />
<Property Name= "TestRunsOnPlatform" Value= "true" If= "($(TestSupportedOnPlatform) And $(TestsAllSupportedPlatforms)) Or $(TestPlatform$(Platform))" />
<Property Name= "RunsTestOnPlatform" Value= "true" If= "!$($(TestName)Disabled) And $(TestRunsOnPlatform) And ($(Run$(TestName)Tests) Or $(RunsAllTests))" />
<Do If= "$(RunsTestOnPlatform)" >
<Do If= "!$(TestSupportedOnPlatform)" >
<Warning Message= "Low level test $(TestName) not yet tested for support on platform $(Platform)." />
</Do>
<Property Name= "TestRequirements" Value= "" />
<Do If= "$(BuildCatch2Libs)" >
<Property Name= "TestRequirements" Value= "$(TestRequirements);Catch2 Build Library $(Platform)" />
</Do>
2023-06-22 20:24:20 -04:00
<Node Name= "$($(TestName)Short) Tests $(Platform)" Requires= "$(TestRequirements)" >
2023-05-04 11:05:46 -04:00
<Do If= "'$($(Platform)$(TestName)RunSupported)' == 'True'" >
2023-08-10 11:53:46 -04:00
<Expand Name= "BuildAndStageTest" TestName= "$(TestName)" Platform= "$(Platform)" />
2023-05-04 11:05:46 -04:00
<Expand Name= "DeployAndTest" TestName= "$(TestName)" Platform= "$(Platform)" />
</Do>
</Node>
<Label Category= "Test" Name= "$($(TestName)Short) $(Platform)" Requires= "$($(TestName)Short) Tests $(Platform)" />
<Property Name= "TestNodes" Value= "$(TestNodes);$($(TestName)Short) Tests $(Platform)" If= "$(RunAllTests) Or $(Run$(TestName)Tests)" />
2023-09-06 19:12:03 -04:00
<Do If= "'$(RunAfterSteps)' == 'True' AND '$($(TestName)HasAfterSteps)' == 'True'" >
2023-05-04 11:05:46 -04:00
<Expand Name= "ExpandAfterSteps" TestName= "$(TestName)" Platform= "$(Platform)" />
</Do>
</Do>
</ForEach>
</Agent>
</ForEach>
</ForEach>
<Aggregate Name= "Run Low Level Tests" Requires= "$(TestNodes);$(AfterTestNodes)" />
<Aggregate Name= "Build Catch2 Libraries" Requires= "$(Catch2BuildNodes)" />
2023-08-10 11:53:46 -04:00
</BuildGraph>