Renamed osx_gl to mac and es3 to android for cache folders (#949)
This commit is contained in:
@@ -240,7 +240,7 @@ namespace AssetProcessor
|
||||
void BuildConfig(const QDir& tempPath, AssetDatabaseConnection* dbConn, PlatformConfiguration& config)
|
||||
{
|
||||
config.EnablePlatform({ "pc" ,{ "desktop", "renderer" } }, true);
|
||||
config.EnablePlatform({ "es3" ,{ "mobile", "renderer" } }, true);
|
||||
config.EnablePlatform({ "android" ,{ "mobile", "renderer" } }, true);
|
||||
config.EnablePlatform({ "fandango" ,{ "console", "renderer" } }, false);
|
||||
AZStd::vector<AssetBuilderSDK::PlatformInfo> platforms;
|
||||
config.PopulatePlatformsForScanFolder(platforms);
|
||||
@@ -254,22 +254,22 @@ namespace AssetProcessor
|
||||
|
||||
AssetRecognizer rec;
|
||||
AssetPlatformSpec specpc;
|
||||
AssetPlatformSpec speces3;
|
||||
AssetPlatformSpec specandroid;
|
||||
|
||||
speces3.m_extraRCParams = "somerandomparam";
|
||||
specandroid.m_extraRCParams = "somerandomparam";
|
||||
rec.m_name = "random files";
|
||||
rec.m_patternMatcher = AssetBuilderSDK::FilePatternMatcher("*.random", AssetBuilderSDK::AssetBuilderPattern::Wildcard);
|
||||
rec.m_platformSpecs.insert("pc", specpc);
|
||||
config.AddRecognizer(rec);
|
||||
|
||||
specpc.m_extraRCParams = ""; // blank must work
|
||||
speces3.m_extraRCParams = "testextraparams";
|
||||
specandroid.m_extraRCParams = "testextraparams";
|
||||
|
||||
const char* builderTxt1Name = "txt files";
|
||||
rec.m_name = builderTxt1Name;
|
||||
rec.m_patternMatcher = AssetBuilderSDK::FilePatternMatcher("*.txt", AssetBuilderSDK::AssetBuilderPattern::Wildcard);
|
||||
rec.m_platformSpecs.insert("pc", specpc);
|
||||
rec.m_platformSpecs.insert("es3", speces3);
|
||||
rec.m_platformSpecs.insert("android", specandroid);
|
||||
|
||||
config.AddRecognizer(rec);
|
||||
|
||||
@@ -280,7 +280,7 @@ namespace AssetProcessor
|
||||
ignore_rec.m_name = "ignore files";
|
||||
ignore_rec.m_patternMatcher = AssetBuilderSDK::FilePatternMatcher("*.ignore", AssetBuilderSDK::AssetBuilderPattern::Wildcard);
|
||||
ignore_rec.m_platformSpecs.insert("pc", specpc);
|
||||
ignore_rec.m_platformSpecs.insert("es3", ignore_spec);
|
||||
ignore_rec.m_platformSpecs.insert("android", ignore_spec);
|
||||
config.AddRecognizer(ignore_rec);
|
||||
|
||||
ExcludeAssetRecognizer excludeRecogniser;
|
||||
@@ -1092,7 +1092,7 @@ namespace AssetProcessor
|
||||
{
|
||||
AssetCatalogTest::SetUp();
|
||||
m_platforms.push_back("pc");
|
||||
m_platforms.push_back("es3");
|
||||
m_platforms.push_back("android");
|
||||
|
||||
// 4 products for one platform, 1 product for the other.
|
||||
m_platformToProductsForSourceWithDifferentProducts["pc"].push_back("subfolder3/basefilez.arc2");
|
||||
@@ -1100,7 +1100,7 @@ namespace AssetProcessor
|
||||
m_platformToProductsForSourceWithDifferentProducts["pc"].push_back("subfolder3/basefile.arc2");
|
||||
m_platformToProductsForSourceWithDifferentProducts["pc"].push_back("subfolder3/basefile.azm2");
|
||||
|
||||
m_platformToProductsForSourceWithDifferentProducts["es3"].push_back("subfolder3/es3exclusivefile.azm2");
|
||||
m_platformToProductsForSourceWithDifferentProducts["android"].push_back("subfolder3/androidexclusivefile.azm2");
|
||||
|
||||
m_sourceFileWithDifferentProductsPerPlatform = AZ::Uuid::CreateString("{38032FC9-2838-4D6A-9DA0-79E5E4F20C1B}");
|
||||
m_sourceFileWithDependency = AZ::Uuid::CreateString("{807C4174-1D19-42AD-B8BC-A59291D9388C}");
|
||||
@@ -1113,7 +1113,7 @@ namespace AssetProcessor
|
||||
// resulting in image processing jobs having different products per platform. Because of this, the material jobs will then have different
|
||||
// dependencies per platform, because each material will depend on a referenced texture and all of that texture's mipmaps.
|
||||
|
||||
// Add a source file with 4 products on pc, but 1 on es3
|
||||
// Add a source file with 4 products on pc, but 1 on android
|
||||
bool result = AddSourceAndJobForMultiplePlatforms(
|
||||
"subfolder3",
|
||||
"MultiplatformFile.txt",
|
||||
@@ -1128,7 +1128,7 @@ namespace AssetProcessor
|
||||
result = AddSourceAndJobForMultiplePlatforms("subfolder3", "FileWithDependency.txt", &(m_data->m_dbConn), sourceFileWithSameProductsJobsPerPlatform, m_platforms, m_sourceFileWithDependency);
|
||||
EXPECT_TRUE(result);
|
||||
|
||||
const AZStd::string fileWithDependencyProductPath = "subfolder3/es3exclusivefile.azm2";
|
||||
const AZStd::string fileWithDependencyProductPath = "subfolder3/androidexclusivefile.azm2";
|
||||
|
||||
for (const AZStd::string& platform : m_platforms)
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace AssetProcessor
|
||||
|
||||
createJobsRequest.m_enabledPlatforms = {
|
||||
{ "pc", {}
|
||||
}, { "es3", {}
|
||||
}, { "android", {}
|
||||
}
|
||||
};
|
||||
ASSERT_EQ(createJobsRequest.GetEnabledPlatformsCount(), 2);
|
||||
@@ -48,19 +48,19 @@ namespace AssetProcessor
|
||||
ASSERT_EQ(createJobsRequest.GetEnabledPlatformAt(1), AssetBuilderSDK::Platform_NONE);
|
||||
|
||||
createJobsRequest.m_enabledPlatforms = {
|
||||
{ "es3", {}
|
||||
{ "android", {}
|
||||
}
|
||||
};
|
||||
ASSERT_EQ(createJobsRequest.GetEnabledPlatformAt(0), AssetBuilderSDK::Platform_ES3);
|
||||
ASSERT_EQ(createJobsRequest.GetEnabledPlatformAt(0), AssetBuilderSDK::Platform_ANDROID);
|
||||
ASSERT_EQ(createJobsRequest.GetEnabledPlatformAt(1), AssetBuilderSDK::Platform_NONE);
|
||||
|
||||
createJobsRequest.m_enabledPlatforms = {
|
||||
{ "pc", {}
|
||||
}, { "es3", {}
|
||||
}, { "android", {}
|
||||
}
|
||||
};
|
||||
ASSERT_EQ(createJobsRequest.GetEnabledPlatformAt(0), AssetBuilderSDK::Platform_PC);
|
||||
ASSERT_EQ(createJobsRequest.GetEnabledPlatformAt(1), AssetBuilderSDK::Platform_ES3);
|
||||
ASSERT_EQ(createJobsRequest.GetEnabledPlatformAt(1), AssetBuilderSDK::Platform_ANDROID);
|
||||
ASSERT_EQ(createJobsRequest.GetEnabledPlatformAt(2), AssetBuilderSDK::Platform_NONE);
|
||||
|
||||
createJobsRequest.m_enabledPlatforms = {
|
||||
@@ -72,24 +72,24 @@ namespace AssetProcessor
|
||||
|
||||
createJobsRequest.m_enabledPlatforms = {
|
||||
{ "pc", {}
|
||||
}, { "es3", {}
|
||||
}, { "android", {}
|
||||
}, { "ios", {}
|
||||
}, { "osx_gl", {}
|
||||
}, { "mac", {}
|
||||
}
|
||||
};
|
||||
ASSERT_EQ(createJobsRequest.GetEnabledPlatformAt(0), AssetBuilderSDK::Platform_PC);
|
||||
ASSERT_EQ(createJobsRequest.GetEnabledPlatformAt(1), AssetBuilderSDK::Platform_ES3);
|
||||
ASSERT_EQ(createJobsRequest.GetEnabledPlatformAt(1), AssetBuilderSDK::Platform_ANDROID);
|
||||
ASSERT_EQ(createJobsRequest.GetEnabledPlatformAt(2), AssetBuilderSDK::Platform_IOS);
|
||||
ASSERT_EQ(createJobsRequest.GetEnabledPlatformAt(3), AssetBuilderSDK::Platform_OSX);
|
||||
ASSERT_EQ(createJobsRequest.GetEnabledPlatformAt(3), AssetBuilderSDK::Platform_MAC);
|
||||
ASSERT_EQ(createJobsRequest.GetEnabledPlatformAt(4), AssetBuilderSDK::Platform_NONE);
|
||||
|
||||
createJobsRequest.m_enabledPlatforms = {
|
||||
{ "pc", {}
|
||||
}, { "es3", {}
|
||||
}, { "android", {}
|
||||
}
|
||||
};
|
||||
ASSERT_EQ(createJobsRequest.GetEnabledPlatformAt(0), AssetBuilderSDK::Platform_PC);
|
||||
ASSERT_EQ(createJobsRequest.GetEnabledPlatformAt(1), AssetBuilderSDK::Platform_ES3);
|
||||
ASSERT_EQ(createJobsRequest.GetEnabledPlatformAt(1), AssetBuilderSDK::Platform_ANDROID);
|
||||
ASSERT_EQ(createJobsRequest.GetEnabledPlatformAt(2), AssetBuilderSDK::Platform_NONE);
|
||||
// using a deprecated API should have generated warnings.
|
||||
// but we can't test for it because these warnings are WarningOnce and some other unit test might have already triggered it
|
||||
@@ -106,23 +106,23 @@ namespace AssetProcessor
|
||||
}
|
||||
};
|
||||
ASSERT_TRUE(createJobsRequest.IsPlatformEnabled(AssetBuilderSDK::Platform_PC));
|
||||
ASSERT_FALSE(createJobsRequest.IsPlatformEnabled(AssetBuilderSDK::Platform_ES3));
|
||||
ASSERT_FALSE(createJobsRequest.IsPlatformEnabled(AssetBuilderSDK::Platform_ANDROID));
|
||||
|
||||
createJobsRequest.m_enabledPlatforms = {
|
||||
{ "pc", {}
|
||||
}, { "es3", {}
|
||||
}, { "android", {}
|
||||
}
|
||||
};
|
||||
ASSERT_TRUE(createJobsRequest.IsPlatformEnabled(AssetBuilderSDK::Platform_PC));
|
||||
ASSERT_TRUE(createJobsRequest.IsPlatformEnabled(AssetBuilderSDK::Platform_ES3));
|
||||
ASSERT_TRUE(createJobsRequest.IsPlatformEnabled(AssetBuilderSDK::Platform_ANDROID));
|
||||
|
||||
createJobsRequest.m_enabledPlatforms = {
|
||||
{ "pc", {}
|
||||
}, { "es3", {}
|
||||
}, { "android", {}
|
||||
}
|
||||
};
|
||||
ASSERT_TRUE(createJobsRequest.IsPlatformEnabled(AssetBuilderSDK::Platform_PC));
|
||||
ASSERT_TRUE(createJobsRequest.IsPlatformEnabled(AssetBuilderSDK::Platform_ES3));
|
||||
ASSERT_TRUE(createJobsRequest.IsPlatformEnabled(AssetBuilderSDK::Platform_ANDROID));
|
||||
// using a deprecated API should have generated warnings.
|
||||
// but we can't test for it because these warnings are WarningOnce and some other unit test might have already triggered it
|
||||
}
|
||||
@@ -133,9 +133,9 @@ namespace AssetProcessor
|
||||
UnitTestUtils::AssertAbsorber absorb;
|
||||
|
||||
ASSERT_TRUE(createJobsRequest.IsPlatformValid(AssetBuilderSDK::Platform_PC));
|
||||
ASSERT_TRUE(createJobsRequest.IsPlatformValid(AssetBuilderSDK::Platform_ES3));
|
||||
ASSERT_TRUE(createJobsRequest.IsPlatformValid(AssetBuilderSDK::Platform_ANDROID));
|
||||
ASSERT_TRUE(createJobsRequest.IsPlatformValid(AssetBuilderSDK::Platform_IOS));
|
||||
ASSERT_TRUE(createJobsRequest.IsPlatformValid(AssetBuilderSDK::Platform_OSX));
|
||||
ASSERT_TRUE(createJobsRequest.IsPlatformValid(AssetBuilderSDK::Platform_MAC));
|
||||
ASSERT_TRUE(createJobsRequest.IsPlatformValid(AssetBuilderSDK::Platform_PROVO));
|
||||
ASSERT_TRUE(createJobsRequest.IsPlatformValid(AssetBuilderSDK::Platform_SALEM));
|
||||
ASSERT_TRUE(createJobsRequest.IsPlatformValid(AssetBuilderSDK::Platform_JASPER));
|
||||
|
||||
@@ -4020,15 +4020,15 @@ TEST_F(ModtimeScanningTest, ModtimeSkipping_EnablePlatform_ShouldProcessFilesFor
|
||||
m_assetProcessorManager->m_allowModtimeSkippingFeature = true;
|
||||
AssetUtilities::SetUseFileHashOverride(true, true);
|
||||
|
||||
// Enable es3 platform after the initial SetUp has already processed the files for pc
|
||||
// Enable android platform after the initial SetUp has already processed the files for pc
|
||||
QDir tempPath(m_tempDir.path());
|
||||
AssetBuilderSDK::PlatformInfo es3Platform("es3", { "host", "renderer" });
|
||||
m_config->EnablePlatform(es3Platform, true);
|
||||
AssetBuilderSDK::PlatformInfo androidPlatform("android", { "host", "renderer" });
|
||||
m_config->EnablePlatform(androidPlatform, true);
|
||||
|
||||
// There's no way to remove scanfolders and adding a new one after enabling the platform will cause the pc assets to build as well, which we don't want
|
||||
// Instead we'll just const cast the vector and modify the enabled platforms for the scanfolder
|
||||
auto& platforms = const_cast<AZStd::vector<AssetBuilderSDK::PlatformInfo>&>(m_config->GetScanFolderAt(0).GetPlatforms());
|
||||
platforms.push_back(es3Platform);
|
||||
platforms.push_back(androidPlatform);
|
||||
|
||||
// We need the builder fingerprints to be updated to reflect the newly enabled platform
|
||||
m_assetProcessorManager->ComputeBuilderDirty();
|
||||
@@ -4036,10 +4036,10 @@ TEST_F(ModtimeScanningTest, ModtimeSkipping_EnablePlatform_ShouldProcessFilesFor
|
||||
QSet<AssetFileInfo> filePaths = BuildFileSet();
|
||||
SimulateAssetScanner(filePaths);
|
||||
|
||||
ExpectWork(4, 2); // CreateJobs = 4, 2 files * 2 platforms. ProcessJobs = 2, just the es3 platform jobs (pc is already processed)
|
||||
ExpectWork(4, 2); // CreateJobs = 4, 2 files * 2 platforms. ProcessJobs = 2, just the android platform jobs (pc is already processed)
|
||||
|
||||
ASSERT_TRUE(m_data->m_processResults[0].m_destinationPath.contains("es3"));
|
||||
ASSERT_TRUE(m_data->m_processResults[1].m_destinationPath.contains("es3"));
|
||||
ASSERT_TRUE(m_data->m_processResults[0].m_destinationPath.contains("android"));
|
||||
ASSERT_TRUE(m_data->m_processResults[1].m_destinationPath.contains("android"));
|
||||
}
|
||||
|
||||
TEST_F(ModtimeScanningTest, ModtimeSkipping_ModifyTimestamp)
|
||||
|
||||
+23
-23
@@ -120,14 +120,14 @@ TEST_F(PlatformConfigurationUnitTests, TestFailReadConfigFile_Regular_Platforms)
|
||||
|
||||
// verify the data.
|
||||
ASSERT_NE(config.GetPlatformByIdentifier(AzToolsFramework::AssetSystem::GetHostAssetPlatform()), nullptr);
|
||||
ASSERT_NE(config.GetPlatformByIdentifier("es3"), nullptr);
|
||||
ASSERT_NE(config.GetPlatformByIdentifier("android"), nullptr);
|
||||
ASSERT_NE(config.GetPlatformByIdentifier("server"), nullptr);
|
||||
|
||||
ASSERT_TRUE(config.GetPlatformByIdentifier("es3")->HasTag("mobile"));
|
||||
ASSERT_TRUE(config.GetPlatformByIdentifier("es3")->HasTag("renderer"));
|
||||
ASSERT_TRUE(config.GetPlatformByIdentifier("es3")->HasTag("android"));
|
||||
ASSERT_TRUE(config.GetPlatformByIdentifier("android")->HasTag("mobile"));
|
||||
ASSERT_TRUE(config.GetPlatformByIdentifier("android")->HasTag("renderer"));
|
||||
ASSERT_TRUE(config.GetPlatformByIdentifier("android")->HasTag("android"));
|
||||
ASSERT_TRUE(config.GetPlatformByIdentifier("server")->HasTag("server"));
|
||||
ASSERT_FALSE(config.GetPlatformByIdentifier("es3")->HasTag("server"));
|
||||
ASSERT_FALSE(config.GetPlatformByIdentifier("android")->HasTag("server"));
|
||||
ASSERT_FALSE(config.GetPlatformByIdentifier("server")->HasTag("renderer"));
|
||||
}
|
||||
|
||||
@@ -397,7 +397,7 @@ TEST_F(PlatformConfigurationUnitTests, TestFailReadConfigFile_RegularScanfolderP
|
||||
AZStd::vector<AssetBuilderSDK::PlatformInfo> platforms = config.GetScanFolderAt(0).GetPlatforms();
|
||||
ASSERT_EQ(platforms.size(), 4);
|
||||
ASSERT_TRUE(AZStd::find(platforms.begin(), platforms.end(), AssetBuilderSDK::PlatformInfo(AzToolsFramework::AssetSystem::GetHostAssetPlatform(), AZStd::unordered_set<AZStd::string>{})) != platforms.end());
|
||||
ASSERT_TRUE(AZStd::find(platforms.begin(), platforms.end(), AssetBuilderSDK::PlatformInfo("es3", AZStd::unordered_set<AZStd::string>{})) != platforms.end());
|
||||
ASSERT_TRUE(AZStd::find(platforms.begin(), platforms.end(), AssetBuilderSDK::PlatformInfo("android", AZStd::unordered_set<AZStd::string>{})) != platforms.end());
|
||||
ASSERT_TRUE(AZStd::find(platforms.begin(), platforms.end(), AssetBuilderSDK::PlatformInfo("ios", AZStd::unordered_set<AZStd::string>{})) != platforms.end());
|
||||
ASSERT_TRUE(AZStd::find(platforms.begin(), platforms.end(), AssetBuilderSDK::PlatformInfo("server", AZStd::unordered_set<AZStd::string>{})) != platforms.end());
|
||||
|
||||
@@ -405,12 +405,12 @@ TEST_F(PlatformConfigurationUnitTests, TestFailReadConfigFile_RegularScanfolderP
|
||||
platforms = config.GetScanFolderAt(1).GetPlatforms();
|
||||
ASSERT_EQ(platforms.size(), 2);
|
||||
ASSERT_TRUE(AZStd::find(platforms.begin(), platforms.end(), AssetBuilderSDK::PlatformInfo(AzToolsFramework::AssetSystem::GetHostAssetPlatform(), AZStd::unordered_set<AZStd::string>{})) != platforms.end());
|
||||
ASSERT_TRUE(AZStd::find(platforms.begin(), platforms.end(), AssetBuilderSDK::PlatformInfo("es3", AZStd::unordered_set<AZStd::string>{})) != platforms.end());
|
||||
ASSERT_TRUE(AZStd::find(platforms.begin(), platforms.end(), AssetBuilderSDK::PlatformInfo("android", AZStd::unordered_set<AZStd::string>{})) != platforms.end());
|
||||
|
||||
ASSERT_EQ(config.GetScanFolderAt(2).GetDisplayName(), QString("folder1output"));
|
||||
platforms = config.GetScanFolderAt(2).GetPlatforms();
|
||||
ASSERT_EQ(platforms.size(), 1);
|
||||
ASSERT_TRUE(AZStd::find(platforms.begin(), platforms.end(), AssetBuilderSDK::PlatformInfo("es3", AZStd::unordered_set<AZStd::string>{})) != platforms.end());
|
||||
ASSERT_TRUE(AZStd::find(platforms.begin(), platforms.end(), AssetBuilderSDK::PlatformInfo("android", AZStd::unordered_set<AZStd::string>{})) != platforms.end());
|
||||
|
||||
ASSERT_EQ(config.GetScanFolderAt(3).GetDisplayName(), QString("folder2output"));
|
||||
platforms = config.GetScanFolderAt(3).GetPlatforms();
|
||||
@@ -454,7 +454,7 @@ TEST_F(PlatformConfigurationUnitTests, TestFailReadConfigFile_Recognizers)
|
||||
using namespace AzToolsFramework::AssetSystem;
|
||||
using namespace AssetProcessor;
|
||||
#if defined(AZ_PLATFORM_WINDOWS)
|
||||
const char* platformWhichIsNotCurrentPlatform = "osx_gl";
|
||||
const char* platformWhichIsNotCurrentPlatform = "mac";
|
||||
#else
|
||||
const char* platformWhichIsNotCurrentPlatform = "pc";
|
||||
#endif
|
||||
@@ -475,27 +475,27 @@ TEST_F(PlatformConfigurationUnitTests, TestFailReadConfigFile_Recognizers)
|
||||
ASSERT_EQ(recogs["i_caf"].m_patternMatcher.GetBuilderPattern().m_pattern, "*.i_caf");
|
||||
ASSERT_EQ(recogs["i_caf"].m_patternMatcher.GetBuilderPattern().m_type, AssetBuilderSDK::AssetBuilderPattern::Wildcard);
|
||||
ASSERT_EQ(recogs["i_caf"].m_platformSpecs.size(), 2);
|
||||
ASSERT_TRUE(recogs["i_caf"].m_platformSpecs.contains("es3"));
|
||||
ASSERT_TRUE(recogs["i_caf"].m_platformSpecs.contains("android"));
|
||||
ASSERT_TRUE(recogs["i_caf"].m_platformSpecs.contains(AzToolsFramework::AssetSystem::GetHostAssetPlatform()));
|
||||
ASSERT_FALSE(recogs["i_caf"].m_platformSpecs.contains("server")); // server has been set to skip.
|
||||
ASSERT_EQ(recogs["i_caf"].m_platformSpecs["es3"].m_extraRCParams, "mobile");
|
||||
ASSERT_EQ(recogs["i_caf"].m_platformSpecs["android"].m_extraRCParams, "mobile");
|
||||
ASSERT_EQ(recogs["i_caf"].m_platformSpecs[AzToolsFramework::AssetSystem::GetHostAssetPlatform()].m_extraRCParams, "defaultparams");
|
||||
|
||||
ASSERT_TRUE(recogs.contains("caf"));
|
||||
ASSERT_TRUE(recogs["caf"].m_platformSpecs.contains("es3"));
|
||||
ASSERT_TRUE(recogs["caf"].m_platformSpecs.contains("android"));
|
||||
ASSERT_TRUE(recogs["caf"].m_platformSpecs.contains("server"));
|
||||
ASSERT_TRUE(recogs["caf"].m_platformSpecs.contains(AzToolsFramework::AssetSystem::GetHostAssetPlatform()));
|
||||
ASSERT_EQ(recogs["caf"].m_platformSpecs.size(), 3);
|
||||
ASSERT_EQ(recogs["caf"].m_platformSpecs["es3"].m_extraRCParams, "rendererparams");
|
||||
ASSERT_EQ(recogs["caf"].m_platformSpecs["android"].m_extraRCParams, "rendererparams");
|
||||
ASSERT_EQ(recogs["caf"].m_platformSpecs[AzToolsFramework::AssetSystem::GetHostAssetPlatform()].m_extraRCParams, "rendererparams");
|
||||
ASSERT_EQ(recogs["caf"].m_platformSpecs["server"].m_extraRCParams, "copy");
|
||||
|
||||
ASSERT_TRUE(recogs.contains("mov"));
|
||||
ASSERT_TRUE(recogs["mov"].m_platformSpecs.contains("es3"));
|
||||
ASSERT_TRUE(recogs["mov"].m_platformSpecs.contains("android"));
|
||||
ASSERT_TRUE(recogs["mov"].m_platformSpecs.contains("server"));
|
||||
ASSERT_TRUE(recogs["mov"].m_platformSpecs.contains(AzToolsFramework::AssetSystem::GetHostAssetPlatform()));
|
||||
ASSERT_EQ(recogs["mov"].m_platformSpecs.size(), 3);
|
||||
ASSERT_EQ(recogs["mov"].m_platformSpecs["es3"].m_extraRCParams, "platformspecificoverride");
|
||||
ASSERT_EQ(recogs["mov"].m_platformSpecs["android"].m_extraRCParams, "platformspecificoverride");
|
||||
ASSERT_EQ(recogs["mov"].m_platformSpecs[AzToolsFramework::AssetSystem::GetHostAssetPlatform()].m_extraRCParams, "rendererparams");
|
||||
ASSERT_EQ(recogs["mov"].m_platformSpecs["server"].m_extraRCParams, "copy");
|
||||
|
||||
@@ -503,27 +503,27 @@ TEST_F(PlatformConfigurationUnitTests, TestFailReadConfigFile_Recognizers)
|
||||
// (but platforms can override it)
|
||||
ASSERT_TRUE(recogs.contains("rend"));
|
||||
ASSERT_TRUE(recogs["rend"].m_platformSpecs.contains(AzToolsFramework::AssetSystem::GetHostAssetPlatform()));
|
||||
ASSERT_TRUE(recogs["rend"].m_platformSpecs.contains("es3"));
|
||||
ASSERT_TRUE(recogs["rend"].m_platformSpecs.contains("android"));
|
||||
ASSERT_TRUE(recogs["rend"].m_platformSpecs.contains("server"));
|
||||
ASSERT_FALSE(recogs["rend"].m_platformSpecs.contains(platformWhichIsNotCurrentPlatform)); // this is not an enabled platform and should not be there.
|
||||
ASSERT_EQ(recogs["rend"].m_platformSpecs.size(), 3);
|
||||
ASSERT_EQ(recogs["rend"].m_platformSpecs[AzToolsFramework::AssetSystem::GetHostAssetPlatform()].m_extraRCParams, "rendererparams");
|
||||
ASSERT_EQ(recogs["rend"].m_platformSpecs["es3"].m_extraRCParams, "rendererparams");
|
||||
ASSERT_EQ(recogs["rend"].m_platformSpecs["android"].m_extraRCParams, "rendererparams");
|
||||
ASSERT_EQ(recogs["rend"].m_platformSpecs["server"].m_extraRCParams, ""); // default if not specified is empty string
|
||||
|
||||
ASSERT_TRUE(recogs.contains("alldefault"));
|
||||
ASSERT_TRUE(recogs["alldefault"].m_platformSpecs.contains(AzToolsFramework::AssetSystem::GetHostAssetPlatform()));
|
||||
ASSERT_TRUE(recogs["alldefault"].m_platformSpecs.contains("es3"));
|
||||
ASSERT_TRUE(recogs["alldefault"].m_platformSpecs.contains("android"));
|
||||
ASSERT_TRUE(recogs["alldefault"].m_platformSpecs.contains("server"));
|
||||
ASSERT_FALSE(recogs["alldefault"].m_platformSpecs.contains(platformWhichIsNotCurrentPlatform)); // this is not an enabled platform and should not be there.
|
||||
ASSERT_EQ(recogs["alldefault"].m_platformSpecs.size(), 3);
|
||||
ASSERT_EQ(recogs["alldefault"].m_platformSpecs[AzToolsFramework::AssetSystem::GetHostAssetPlatform()].m_extraRCParams, "");
|
||||
ASSERT_EQ(recogs["alldefault"].m_platformSpecs["es3"].m_extraRCParams, "");
|
||||
ASSERT_EQ(recogs["alldefault"].m_platformSpecs["android"].m_extraRCParams, "");
|
||||
ASSERT_EQ(recogs["alldefault"].m_platformSpecs["server"].m_extraRCParams, "");
|
||||
|
||||
ASSERT_TRUE(recogs.contains("skipallbutone"));
|
||||
ASSERT_FALSE(recogs["skipallbutone"].m_platformSpecs.contains(AzToolsFramework::AssetSystem::GetHostAssetPlatform()));
|
||||
ASSERT_FALSE(recogs["skipallbutone"].m_platformSpecs.contains("es3"));
|
||||
ASSERT_FALSE(recogs["skipallbutone"].m_platformSpecs.contains("android"));
|
||||
ASSERT_TRUE(recogs["skipallbutone"].m_platformSpecs.contains("server")); // server is only one enabled (set to copy)
|
||||
ASSERT_EQ(recogs["skipallbutone"].m_platformSpecs.size(), 1);
|
||||
ASSERT_EQ(recogs["skipallbutone"].m_platformSpecs["server"].m_extraRCParams, "copy");
|
||||
@@ -549,7 +549,7 @@ TEST_F(PlatformConfigurationUnitTests, TestFailReadConfigFile_Overrides)
|
||||
|
||||
// verify the data.
|
||||
ASSERT_NE(config.GetPlatformByIdentifier(AzToolsFramework::AssetSystem::GetHostAssetPlatform()), nullptr);
|
||||
ASSERT_NE(config.GetPlatformByIdentifier("es3"), nullptr);
|
||||
ASSERT_NE(config.GetPlatformByIdentifier("android"), nullptr);
|
||||
ASSERT_NE(config.GetPlatformByIdentifier("provo"), nullptr);
|
||||
// this override swaps server with provo in that it turns ON provo, turns off server
|
||||
ASSERT_EQ(config.GetPlatformByIdentifier("server"), nullptr); // this should be off due to overrides
|
||||
@@ -566,11 +566,11 @@ TEST_F(PlatformConfigurationUnitTests, TestFailReadConfigFile_Overrides)
|
||||
ASSERT_EQ(recogs["i_caf"].m_patternMatcher.GetBuilderPattern().m_pattern, "*.i_caf");
|
||||
ASSERT_EQ(recogs["i_caf"].m_patternMatcher.GetBuilderPattern().m_type, AssetBuilderSDK::AssetBuilderPattern::Wildcard);
|
||||
ASSERT_EQ(recogs["i_caf"].m_platformSpecs.size(), 3);
|
||||
ASSERT_TRUE(recogs["i_caf"].m_platformSpecs.contains("es3"));
|
||||
ASSERT_TRUE(recogs["i_caf"].m_platformSpecs.contains("android"));
|
||||
ASSERT_TRUE(recogs["i_caf"].m_platformSpecs.contains("provo"));
|
||||
ASSERT_TRUE(recogs["i_caf"].m_platformSpecs.contains(AzToolsFramework::AssetSystem::GetHostAssetPlatform()));
|
||||
ASSERT_FALSE(recogs["i_caf"].m_platformSpecs.contains("server")); // server has been set to skip.
|
||||
ASSERT_EQ(recogs["i_caf"].m_platformSpecs["es3"].m_extraRCParams, "mobile");
|
||||
ASSERT_EQ(recogs["i_caf"].m_platformSpecs["android"].m_extraRCParams, "mobile");
|
||||
ASSERT_EQ(recogs["i_caf"].m_platformSpecs[AzToolsFramework::AssetSystem::GetHostAssetPlatform()].m_extraRCParams, "defaultparams");
|
||||
ASSERT_EQ(recogs["i_caf"].m_platformSpecs["provo"].m_extraRCParams, "copy");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user