Merge pull request #3182 from Sonicadvance1/instcountci_stacking_test_names

InstCountCI: Fixes recursive tests with same filename
This commit is contained in:
Ryan Houdek authored and GitHub committed 2023-10-07 21:21:10 -07:00
commit 9c36d1061b
2 files changed
+6 -5

No files matched your search

+3 -3
View File
@@ -73,7 +73,7 @@ def GetHostFeatures(data):
HostFeaturesData |= HostFeaturesLookup[data_key]
return HostFeaturesData
def parse_json_data(json_filename, json_data, output_binary_path):
def parse_json_data(json_filepath, json_filename, json_data, output_binary_path):
Bitness = 64
EnabledHostFeatures = HostFeatures.FEATURE_ANY
DisabledHostFeatures = HostFeatures.FEATURE_ANY
@@ -112,7 +112,7 @@ def parse_json_data(json_filename, json_data, output_binary_path):
if items["Skip"].upper() == "YES":
continue
TestName = base64.b64encode("{}.{}".format(json_filename, key).encode("ascii")).decode("ascii")
TestName = base64.b64encode("{}.{}.{}".format(str(hash(json_filepath)), json_filename, key).encode("ascii")).decode("ascii")
tmp_asm = "/tmp/{}.asm".format(TestName)
tmp_asm_out = "/tmp/{}.asm.o".format(TestName)
logging.info("'{}' -> '{}' -> '{}'".format(key, tmp_asm, tmp_asm_out))
@@ -219,7 +219,7 @@ def main():
if not isinstance(json_data, dict):
raise TypeError('JSON data must be a dict')
return parse_json_data(os.path.basename(json_path), json_data, output_binary_path)
return parse_json_data(json_path, os.path.basename(json_path), json_data, output_binary_path)
except ValueError as ve:
logging.error(f'JSON error: {ve}')