{SPEC-6465} DeltaCatalog.xml does not contain value (#935)

* fixes for Asset Bundler Periodic test
main
sharmajs-amzn 5 years ago committed by GitHub
parent 1369e29c73
commit 19dc993331
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

File diff suppressed because it is too large Load Diff

@ -162,7 +162,7 @@ def bundler_batch_setup_fixture(request, workspace, asset_processor, timeout) ->
else: else:
cmd.append(f"--{key}") cmd.append(f"--{key}")
if append_defaults: if append_defaults:
cmd.append(f"--project={workspace.project}") cmd.append(f"--project-path={workspace.project}")
return cmd return cmd
# ****** # ******
@ -300,9 +300,9 @@ def bundler_batch_setup_fixture(request, workspace, asset_processor, timeout) ->
workspace.paths.engine_root(), workspace.paths.engine_root(),
"Code", "Code",
"Framework", "Framework",
"AzFramework", "AzCore",
"AzFramework", "AzCore",
"Platform", "PlatformId",
"PlatformDefaults.h", "PlatformDefaults.h",
) )
@ -318,7 +318,7 @@ def bundler_batch_setup_fixture(request, workspace, asset_processor, timeout) ->
if start_gathering: if start_gathering:
result = get_platform.match(line) # Try the regex result = get_platform.match(line) # Try the regex
if result: if result:
platform_values[result.group(1).lower()] = counter platform_values[result.group(1).replace("_ID", "").lower()] = counter
counter = counter << 1 counter = counter << 1
elif "(Invalid, -1)" in line: # The line right before the first platform elif "(Invalid, -1)" in line: # The line right before the first platform
start_gathering = True start_gathering = True

@ -302,7 +302,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
that generating debug information does not affect asset list creation that generating debug information does not affect asset list creation
""" """
helper = bundler_batch_helper helper = bundler_batch_helper
seed_list = os.path.join(workspace.paths.engine_root(), "Engine", "SeedAssetList.seed") # Engine seed list seed_list = os.path.join(workspace.paths.engine_root(), "Assets", "Engine", "SeedAssetList.seed") # Engine seed list
asset = r"levels\testdependencieslevel\level.pak" asset = r"levels\testdependencieslevel\level.pak"
# Create Asset list # Create Asset list
@ -377,7 +377,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
subcommands. subcommands.
""" """
helper = bundler_batch_helper helper = bundler_batch_helper
seed_list = os.path.join(workspace.paths.engine_root(), "Engine", "SeedAssetList.seed") # Engine seed list seed_list = os.path.join(workspace.paths.engine_root(), "Assets", "Engine", "SeedAssetList.seed") # Engine seed list
asset = r"levels\testdependencieslevel\level.pak" asset = r"levels\testdependencieslevel\level.pak"
# Useful bundle locations / names (2 for comparing contents) # Useful bundle locations / names (2 for comparing contents)
@ -465,7 +465,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
"Please rerun with commandline option: '--bundle_platforms=pc,mac'" "Please rerun with commandline option: '--bundle_platforms=pc,mac'"
# fmt:on # fmt:on
seed_list = os.path.join(workspace.paths.engine_root(), "Engine", "SeedAssetList.seed") # Engine seed list seed_list = os.path.join(workspace.paths.engine_root(), "Assets", "Engine", "SeedAssetList.seed") # Engine seed list
# Useful bundle / asset list locations # Useful bundle / asset list locations
bundle_dir = os.path.dirname(helper["bundle_file"]) bundle_dir = os.path.dirname(helper["bundle_file"])
@ -502,13 +502,13 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
for bundle_file in bundle_files.values(): for bundle_file in bundle_files.values():
assert os.path.isfile(bundle_file) assert os.path.isfile(bundle_file)
# This asset is created on mac platform but not on windows # This asset is created both on mac and windows platform
file_to_check = b"engineassets/shading/defaultprobe_cm.dds.5" # [use byte str because file is in binary] file_to_check = b"engineassets/shading/defaultprobe_cm_ibldiffuse.tif.streamingimage" # [use byte str because file is in binary]
# Extract the delta catalog file from pc archive. {file_to_check} SHOULD NOT be present for PC # Extract the delta catalog file from pc archive. {file_to_check} SHOULD NOT be present for PC
file_contents = helper.extract_file_content(bundle_files["pc"], "DeltaCatalog.xml") file_contents = helper.extract_file_content(bundle_files["pc"], "DeltaCatalog.xml")
# fmt:off # fmt:off
assert file_to_check not in file_contents, \ assert file_to_check in file_contents, \
f"{file_to_check} was found in DeltaCatalog.xml in pc bundle file {bundle_files['pc']}" f"{file_to_check} was found in DeltaCatalog.xml in pc bundle file {bundle_files['pc']}"
# fmt:on # fmt:on
@ -619,7 +619,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
# Validate both mac and pc are activated for seed # Validate both mac and pc are activated for seed
# fmt:off # fmt:off
check_seed_platform(helper["seed_list_file"], test_asset, check_seed_platform(helper["seed_list_file"], test_asset,
helper["platform_values"]["pc"] + helper["platform_values"]["osx"]) helper["platform_values"]["pc"] + helper["platform_values"]["mac"])
# fmt:on # fmt:on
# Remove MAC platform # Remove MAC platform
@ -651,7 +651,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
# Validate Mac platform was added back on. Save file contents # Validate Mac platform was added back on. Save file contents
# fmt:off # fmt:off
all_lines = check_seed_platform(helper["seed_list_file"], test_asset, all_lines = check_seed_platform(helper["seed_list_file"], test_asset,
helper["platform_values"]["pc"] + helper["platform_values"]["osx"]) helper["platform_values"]["pc"] + helper["platform_values"]["mac"])
# fmt:on # fmt:on
# Try to remove platform without specifying a platform to remove (should fail) # Try to remove platform without specifying a platform to remove (should fail)
@ -1046,7 +1046,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
"--addDefaultSeedListFiles", "--addDefaultSeedListFiles",
"--platform=pc", "--platform=pc",
"--print", "--print",
f"--project={workspace.project}" f"--project-path={workspace.project}"
], ],
universal_newlines=True, universal_newlines=True,
) )
@ -1115,7 +1115,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
bundle_result_path = os.path.join(bundles_folder, bundle_result_path = os.path.join(bundles_folder,
helper.platform_file_name("bundle.pak", workspace.asset_processor_platform)) helper.platform_file_name("bundle.pak", workspace.asset_processor_platform))
bundle_cache_path = os.path.join(workspace.paths.platform_cache(), workspace.project, bundle_cache_path = os.path.join(workspace.paths.platform_cache(),
"Bundles", "Bundles",
helper.platform_file_name("bundle.pak", workspace.asset_processor_platform)) helper.platform_file_name("bundle.pak", workspace.asset_processor_platform))
@ -1156,13 +1156,15 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
# fmt:off # fmt:off
def test_WindowsAndMac_FilesMarkedSkip_FilesAreSkipped(self, workspace, bundler_batch_helper): def test_WindowsAndMac_FilesMarkedSkip_FilesAreSkipped(self, workspace, bundler_batch_helper):
expected_assets = [ expected_assets = [
"libs/particles/milestone2particles.xml", "ui/canvases/lyshineexamples/animation/multiplesequences.uicanvas",
"textures/milestone2/particles/fx_sparkstreak_01.dds" "ui/textures/prefab/button_normal.sprite"
] ]
bundler_batch_helper.call_assetLists( bundler_batch_helper.call_assetLists(
assetListFile=bundler_batch_helper['asset_info_file_request'], assetListFile=bundler_batch_helper['asset_info_file_request'],
addSeed="libs/particles/milestone2particles.xml", addSeed="ui/canvases/lyshineexamples/animation/multiplesequences.uicanvas",
skip="textures/milestone2/particles/fx_launchermuzzlering_01.dds,textures/milestone2/particles/fx_launchermuzzlefront_01.dds" skip="ui/textures/prefab/button_disabled.sprite,ui/scripts/lyshineexamples/animation/multiplesequences.luac,"
"ui/textures/prefab/tooltip_sliced.sprite,ui/scripts/lyshineexamples/unloadthiscanvasbutton.luac,fonts/vera.fontfamily,fonts/vera-italic.font,"
"fonts/vera.font,fonts/vera-bold.font,fonts/vera-bold-italic.font,fonts/vera-italic.ttf,fonts/vera.ttf,fonts/vera-bold.ttf,fonts/vera-bold-italic.ttf"
) )
assert os.path.isfile(bundler_batch_helper["asset_info_file_result"]) assert os.path.isfile(bundler_batch_helper["asset_info_file_result"])
assets_in_list = [] assets_in_list = []

Loading…
Cancel
Save