Commit 47baf50e authored by canterburym's avatar canterburym
Browse files

Tidying up

parent 3360d464
Loading
Loading
Loading
Loading
Loading

testing/asn_compile_results.json

deleted100644 → 0
+0 −1
Original line number Diff line number Diff line
{"errorCount": 0, "results": {"./33128/r15/TS33128Payloads.asn": {"ok": true}, "./33128/r16/TS33128Payloads.asn": {"ok": true}, "./33128/r16/TS33128IdentityAssociation.asn": {"ok": true}, "./33128/r17/TS33128Payloads.asn": {"ok": true}, "./33128/r17/TS33128IdentityAssociation.asn": {"ok": true}, "./testing/mod1.asn": {"ok": true}}}
 No newline at end of file

testing/asn_lint_results.json

deleted100644 → 0
+0 −157
Original line number Diff line number Diff line
{
    "33128\\r15\\TS33128Payloads.asn": [
        {
            "file": "33128\\r15\\TS33128Payloads.asn",
            "module": "TS33128Payloads",
            "type": "UDMServingSystemMethod",
            "message": "Enumerations for UDMServingSystemMethod start at 0, not 1",
            "testName": "D.4.4",
            "testKind": "type",
            "testDescription": "Enumerations start at zero"
        },
        {
            "file": "33128\\r15\\TS33128Payloads.asn",
            "module": "TS33128Payloads",
            "type": "GlobalRANNodeID",
            "field": "aNNodeID",
            "message": "Field 'aNNodeID' in GlobalRANNodeID is an anonymous CHOICE",
            "testName": "D.4.5",
            "testKind": "type",
            "testDescription": "No anonymous types"
        }
    ],
    "33128\\r16\\TS33128IdentityAssociation.asn": [],
    "33128\\r16\\TS33128Payloads.asn": [
        {
            "file": "33128\\r16\\TS33128Payloads.asn",
            "module": "TS33128Payloads",
            "type": "EstablishmentStatus",
            "message": "Enumerations for EstablishmentStatus start at 0, not 1",
            "testName": "D.4.4",
            "testKind": "type",
            "testDescription": "Enumerations start at zero"
        },
        {
            "file": "33128\\r16\\TS33128Payloads.asn",
            "module": "TS33128Payloads",
            "type": "RequestIndication",
            "message": "Enumerations for RequestIndication start at 0, not 1",
            "testName": "D.4.4",
            "testKind": "type",
            "testDescription": "Enumerations start at zero"
        },
        {
            "file": "33128\\r16\\TS33128Payloads.asn",
            "module": "TS33128Payloads",
            "type": "UDMServingSystemMethod",
            "message": "Enumerations for UDMServingSystemMethod start at 0, not 1",
            "testName": "D.4.4",
            "testKind": "type",
            "testDescription": "Enumerations start at zero"
        },
        {
            "file": "33128\\r16\\TS33128Payloads.asn",
            "module": "TS33128Payloads",
            "type": "MMSDirection",
            "message": "Enumerations for MMSDirection start at 0, not 1",
            "testName": "D.4.4",
            "testKind": "type",
            "testDescription": "Enumerations start at zero"
        },
        {
            "file": "33128\\r16\\TS33128Payloads.asn",
            "module": "TS33128Payloads",
            "type": "MMSReplyCharging",
            "message": "Enumerations for MMSReplyCharging start at 0, not 1",
            "testName": "D.4.4",
            "testKind": "type",
            "testDescription": "Enumerations start at zero"
        },
        {
            "file": "33128\\r16\\TS33128Payloads.asn",
            "module": "TS33128Payloads",
            "type": "MMStatusExtension",
            "message": "Enumerations for MMStatusExtension start at 0, not 1",
            "testName": "D.4.4",
            "testKind": "type",
            "testDescription": "Enumerations start at zero"
        }
    ],
    "33128\\r17\\TS33128IdentityAssociation.asn": [],
    "33128\\r17\\TS33128Payloads.asn": [
        {
            "file": "33128\\r17\\TS33128Payloads.asn",
            "module": "TS33128Payloads",
            "type": "EstablishmentStatus",
            "message": "Enumerations for EstablishmentStatus start at 0, not 1",
            "testName": "D.4.4",
            "testKind": "type",
            "testDescription": "Enumerations start at zero"
        },
        {
            "file": "33128\\r17\\TS33128Payloads.asn",
            "module": "TS33128Payloads",
            "type": "RequestIndication",
            "message": "Enumerations for RequestIndication start at 0, not 1",
            "testName": "D.4.4",
            "testKind": "type",
            "testDescription": "Enumerations start at zero"
        },
        {
            "file": "33128\\r17\\TS33128Payloads.asn",
            "module": "TS33128Payloads",
            "type": "UDMServingSystemMethod",
            "message": "Enumerations for UDMServingSystemMethod start at 0, not 1",
            "testName": "D.4.4",
            "testKind": "type",
            "testDescription": "Enumerations start at zero"
        },
        {
            "file": "33128\\r17\\TS33128Payloads.asn",
            "module": "TS33128Payloads",
            "type": "MMSDirection",
            "message": "Enumerations for MMSDirection start at 0, not 1",
            "testName": "D.4.4",
            "testKind": "type",
            "testDescription": "Enumerations start at zero"
        },
        {
            "file": "33128\\r17\\TS33128Payloads.asn",
            "module": "TS33128Payloads",
            "type": "MMSReplyCharging",
            "message": "Enumerations for MMSReplyCharging start at 0, not 1",
            "testName": "D.4.4",
            "testKind": "type",
            "testDescription": "Enumerations start at zero"
        },
        {
            "file": "33128\\r17\\TS33128Payloads.asn",
            "module": "TS33128Payloads",
            "type": "MMStatusExtension",
            "message": "Enumerations for MMStatusExtension start at 0, not 1",
            "testName": "D.4.4",
            "testKind": "type",
            "testDescription": "Enumerations start at zero"
        }
    ],
    "testing\\mod1.asn": [
        {
            "file": "testing\\mod1.asn",
            "module": "Mod1",
            "message": "EXTENSIBILITY IMPLIED directive not set",
            "testName": "D.4.1",
            "testKind": "module",
            "testDescription": "EXTENSIBILITY IMPLIED directive set"
        }
    ],
    "testing\\mod2.asn": [
        {
            "file": "testing\\mod2.asn",
            "module": "Mod2",
            "message": "EXTENSIBILITY IMPLIED directive not set",
            "testName": "D.4.1",
            "testKind": "module",
            "testDescription": "EXTENSIBILITY IMPLIED directive set"
        }
    ]
}
 No newline at end of file

testing/asn_parse_results.json

deleted100644 → 0
+0 −1
Original line number Diff line number Diff line
{"errorCount": 1, "results": {"33128\\r15\\TS33128Payloads.asn": {"ok": true}, "33128\\r16\\TS33128IdentityAssociation.asn": {"ok": true}, "33128\\r16\\TS33128Payloads.asn": {"ok": true}, "33128\\r17\\TS33128IdentityAssociation.asn": {"ok": true}, "33128\\r17\\TS33128Payloads.asn": {"ok": true}, "testing\\mod1.asn": {"ok": true}, "testing\\mod2.asn": {"ok": false, "code": 65, "msg": "ASN.1 grammar parse error near line 10 (token \"this\"): syntax error, unexpected TOK_identifier, expecting '}'"}, "testing\\dependencies\\asn\\HI2Operations,ver18.asn": {"ok": true}, "testing\\dependencies\\asn\\101909\\PCESP.asn": {"ok": true}, "testing\\dependencies\\asn\\101909\\TS101909201.asn": {"ok": true}, "testing\\dependencies\\asn\\301040\\06132v203_C01.asn": {"ok": true}}}
 No newline at end of file
+15 −15
Original line number Diff line number Diff line
@@ -137,22 +137,22 @@ if __name__ == '__main__':
    for file in fileList:
        logging.debug(f'  {file}')

    # if len(fileList) == 0:
    #     logging.warning ("No files specified")
    #     exit(0)
    
    # logging.info("Parsing ASN1 files")
    # parseResults = syntaxCheckASN(fileList)
    # if processResults(parseResults, "Parsing") > 0:
    #     exit(-1)

    # logging.info ("Getting compile targets")
    # compileTargets = json.loads(Path('testing/asn_compile_targets.json').read_text())
    # logging.info (f"{len(compileTargets)} compile targets found")

    # compileResults = compileAllTargets(compileTargets)
    # if processResults(compileResults, "Compiling") > 0:
    #     exit(-1)
    if len(fileList) == 0:
        logging.warning ("No files specified")
        exit(0)
    
    logging.info("Parsing ASN1 files")
    parseResults = syntaxCheckASN(fileList)
    if processResults(parseResults, "Parsing") > 0:
        exit(-1)

    logging.info ("Getting compile targets")
    compileTargets = json.loads(Path('testing/asn_compile_targets.json').read_text())
    logging.info (f"{len(compileTargets)} compile targets found")

    compileResults = compileAllTargets(compileTargets)
    if processResults(compileResults, "Compiling") > 0:
        exit(-1)

    logging.info ("Linting files")
    ignoreLintingList = Path('testing/asn_ignore_lint.txt').read_text().splitlines()

testing/mod1.asn

deleted100644 → 0
+0 −19
Original line number Diff line number Diff line
Mod1 {itu-t(0) identified-organization(4) etsi(0)}

DEFINITIONS ::=

BEGIN

IMPORTS

    ImportedField
    FROM Mod2 {itu-t(0) identified-organization(4) etsi(1)};

TestPDU ::= SEQUENCE
{
    field1 [1] ImportedField
}

ClashField ::= BOOLEAN

END
 No newline at end of file
Loading