def main():
    """
    Test Execution
    Generating Results
    """
    usage = "Usage: python suite_run.py <'aci' or 'upstream'>"
    try:
        flag = sys.argv[1]
    except Exception:
        print ('%s' % (usage))
        sys.exit(1)
    fname = run_func_neg()
    num_lines = sum(1 for line in open(fname))
    print ("\nNumber of Functional Test Scripts to execute = %s" % (num_lines))
    with open(fname) as f:
        for i, l in enumerate(f, 1):
            print ("Functional Test Script to execute now == %s" % l)
            # Assumption: test-scripts are executable from any location
            # Reading the line from text file, also reads trailing \n, hence we
            # need to strip
            cmd = (l.strip(), flag) % 'python %s %s'
            print (cmd)
            # out=getoutput(cmd)
            subprocess.call(cmd, shell=True)
    f = open("test_results.txt")
    contents = f.read()
    f.close()
    print (contents)
    print ("\n\nTotal Number of TestCases Executed= %s" % (
        contents.count("TESTCASE_GBP_")))
    print ("\n\nNumber of TestCases Passed= %s" % (contents.count("PASSED")))
    print ("\n\nNumber of TestCases Failed= %s" % (contents.count("FAILED")))
    if contents.count("FAILED") > 0:
        sys.exit(1)
    else:
        return 0
dataset/ETHPy150Open openstack/group-based-policy/gbpservice/tests/contrib/gbpfunctests/testcases/suite_non_admin_run.py/main/swapped operands of `%`