diff --git a/102232-2/EmailPDU.asn b/102232-2/EmailPDU.asn index c3e0fcb7807781e7f453f431980f17163ae239ea..88c784b034d52ce7cbe51725d91f926522b77631 100644 --- a/102232-2/EmailPDU.asn +++ b/102232-2/EmailPDU.asn @@ -488,8 +488,8 @@ Messaging-Property ::= CHOICE requested-reports [10] Messaging-Property-Requested-Reports, expires [11] GeneralizedTime, message-date [12] GeneralizedTime, - server-octets-sent [13] INTEGER (0..18446744073709551615) OPTIONAL, - client-octets-sent [14] INTEGER (0..18446744073709551615) OPTIONAL + server-octets-sent [13] INTEGER (0..18446744073709551615), + client-octets-sent [14] INTEGER (0..18446744073709551615) } Messaging-Property-Priority ::= ENUMERATED diff --git a/testing/asn_process.py b/testing/asn_process.py index aa0a0a63777202d29ee51587ffdafb760c360560..1775a99860d774ff87650bd10aa5baf9f32fa070 100644 --- a/testing/asn_process.py +++ b/testing/asn_process.py @@ -7,13 +7,14 @@ from re import sub from pycrate_asn1c.asnproc import * def reconstrainInteger (filename): - Path('temp.asn').write_text(Path(filename).read_text().replace("18446744073709551615", "65536")) - return 'temp.asn' + Path(filename + '_bigint_temp.asn').write_text(Path(filename).read_text().replace("18446744073709551615", "65536")) + return filename + '_bigint_temp.asn' filesWithBigInts = [ '102232-1/LI-PS-PDU.asn', '102232-3/IPAccessPDU.asn', - '102232-4/L2AccessPDU.asn' + '102232-4/L2AccessPDU.asn', + '102232-2/EmailPDU.asn' ] def syntaxCheckASN (fileList): @@ -68,6 +69,7 @@ duplicateObjects = { 'ClashField' ] } + def fixDuplicateObjects(filename): stringContent = filename.read_text() for object in duplicateObjects[filename.as_posix()]: @@ -75,8 +77,8 @@ def fixDuplicateObjects(filename): stringContent = stringContent.replace(f'SEQUENCE OF {object}', f'SEQUENCE OF Native{object}') #stringContent = sub(f"]\\w{object}", f"] Native{object}", stringContent) - Path('temp.asn').write_text(stringContent) - return 'temp.asn' + Path(str(filename) + '_temp.asn').write_text(stringContent) + return str(filename) + '_temp.asn' def compileAllTargets (compileTargets): @@ -110,7 +112,7 @@ def compileAllTargets (compileTargets): if pFile.as_posix() in duplicateObjects: tmpFile = Path(fixDuplicateObjects(pFile)) fileTexts.append(tmpFile.read_text()) - #tmpFile.unlink() + tmpFile.unlink() else: fileTexts.append(pFile.read_text()) fileNames.append(filename)