Commit Graph

30 Commits (60adc098da2d3026280bd0caa10915d6c8e6e14f)

Author SHA1 Message Date
nemerle 5ff65be314 This reduces non-unity build time by ~2% and build size by ~0.5%.
This PR is a 'clean' version of #6199 updated to latest development

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
4 years ago
Steve Pham be252d797d
Remove disabled failed asset load tests trait from linux (#6100)
* Remove trait AZ_TRAIT_DISABLE_FAILED_ASSET_LOAD_TESTS for Linux

Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com>
4 years ago
amzn-mike 828431f185
Update AssetManager unit tests to not interact with the disk (#5815)
* Changed AssetManager tests to use memory streams for asset reading/writing

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fix compilation on non-unity builds

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fixed handling of path lookups when test folder path is non-empty

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add more detailed error message for "asset is not loaded"

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Make numThreads a constexpr

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add FindFile function

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Remove unused lambda capture

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Remove trailing whitespace

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add size to assert

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
amzn-mike 56900484fc
[SPEC-7644] ParallelDeepAssetReferences is failing intermittently (#5721)
* Fixed race condition caused by trying to handle asset ready event before asset container has finished filling out all the data structures.

Added check to only handle asset ready once init is complete
Added unit test to verify fix

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Re-enable test

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add missing space to error message

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add comment on sleep

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Collapse nested namespace

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Collapse nested namespace

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
amzn-mike 4b37e742d3
Add interface to allow disabling global AZ Core test environment trace bus suppression (#5594)
* Add interface to allow disabling global AZ Core test environment trace bus suppression

Update BaseAssetManagerTest class to disable the suppression by default
Update specific asset manager tests that rely on the trace bus suppression to ReEnable it

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Remove nodiscard

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Remove unique_ptr for disable token

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fix move operator

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Switch to having individual flags for suppression of each type of output

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add cvar to force stacktrace output.

Clean up whitespace

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
amzn-mike 0cea59d669
[LYN-7463] Fix insert streaming request failure (#5604)
* Fix race condition where asset would finish loading and another request would start before the streamer request could be cleared

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Re-enable disabled test which was failing for the same reason.

Fix test timeout which was way too long.
Reduce test iterations to keep test time safely under 5 seconds.

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Instead of using a mutex, re-order the statements to remove the streamer request first

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
Esteban Papp 7651ba621c
Remove old "Integ" functionality from tests (#4688)
* fixes some warnings for newer versions of VS2022

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* more warning fixes

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* remove integ test filters from AzTest

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* remove integ test handling from AzTestRunner

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* changes integ tests of gridmate to regular tests and disables failing ones

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* removes the Integ from the EMotionFX tests, but leaves them disabled since they are failing

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* removes the Integ from the HttpRequestor tests and disables it since is not passing

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* changing integ tests for DISABLED, these ones are using files that are not there

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* fixes linux build
gridmate tests that were Integ are now disabled

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* fixes linux warnings

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
lumberyard-employee-dm 090aa8f053
Removed ununeeded includes from EBus EBus.h and Policies.h (#4256)
* Removed ununeeded includes from EBus EBus.h and Policies.h

Updated the locations which needed those includes

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Adding missing include for <memory> to AWsClientAuthBus.h

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Remove the while true loop in the EBusQueuePolicy Execute() function

The while true loop in Execute was for allowing additional functions to be queued in the middle of execution of current list of functions.
That functionality was dangerous, because if a queued function added itself during execution unconditionally, then it would result in an infinite loop

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Updated the AssetManager::DispatchEvents function to pump the AssetBus event queue until empty

Queued Events on the AssetBus is able to queue additional events on that Bus during execution of those events.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Changed the AssetManager::DispatchEvents function to only execute the
AssetBus queued events once

Changed the AssetJobsFloodTest.AssetWithNoLoadReference_LoadDependencies_BehaviorObeyed test to dispatch events until the OnAssetContainerReady callback is signaled.

This happens after every asset load to make sure that the
expiring AssetContainer instances are removed from `AssetManager::m_ownedAssetContainer` container before retrying to load the same asset.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Added a MaxTimeoutSeconds constant for the maximum amount of the time to run a single DispatchEvents loop

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
Artur K f44169f7fa
Cleanup SerializeContext.h pt.1 (#4264)
* Remove AssetSerializer inclusion from SerializeContext header

Moved a few Reflect methods to new cpp files.

In addition, some preparations for further header dependency reductions.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Fix smoke test lua failures.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Windows build fixes.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Missing license headers

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Fix white-space issues.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Code review fix for AzToolsFramework/AssetEditor/AssetEditorBus.h

Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Fix inheritance list wrapping broken by older clang-format

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
Artur K 567c0ae24d
Modernization + AZStd::function compare fix. (#3680)
* Modernization + small fix.

Modernize ( `bool`/`override`/other) code in AzCore, AzFramework, AzQtComponents, AzToolsFramework, etc.
Replaced a `bind` or two, use `using` in a few places as well.

Fix nullptr comparison of AZStd::function.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Apply review-based changes

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
4 years ago
Esteban Papp 9245a31196 more fixes for Code
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
AMZN-stankowi 6520c347e4
Disabling a flaky test (#2749) ContainerFilterTest_ContainersWithAndWithoutFiltering_Success
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
4 years ago
Steve Pham 62356b811f
Non unity compile fixes (#2365)
* Add missing RTTI include to fix non-unity build error
* Add missing includes that were automatically added as part of unity builds

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
Steve Pham 38261d0800
Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
hultonha fe9c9f66f1 disable ParallelDeepAssetReferences test
Signed-off-by: hultonha <hultonha@amazon.co.uk>
5 years ago
Steve Pham b4a2edec6a
Final update copyright headers to reference license files at the repo root (#1693)
* Final update copyright headers to reference license files at the repo root

Signed-off-by: spham <spham@amazon.com>

* Fix copyright validator unit tests to support the stale O3DE header scenario

Signed-off-by: spham <spham@amazon.com>
5 years ago
Steve Pham 70042fcdcd
O3DE Copyright Updates for Linux Foundation (#1504) 5 years ago
Mike Balfour 0ae123eae6
Fix AssetContainer behavior with immediate load errors
The AssetContainer was getting "stuck" in the case that it tried to load a missing asset that was already registered with the AssetManager as missing. This fixes the bug, as well as adding a unit test for the specific condition.
5 years ago
mbalfour 7866178f3e Fix AssetContainer behavior with immediate load errors
The AssetContainer was getting "stuck" in the case that it tried to load a missing asset that was already registered with the AssetManager as missing.  This fixes the bug, as well as adding a unit test for the specific condition.
5 years ago
sharmajs-amzn 7f5962d1ba
disable AssetJobsFloodTest.ContainerCoreTest_BasicDependencyManagement_Success test (#703) 5 years ago
mbalfour 53a6e5ac6b Addressed feedback. 5 years ago
mbalfour 5df82caef6 [LYN-3464] Vegetation unit tests intermittently failed due to an AssetManager bug. Inside the AssetContainer, if the root asset finished loading during the container initialization, the CheckReady() call at the end of initialization would detect the loaded asset, but would skip sending out notifications because the initialized flag wasn't set yet. This would lead to an extra asset reference remaining in the AssetManager itself, would would then cause errors when the asset handler for that asset got removed.
By setting the initialization flag before the CheckReady() call, the notifications get sent correctly, and no extra asset references remain.  This checkin also includes a unit test for the AssetManager that specifically forces this condition to happen and validates that it works correctly.
5 years ago
amzn-mike d25179303d Add jira ticket for disabled tests 5 years ago
amzn-mike c61b244416 Use a const to toggle asset cancellation on and off 5 years ago
amzn-mike 58e8233c2c Remove debug message 5 years ago
amzn-mike 0428189bed Increase test difficulty 5 years ago
amzn-mike 35a47932eb Disable weak references and unit tests for them. 5 years ago
amzn-mike 3907ffc173 Add unit test 5 years ago
alexpete 75dc720198 Integrating latest 47acbe8 5 years ago
alexpete a10351f38d Initial commit 5 years ago