Esempio n. 1
0
def FullXINDEX(testclient, outputDir, routinelist):
    resultsfolder = os.path.join(outputDir, "XINDEXResults")
    try:
        os.mkdir(resultsfolder)
    except:
        pass
    logpath = os.path.join(resultsfolder, "XINDEXAllRoutines")
    testclient.setLogFile(logpath + ".log")
    connection = testclient.getConnection()
    connection.send("D ^XINDEX\r")
    if testclient.isCache():
        connection.expect("All Routines")
        connection.send("N\r")
    for routine in routinelist:
        connection.expect("Routine")
        connection.send(routine + "\r")
    connection.expect("Routine")
    connection.send("\r")
    connection.expect("BUILD NAME")
    connection.send("\r")
    connection.expect("INSTALL NAME")
    connection.send("\r")
    connection.expect("PACKAGE NAME")
    connection.send("\r")
    index = connection.expect([
        "Print more than compiled errors and warnings",
        testclient.getPrompt()
    ])
    if index == 0:
        connection.send("\r")
        connection.expect("Print summary only")
        connection.send("\r")
        connection.expect("Print routines")
        connection.send("No\r")
        connection.expect("Print errors and warnings with each routine")
        connection.send("\r")
        connection.expect("Index all called routines")
        connection.send("N\r")
        connection.expect("DEVICE")
        connection.send(';;9999\r')
        if testclient.isCache():
            connection.expect('Right Margin:')
            connection.send('\r')
        connection.send('\r')
        connection.expect('continue:', 1200)
        connection.send('\r')
        connection.expect('--- END ---', 12000)
        XINDEXParser(resultsfolder, "XINDEXAllRoutines")
    else:
        print("No Routines were found prior to patch")
        connection.send('\r')
Esempio n. 2
0
def XINDEXbyBuildname(testclient, installname, outputDir):
    resultsfolder = os.path.join(outputDir, "XINDEXResults")
    try:
        os.mkdir(resultsfolder)
    except:
        pass
    logpath = os.path.join(resultsfolder, installNameToDirName(installname))
    testclient.setLogFile(logpath + ".log")
    connection = testclient.getConnection()
    connection.send("D ^XINDEX\r")
    if testclient.isCache():
        connection.expect("All Routines")
        connection.send("N\r")
    connection.expect("Routine")
    connection.send("\r")
    connection.expect("BUILD NAME")
    connection.send(installname + "\r")
    connection.expect("Include the compiled template routines")
    connection.send("N\r")
    connection.expect("Print more than compiled errors and warnings")
    connection.send("\r")
    connection.expect("Print summary only")
    connection.send("\r")
    connection.expect("Print routines")
    connection.send("No\r")
    connection.expect("Print the DDs, Functions, and Options")
    connection.send("\r")
    connection.expect("Print errors and warnings with each routine")
    connection.send("\r")
    connection.expect("Save parameters in ROUTINE file")
    connection.send("\r")
    connection.expect("Index all called routines")
    connection.send("N\r")
    connection.expect("DEVICE")
    connection.send(';;9999\r')
    if testclient.isCache():
        connection.expect('Right Margin:')
        connection.send('\r')
    connection.send('\r')
    connection.expect('continue:')
    connection.send('\r')
    connection.expect('--- END ---', 120)
    XINDEXParser(resultsfolder, installname)