updated missing dependency tests to use assets that aren't deprecated (#5916)
* Updated missing dependency test to use assets that will have their builders change less often: other missing dependency test assets. Signed-off-by: AMZN-stankowi <4838196+AMZN-stankowi@users.noreply.github.com> * Updated missing dependency tests to use assets that aren't deprecated or removed. Signed-off-by: AMZN-stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
This commit is contained in:
+8
-5
@@ -183,23 +183,26 @@ def ap_missing_dependency_fixture(request, workspace, ap_setup_fixture) -> Any:
|
||||
:return: None
|
||||
"""
|
||||
logger.info(f"Searching output for expected dependencies for product {product}")
|
||||
sorted_expected = sorted(expected_dependencies)
|
||||
# Check dependencies found either in the log or console output
|
||||
for product_name, missing_deps in self.extract_missing_dependencies_from_output(log_output).items():
|
||||
if product in product_name:
|
||||
sorted_missing = sorted(missing_deps)
|
||||
# fmt:off
|
||||
assert sorted(missing_deps) == sorted(expected_dependencies), \
|
||||
assert sorted_expected == sorted_missing, \
|
||||
f"Missing dependencies for '{product_name}' did not match expected. Expected: " \
|
||||
f"{expected_dependencies}, Actual: {missing_deps}"
|
||||
f"{sorted_expected}, Actual: {sorted_missing}"
|
||||
# fmt:on
|
||||
|
||||
# Check dependencies found in Database
|
||||
for product_name, missing_deps in self.extract_missing_dependencies_from_database(product,
|
||||
platforms).items():
|
||||
if product.replace("\\", "/") in product_name:
|
||||
sorted_missing = sorted(missing_deps)
|
||||
# fmt:off
|
||||
assert sorted(expected_dependencies) == sorted(missing_deps), \
|
||||
f"Product '{product_name}' expected missing dependencies: {expected_dependencies}; " \
|
||||
f"actual missing dependencies {missing_deps}"
|
||||
assert sorted_expected == sorted_missing, \
|
||||
f"Product '{product_name}' expected missing dependencies: {sorted_expected}; " \
|
||||
f"actual missing dependencies {sorted_missing}"
|
||||
# fmt:on
|
||||
|
||||
def __getitem__(self, item: str) -> object:
|
||||
|
||||
+43
-41
@@ -120,31 +120,29 @@ class TestsMissingDependencies_WindowsAndMac(object):
|
||||
|
||||
# Relative path to the txt file with missing dependencies
|
||||
expected_product = f"testassets\\validuuidsnotdependency.txt"
|
||||
self._asset_processor.add_source_folder_assets(f"{self._workspace.project}\\Objects\\LumberTank")
|
||||
self._asset_processor.add_source_folder_assets(f"{self._workspace.project}\\Objects\\Characters\\Jack")
|
||||
# Expected missing dependencies
|
||||
expected_dependencies = [
|
||||
# String Asset #
|
||||
('1CB10C43F3245B93A294C602ADEF95F9:[0', '{1CB10C43-F324-5B93-A294-C602ADEF95F9}:0'),
|
||||
# InvalidAssetIdNoReport.txt
|
||||
('E68A85B0-131D-5A82-B2D5-BC58EE4062AE', '{E68A85B0-131D-5A82-B2D5-BC58EE4062AE}:0'),
|
||||
# InvalidRelativePathsNoReport.txt
|
||||
('B3EF12DD306C520EB0A8A6B0D031A195', '{B3EF12DD-306C-520E-B0A8-A6B0D031A195}:0'),
|
||||
# SelfReferenceUUID.txt
|
||||
('33bcee02F3225688ABEE534F6058593F', '{33BCEE02-F322-5688-ABEE-534F6058593F}:0'),
|
||||
('345E5C660D6254FF8D0F7C8EE66A2249', '{345E5C66-0D62-54FF-8D0F-7C8EE66A2249}:3e8'),
|
||||
('345E5C660D6254FF8D0F7C8EE66A2249', '{345E5C66-0D62-54FF-8D0F-7C8EE66A2249}:3ea'),
|
||||
('345E5C660D6254FF8D0F7C8EE66A2249', '{345E5C66-0D62-54FF-8D0F-7C8EE66A2249}:3eb'),
|
||||
('37108522F50459499CD6C8D47A960CF1', '{37108522-F504-5949-9CD6-C8D47A960CF1}:3e8'),
|
||||
('37108522F50459499CD6C8D47A960CF1', '{37108522-F504-5949-9CD6-C8D47A960CF1}:3ea'),
|
||||
('37108522F50459499CD6C8D47A960CF1', '{37108522-F504-5949-9CD6-C8D47A960CF1}:3eb'),
|
||||
('6BDE282B49C957F7B0714B26579BCA9A', '{6BDE282B-49C9-57F7-B071-4B26579BCA9A}:0'),
|
||||
('747D31D71E62553592226173C49CF97E', '{747D31D7-1E62-5535-9222-6173C49CF97E}:1'),
|
||||
('747D31D71E62553592226173C49CF97E', '{747D31D7-1E62-5535-9222-6173C49CF97E}:2'),
|
||||
('A26C73D1837E5AE59E68F916FA7C3699', '{A26C73D1-837E-5AE5-9E68-F916FA7C3699}:3e8'),
|
||||
('A26C73D1837E5AE59E68F916FA7C3699', '{A26C73D1-837E-5AE5-9E68-F916FA7C3699}:3ea'),
|
||||
('A26C73D1837E5AE59E68F916FA7C3699', '{A26C73D1-837E-5AE5-9E68-F916FA7C3699}:3eb'),
|
||||
('B076CDDC-14DF-50F4-A5E9-7518ABB3E851', '{B076CDDC-14DF-50F4-A5E9-7518ABB3E851}:0'),
|
||||
('C67BEA9F-09FF-59AA-A7F0-A52B8F987508', '{C67BEA9F-09FF-59AA-A7F0-A52B8F987508}:3e8'),
|
||||
('C67BEA9F-09FF-59AA-A7F0-A52B8F987508', '{C67BEA9F-09FF-59AA-A7F0-A52B8F987508}:3ea'),
|
||||
('C67BEA9F-09FF-59AA-A7F0-A52B8F987508', '{C67BEA9F-09FF-59AA-A7F0-A52B8F987508}:3eb'),
|
||||
('C67BEA9F-09FF-59AA-A7F0-A52B8F987508', '{C67BEA9F-09FF-59AA-A7F0-A52B8F987508}:3ec'),
|
||||
('D92C4661C8985E19BD3597CB2318CFA6:[0', '{D92C4661-C898-5E19-BD35-97CB2318CFA6}:0'),
|
||||
# SelfReferencePath.txt
|
||||
('DD587FBE-16C8-5B98-AE3C-A9F8750B2692', '{DD587FBE-16C8-5B98-AE3C-A9F8750B2692}:0'),
|
||||
# InvalidUUIDNoReport.txt
|
||||
('837412DF-D05F-576D-81AA-ACF360463749', '{837412DF-D05F-576D-81AA-ACF360463749}:0'),
|
||||
# MaxIteration31Deep.txt
|
||||
('3F642A0FDC825696A70A1DA5709744DF', '{3F642A0F-DC82-5696-A70A-1DA5709744DF}:0'),
|
||||
# OnlyMatchesCorrectLengthUUIDs.txt
|
||||
('2545AD8B-1B9B-5F93-859D-D8DC1DC2B480', '{2545AD8B-1B9B-5F93-859D-D8DC1DC2B480}:0'),
|
||||
# WildcardScanTest1.txt
|
||||
('1CB10C43F3245B93A294C602ADEF95F9:[0', '{1CB10C43-F324-5B93-A294-C602ADEF95F9}:0'),
|
||||
# RelativeProductPathsNotDependencies.txt
|
||||
('B772953CA08A5D209491530E87D11504:[0', '{B772953C-A08A-5D20-9491-530E87D11504}:0'),
|
||||
# WildcardScanTest2.txt
|
||||
('D92C4661C8985E19BD3597CB2318CFA6', '{D92C4661-C898-5E19-BD35-97CB2318CFA6}:0'),
|
||||
]
|
||||
self.do_missing_dependency_test(expected_product, expected_dependencies,
|
||||
"%ValidUUIDsNotDependency.txt")
|
||||
@@ -187,8 +185,11 @@ class TestsMissingDependencies_WindowsAndMac(object):
|
||||
# Expected missing dependencies
|
||||
expected_dependencies = [
|
||||
# String Asset #
|
||||
('2ef92b8D044E5C278E2BB1AC0374A4E7:1003', '{2EF92B8D-044E-5C27-8E2B-B1AC0374A4E7}:3eb'),
|
||||
# _dev_Red.tif
|
||||
('2ef92b8D044E5C278E2BB1AC0374A4E7:1000', '{2EF92B8D-044E-5C27-8E2B-B1AC0374A4E7}:3e8'),
|
||||
# _dev_Purple.tif
|
||||
('A2482826-053D-5634-A27B-084B1326AAE5}:[1002', '{A2482826-053D-5634-A27B-084B1326AAE5}:3ea'),
|
||||
# _dev_White.tif
|
||||
('D83B36F1-61A6-5001-B191-4D0CE282E236}-1002', '{D83B36F1-61A6-5001-B191-4D0CE282E236}:3ea'),
|
||||
]
|
||||
|
||||
@@ -237,11 +238,10 @@ class TestsMissingDependencies_WindowsAndMac(object):
|
||||
expected_dependencies = [
|
||||
# String Asset #
|
||||
('TestAssets\\WildcardScanTest1.txt', '{1CB10C43-F324-5B93-A294-C602ADEF95F9}:0'),
|
||||
('libs/particles/milestone2PARTICLES.XML', '{6BDE282B-49C9-57F7-B071-4B26579BCA9A}:0'),
|
||||
('TESTASSETS/ReportONEmISSINGdEPENDENCY.tXT', '{BE5E2373-245E-59E4-B4C6-7370EEAA2EFD}:0'),
|
||||
('textures/_dev_Purple.tif', '{A2482826-053D-5634-A27B-084B1326AAE5}:3e8'),
|
||||
('textures/_dev_Purple.tif', '{A2482826-053D-5634-A27B-084B1326AAE5}:3ea'),
|
||||
('textures/_dev_Purple.tif', '{A2482826-053D-5634-A27B-084B1326AAE5}:3eb'),
|
||||
('project.json', '{B076CDDC-14DF-50F4-A5E9-7518ABB3E851}:0'),
|
||||
('TestAssets/InvalidAssetIdNoReport.txt', '{E68A85B0-131D-5A82-B2D5-BC58EE4062AE}:0'),
|
||||
('TestAssets/RelativeProductPathsNotDependencies.txt', '{B772953C-A08A-5D20-9491-530E87D11504}:0'),
|
||||
]
|
||||
|
||||
@@ -282,29 +282,31 @@ class TestsMissingDependencies_WindowsAndMac(object):
|
||||
2. Set the expected missing dependencies
|
||||
3. Execute test
|
||||
"""
|
||||
|
||||
self._asset_processor.add_source_folder_assets(f"Gems\\LyShineExamples\\Assets\\UI\\Fonts\\LyShineExamples")
|
||||
self._asset_processor.add_scan_folder(f"Gems\\LyShineExamples\\Assets")
|
||||
# Relative path to the txt file with missing dependencies as product paths
|
||||
expected_product = f"testassets\\relativeproductpathsnotdependencies.txt"
|
||||
expected_dependencies = [
|
||||
# String Asset #
|
||||
('materials/floor_tile.mtl', '{0EFF5E4A-F544-5D87-8696-6DDFA62D6063}:0'),
|
||||
('materials/am_grass1.mtl', '{1151F14D-38A6-5579-888A-BE3139882E68}:0'),
|
||||
('2ef92b8D044E5C278E2BB1AC0374A4E7:1002', '{2EF92B8D-044E-5C27-8E2B-B1AC0374A4E7}:3ea'),
|
||||
('textures/milestone2/ama_grey_02.tif.streamingimage', '{3EE80AAD-EB9C-56BD-9E9C-65410578998C}:3e8'),
|
||||
('ui/milestone2menu.uicanvas', '{445D9AF3-6CA5-5281-82A9-5C570BCD1DB8}:0'),
|
||||
('libs/particles/milestone2particles.xml', '{6BDE282B-49C9-57F7-B071-4B26579BCA9A}:0'),
|
||||
('textures/_dev_yellow_light.tif.1002.imagemipchain', '{6C40868F-3FC1-5115-96EA-DD0A9E33DEE4}:3ea'),
|
||||
('textures\\\\_dev_tan.tif.streamingimage', '{8F2BCEF5-C8CE-5B80-8103-8C1D694D012C}:3e8'),
|
||||
('materials/am_rockground.mtl', '{A1DA3D05-A020-5BB5-A608-C4812B7BD733}:0'),
|
||||
('textures/_dev_purple.tif.streamingimage', '{A2482826-053D-5634-A27B-084B1326AAE5}:3e8'),
|
||||
('A2482826-053D-5634-A27B-084B1326AAE5}:[1002', '{A2482826-053D-5634-A27B-084B1326AAE5}:3ea'),
|
||||
('project.json', '{B076CDDC-14DF-50F4-A5E9-7518ABB3E851}:0'),
|
||||
('CEAA362B4E505BCEB827CB92EF40A50E', '{CEAA362B-4E50-5BCE-B827-CB92EF40A50E}:1'),
|
||||
('CEAA362B4E505BCEB827CB92EF40A50E', '{CEAA362B-4E50-5BCE-B827-CB92EF40A50E}:2'),
|
||||
('textures\\_dev_stucco.tif.streamingimage', '{70114D85-D712-5AEB-A816-8FE3A37087AF}:3e8'),
|
||||
('textures\\\\_dev_tan.tif.streamingimage', '{8F2BCEF5-C8CE-5B80-8103-8C1D694D012C}:3e8'),
|
||||
('TEXTURES/_DEV_WHITE.tif.streamingimage', '{D83B36F1-61A6-5001-B191-4D0CE282E236}:3e8'),
|
||||
('textures/_dev_yellow_light.tif.1002.imagemipchain', '{6C40868F-3FC1-5115-96EA-DD0A9E33DEE4}:3ea'),
|
||||
('textures/_dev_woodland.tif.1002.imagemipchain', '{F3DD193C-5845-569C-A974-AA338B30CF86}:3ea'),
|
||||
('textures/_dev_woodland.tif.streamingimage', '{F3DD193C-5845-569C-A974-AA338B30CF86}:3e8'),
|
||||
('textures/_dev_yellow_light.tif.streamingimage', '{6C40868F-3FC1-5115-96EA-DD0A9E33DEE4}:3e8'),
|
||||
('textures/_dev_yellow_med.tif.1002.imagemipchain', '{BB4DFF57-52BD-525B-9628-68232E31802C}:3ea'),
|
||||
('textures/lights/flare01.tif.streamingimage', '{D8E49CC4-C743-5F31-A1EC-4AA89163B8F5}:3e8'),
|
||||
# SelfReferenceUUID.txt
|
||||
('33BCEE02-F322-5688-ABEE-534F6058593F', '{33BCEE02-F322-5688-ABEE-534F6058593F}:0'),
|
||||
('textures/test_texture_sequence/test_texture_sequence000.png.streamingimage', '{6CC90BEE-0A9F-57A8-9013-7C1D643C0E8E}:3e8'),
|
||||
# _dev_red.tif.streamingimage
|
||||
('2ef92b8D044E5C278E2BB1AC0374A4E7:1002', '{2EF92B8D-044E-5C27-8E2B-B1AC0374A4E7}:3ea'),
|
||||
# SelfReferenceAssetID.txt
|
||||
('785A05D2-483E-5B43-A2B9-92ACDAE6E938', '{785A05D2-483E-5B43-A2B9-92ACDAE6E938}:0'),
|
||||
('textures/test_texture_sequence/test_texture_sequence001.png.streamingimage', '{8A8A37DD-01B9-5D70-92E4-925E2C0FE826}:3e8'),
|
||||
# _dev_purple.tif.1002.imagemipchain
|
||||
('A2482826-053D-5634-A27B-084B1326AAE5}:[1002', '{A2482826-053D-5634-A27B-084B1326AAE5}:3ea'),
|
||||
('textures/_dev_purple_glass.tif.1002.imagemipchain', '{2FCDD831-77D1-5BE1-A4C8-CA47E4F89F19}:3ea'),
|
||||
]
|
||||
|
||||
self.do_missing_dependency_test(expected_product, expected_dependencies,
|
||||
|
||||
@@ -2,24 +2,24 @@ These tests are mostly done with files that have a different extension between s
|
||||
The source scan is done first, and will catch files in the source path.
|
||||
Product path searching is resolved using "endsWith" logic.
|
||||
textures/_dev_purple.tif.streamingimage
|
||||
Back slashes, and project name in the path
|
||||
pc/textures/_dev_stucco.tif.streamingimage
|
||||
Back slashes
|
||||
textures\_dev_stucco.tif.streamingimage
|
||||
Double back slashes
|
||||
textures\\_dev_tan.tif.streamingimage
|
||||
Casing doesn't match
|
||||
TEXTURES/_DEV_WHITE.tif.streamingimage
|
||||
Some files have multiple extensions, this verifies that won't trip up the scanner.
|
||||
textures/_dev_yellow_light.tif.1002.imagemipchain
|
||||
Path inline textures/milestone2/ama_grey_02.tif.streamingimage test
|
||||
Path inline textures/_dev_woodland.tif.1002.imagemipchain test
|
||||
Path after=textures/_dev_woodland.tif.streamingimage equal sign
|
||||
|
||||
Multiple paths on one line
|
||||
Multiple materials/am_grass1.mtl paths materials/am_rockground.mtl on one line
|
||||
Path before a UUID
|
||||
Path materials/floor_tile.mtl before B92667DC-9F5B-5D72-A29D-99219DD9B691 a UUID
|
||||
Path before an asset ID
|
||||
Path ui/milestone2menu.uicanvas before an 2ef92b8D044E5C278E2BB1AC0374A4E7:1002 asset ID
|
||||
Path after a UUID
|
||||
Path after CEAA362B4E505BCEB827CB92EF40A50E a project.json UUID
|
||||
Path after an asset ID
|
||||
Path after {A2482826-053D-5634-A27B-084B1326AAE5}:[1002] an libs/particles/milestone2particles.xml asset ID
|
||||
Multiple textures/_dev_yellow_light.tif.streamingimage paths textures/_dev_yellow_med.tif.1002.imagemipchain on one line
|
||||
Path before a UUID for SelfReferenceUUID text file
|
||||
Path textures/lights/flare01.tif.streamingimage before 33BCEE02-F322-5688-ABEE-534F6058593F a UUID
|
||||
Path before an asset ID for _dev_red image
|
||||
Path textures/test_texture_sequence/test_texture_sequence000.png.streamingimage before an 2ef92b8D044E5C278E2BB1AC0374A4E7:1002 asset ID
|
||||
Path after a UUID for SelfReferenceAssetID text file
|
||||
Path after 785A05D2-483E-5B43-A2B9-92ACDAE6E938 a textures/test_texture_sequence/test_texture_sequence001.png.streamingimage UUID
|
||||
Path after an asset ID for _dev_purple image file
|
||||
Path after {A2482826-053D-5634-A27B-084B1326AAE5}:[1002] an textures/_dev_purple_glass.tif.1002.imagemipchain asset ID
|
||||
|
||||
@@ -3,6 +3,6 @@ TestAssets/RelativeProductPathsNotDependencies.txt
|
||||
Back slashes
|
||||
TestAssets\WildcardScanTest1.txt
|
||||
Casing doesn't match
|
||||
libs/particles/milestone2PARTICLES.XML
|
||||
Path inline project.json test
|
||||
TESTASSETS/ReportONEmISSINGdEPENDENCY.tXT
|
||||
Path inline TestAssets/InvalidAssetIdNoReport.txt test
|
||||
Path after=textures/_dev_Purple.tif equal sign
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
File extensions are separated from file names, so the missing dependency scanner doesn't find when scanning, and only finds the asset IDs in this file.
|
||||
|
||||
/textures /_dev_Purple . tif, the product ID is for one of the mips.
|
||||
{A2482826-053D-5634-A27B-084B1326AAE5}:[1002]
|
||||
_dev_Red . tif, another mip, different formatting.
|
||||
2ef92b8D044E5C278E2BB1AC0374A4E7:1003
|
||||
2ef92b8D044E5C278E2BB1AC0374A4E7:1000
|
||||
_dev_White.tif, {D83B36F1-61A6-5001-B191-4D0CE282E236}-1002 asset ID inline.
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
Paths are broken up to avoid having them show up as relative path results.
|
||||
All references are to other text files in this folder, extensions are omitted to make sure only UUID scanning finds these references.
|
||||
|
||||
This is the UUID for Materials / Default / AM_UV_v1_1K_source . png
|
||||
C67BEA9F-09FF-59AA-A7F0-A52B8F987508
|
||||
This is the UUID for libs / particles / milestone2particles . xml. This tests UUIDs without separators.
|
||||
6BDE282B49C957F7B0714B26579BCA9A
|
||||
This is the UUID for SelfReferenceUUID.txt. This tests UUIDs with mixed casing.
|
||||
This is the UUID for InvalidAssetIdNoReport
|
||||
E68A85B0-131D-5A82-B2D5-BC58EE4062AE
|
||||
This is the UUID for InvalidRelativePathsNoReport. This tests UUIDs without separators.
|
||||
B3EF12DD306C520EB0A8A6B0D031A195
|
||||
This is the UUID for SelfReferenceUUID. This tests UUIDs with mixed casing.
|
||||
33bcee02F3225688ABEE534F6058593F
|
||||
This is a UUID mid-line B076CDDC-14DF-50F4-A5E9-7518ABB3E851, for project . json
|
||||
This is a UUID mid-line DD587FBE-16C8-5B98-AE3C-A9F8750B2692, for SelfReferencePath
|
||||
|
||||
Two UUIDs on the same line
|
||||
Two UUIDs 345E5C660D6254FF8D0F7C8EE66A2249 mixed on A26C73D1837E5AE59E68F916FA7C3699 the same line
|
||||
InvalidUUIDNoReport and MaxIteration31Deep
|
||||
Two UUIDs 837412DF-D05F-576D-81AA-ACF360463749 mixed on 3F642A0FDC825696A70A1DA5709744DF the same line
|
||||
|
||||
Test UUIDs and Asset IDs mixed on the same line. Relative paths are handled in the relative path tests.
|
||||
UUID: slices / MuzzleFlash . slice, AssetID: TestsAssets / WildcardScanTest1 . txt
|
||||
This 747D31D71E62553592226173C49CF97E uuid is on the line with 1CB10C43F3245B93A294C602ADEF95F9:[0] a valid asset ID
|
||||
UUID: Objects / Lumbertank_turret . cgf, AssetID: TestsAssets / WildcardScanTest2 . txt
|
||||
This D92C4661C8985E19BD3597CB2318CFA6:[0] uuid is on the line with 37108522F50459499CD6C8D47A960CF1 a valid asset ID
|
||||
OnlyMatchesCorrectLengthUUIDs and WildcardScanTest1
|
||||
This 2545AD8B-1B9B-5F93-859D-D8DC1DC2B480 uuid is on the line with 1CB10C43F3245B93A294C602ADEF95F9:[0] a valid asset ID
|
||||
RelativeProductPathsNotDependencies and WildcardScanTest2
|
||||
This B772953CA08A5D209491530E87D11504:[0] uuid is on the line with D92C4661C8985E19BD3597CB2318CFA6 a valid asset ID
|
||||
|
||||
Reference in New Issue
Block a user