Fix more Linux test failures.

This commit is contained in:
amzn-sj
2021-05-24 13:08:25 -07:00
parent 115f18fcdc
commit 86932f95d6
2 changed files with 12 additions and 5 deletions
@@ -15,6 +15,7 @@
#include <AzToolsFramework/Asset/AssetSeedManager.h>
#include <AzFramework/Asset/AssetRegistry.h>
#include <AzCore/IO/FileIO.h>
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
#include <AzFramework/IO/LocalFileIO.h>
#include <AzFramework/Asset/AssetCatalog.h>
#include <AzFramework/StringFunc/StringFunc.h>
@@ -62,6 +63,12 @@ namespace UnitTest
m_assetSeedManager = new AzToolsFramework::AssetSeedManager();
m_assetRegistry = new AzFramework::AssetRegistry();
AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get();
auto projectPathKey =
AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path";
registry->Set(projectPathKey, "AutomatedTesting");
AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry);
m_application->Start(AzFramework::Application::Descriptor());
for (int idx = 0; idx < s_totalAssets; idx++)
@@ -35,16 +35,16 @@ PlatformConfigurationUnitTests::PlatformConfigurationUnitTests()
void PlatformConfigurationUnitTests::SetUp()
{
using namespace AssetProcessor;
m_qApp = new QCoreApplication(m_argc, m_argv);
AssetProcessorTest::SetUp();
AssetUtilities::ResetAssetRoot();
AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get();
auto projectPathKey =
AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path";
registry->Set(projectPathKey, "AutomatedTesting");
AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry);
using namespace AssetProcessor;
m_qApp = new QCoreApplication(m_argc, m_argv);
AssetProcessorTest::SetUp();
AssetUtilities::ResetAssetRoot();
}
void PlatformConfigurationUnitTests::TearDown()