Code/Tools

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-08-20 17:54:20 -07:00
parent ca03f65a5d
commit a2ab05a262
31 changed files with 28 additions and 75 deletions
@@ -101,7 +101,6 @@ namespace AssetBuilderSDK
for (const auto& thisEntry : productDependencySet)
{
constexpr int flags = 0;
productDependencies.emplace_back(thisEntry.first, thisEntry.second);
}
}
@@ -192,7 +192,6 @@ void FolderRootWatch::WatchFolderLoop()
for (size_t index=0; index<bytesRead;)
{
struct inotify_event *event = ( struct inotify_event * ) &eventBuffer[ index ];
const char* eventName = event->name;
if (event->mask & (IN_CREATE | IN_DELETE | IN_MODIFY | IN_MOVE ))
{
@@ -115,7 +115,7 @@ namespace AssetProcessor
{
static constexpr unsigned int MessageType = TRequest::MessageType;
m_messageHandlers[MessageType] = [this, handler = AZStd::move(handler)](MessageData<AzFramework::AssetSystem::BaseAssetProcessorMessage> messageData)
m_messageHandlers[MessageType] = [handler = AZStd::move(handler)](MessageData<AzFramework::AssetSystem::BaseAssetProcessorMessage> messageData)
{
MessageData<TRequest> downcastData = messageData;
@@ -337,7 +337,7 @@ namespace AssetProcessor
// Merge the Project User and User home settings registry only in non-release builds
constexpr bool executeRegDumpCommands = false;
AZ::CommandLine* commandLine{};
AZ::ComponentApplicationBus::Broadcast([&registry, &commandLine](AZ::ComponentApplicationRequests* appRequests)
AZ::ComponentApplicationBus::Broadcast([&commandLine](AZ::ComponentApplicationRequests* appRequests)
{
commandLine = appRequests->GetAzCommandLine();
});
@@ -3500,7 +3500,6 @@ TEST_F(AssetProcessorManagerTest, JobDependencyOrderOnce_MultipleJobs_EmitOK)
using namespace AssetProcessor;
using namespace AssetBuilderSDK;
AZ::Uuid dummyBuilderUUID = AZ::Uuid::CreateRandom();
QDir tempPath(m_tempDir.path());
QString watchFolderPath = tempPath.absoluteFilePath("subfolder1");
const ScanFolderInfo* scanFolder = m_config->GetScanFolderByPath(watchFolderPath);
@@ -447,7 +447,6 @@ TEST_F(RCBuilderTest, ProcessLegacyRCJob_ProcessStandardSingleJob_Valid)
TEST_F(RCBuilderTest, ProcessLegacyRCJob_ProcessCopySingleJob_Valid)
{
AZStd::string name = "test";
AZ::Uuid builderUuid = AZ::Uuid::CreateRandom();
AZ::Uuid assetTypeUUid = AZ::Uuid::CreateRandom();
MockRCCompiler* mockRC = new MockRCCompiler();
TestInternalRecognizerBasedBuilder test(mockRC);
@@ -506,7 +505,6 @@ TEST_F(RCBuilderTest, MatchTempFileToSkip_SkipRCFiles_false)
TEST_F(RCBuilderTest, ProcessJob_ProcessStandardRCSingleJob_Valid)
{
AZ::Uuid assetTypeUUid = AZ::Uuid::CreateRandom();
MockRCCompiler* mockRC = new MockRCCompiler();
TestInternalRecognizerBasedBuilder test(mockRC);
MockRecognizerConfiguration configuration;
@@ -536,7 +534,6 @@ TEST_F(RCBuilderTest, ProcessJob_ProcessStandardRCSingleJob_Valid)
TEST_F(RCBuilderTest, ProcessJob_ProcessStandardRCSingleJob_Failed)
{
AZ::Uuid assetTypeUUid = AZ::Uuid::CreateRandom();
MockRCCompiler* mockRC = new MockRCCompiler();
TestInternalRecognizerBasedBuilder test(mockRC);
MockRecognizerConfiguration configuration;
@@ -564,7 +561,6 @@ TEST_F(RCBuilderTest, ProcessJob_ProcessStandardRCSingleJob_Failed)
TEST_F(RCBuilderTest, ProcessJob_ProcessStandardCopySingleJob_Valid)
{
AZ::Uuid assetTypeUUid = AZ::Uuid::CreateRandom();
MockRCCompiler* mockRC = new MockRCCompiler();
TestInternalRecognizerBasedBuilder test(mockRC);
MockRecognizerConfiguration configuration;
@@ -590,7 +586,6 @@ TEST_F(RCBuilderTest, ProcessJob_ProcessStandardCopySingleJob_Valid)
TEST_F(RCBuilderTest, ProcessJob_ProcessStandardSkippedSingleJob_Invalid)
{
AZ::Uuid assetTypeUUid = AZ::Uuid::CreateRandom();
MockRCCompiler* mockRC = new MockRCCompiler();
TestInternalRecognizerBasedBuilder test(mockRC);
MockRecognizerConfiguration configuration;
@@ -87,8 +87,6 @@ namespace AssetProcessor
return;
}
QModelIndex newIndicesStart;
AssetTreeItem* parentItem = m_root.get();
// Use posix path separator for each child item
AZ::IO::Path currentFullFolderPath(AZ::IO::PosixPathSeparator);
@@ -604,14 +604,14 @@ void RCcontrollerUnitTests::RunRCControllerTests()
m_rcController.m_RCJobListModel.addNewJob(jobA);
bool beginWorkA = false;
QObject::connect(jobA, &RCJob::BeginWork, this, [this, &beginWorkA]()
QObject::connect(jobA, &RCJob::BeginWork, this, [&beginWorkA]()
{
beginWorkA = true;
}
);
bool jobFinishedA = false;
QObject::connect(jobA, &RCJob::JobFinished, this, [this, &jobFinishedA](AssetBuilderSDK::ProcessJobResponse /*result*/)
QObject::connect(jobA, &RCJob::JobFinished, this, [&jobFinishedA](AssetBuilderSDK::ProcessJobResponse /*result*/)
{
jobFinishedA = true;
}
@@ -655,7 +655,7 @@ void RCcontrollerUnitTests::RunRCControllerTests()
);
bool jobFinishedB = false;
QObject::connect(jobB, &RCJob::JobFinished, this, [this, &jobFinishedB](AssetBuilderSDK::ProcessJobResponse /*result*/)
QObject::connect(jobB, &RCJob::JobFinished, this, [&jobFinishedB](AssetBuilderSDK::ProcessJobResponse /*result*/)
{
jobFinishedB = true;
}
@@ -319,13 +319,6 @@ void UtilitiesUnitTests::StartTest()
// --------------- TEST FilePatternMatcher
{
const char* wildcardMatch[] = {
"*.cfg",
"*.txt",
"abf*.llm"
"sdf.c*",
"a.bcd"
};
{
AssetBuilderSDK::FilePatternMatcher extensionWildcardTest(AssetBuilderSDK::AssetBuilderPattern("*.cfg", AssetBuilderSDK::AssetBuilderPattern::Wildcard));
UNIT_TEST_EXPECT_TRUE(extensionWildcardTest.MatchesPath(AZStd::string("foo.cfg")));
@@ -1209,7 +1209,7 @@ void ApplicationManagerBase::InitFileProcessor()
AssetProcessor::ThreadController<AssetProcessor::FileProcessor>* fileProcessorHelper = new AssetProcessor::ThreadController<AssetProcessor::FileProcessor>();
addRunningThread(fileProcessorHelper);
m_fileProcessor.reset(fileProcessorHelper->initialize([this, &fileProcessorHelper]()
m_fileProcessor.reset(fileProcessorHelper->initialize([this]()
{
return new AssetProcessor::FileProcessor(m_platformConfiguration);
}));
@@ -1399,7 +1399,6 @@ namespace AssetUtilities
QString inputName;
QString platformName;
QString jobDescription;
AZ::Uuid guid = AZ::Uuid::CreateNull();
using namespace AzToolsFramework::AssetDatabase;