Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/checkers/stanse.py

    r6064dab rf4057f5  
    4343def usage(prname):
    4444        "Print usage syntax"
    45         print prname + " <ROOT>"
     45        print(prname + " <ROOT>")
    4646
    4747def stanse(root, job):
     
    5454       
    5555        if (not os.path.isfile(inname)):
    56                 print "Unable to open %s" % inname
    57                 print "Did you run \"make precheck\" on the source tree?"
     56                print("Unable to open %s" % inname)
     57                print("Did you run \"make precheck\" on the source tree?")
    5858                return False
    5959       
    60         inf = file(inname, "r")
     60        inf = open(inname, "r")
    6161        records = inf.read().splitlines()
    6262        inf.close()
     
    6969               
    7070                if (len(arg) < 6):
    71                         print "Not enought jobfile record arguments"
     71                        print("Not enough jobfile record arguments")
    7272                        return False
    7373               
    7474                srcfname = arg[0]
    7575                tgtfname = arg[1]
     76                tool = arg[2]
     77                category = arg[3]
    7678                base = arg[4]
    7779                options = arg[5]
     
    7981                srcfqname = os.path.join(base, srcfname)
    8082                if (not os.path.isfile(srcfqname)):
    81                         print "Source %s not found" % srcfqname
     83                        print("Source %s not found" % srcfqname)
    8284                        return False
    8385               
    8486                # Only C files are interesting for us
    85                 if (arg[2] != "cc"):
     87                if (tool != "cc"):
    8688                        continue
    8789               
    8890                output.append([srcfname, tgtfname, base, options])
    8991       
    90         outf = file(outname, "w")
     92        outf = open(outname, "w")
    9193        for record in output:
    9294                outf.write("{%s},{%s},{%s},{%s}\n" % (record[0], record[1], record[2], record[3]))
     
    119121       
    120122        if (not os.path.isfile(config)):
    121                 print "%s not found." % config
    122                 print "Please specify the path to HelenOS build tree root as the first argument."
     123                print("%s not found." % config)
     124                print("Please specify the path to HelenOS build tree root as the first argument.")
    123125                return
    124126       
     
    126128                if (not stanse(rootdir, job)):
    127129                        print
    128                         print "Failed job: %s" % job
     130                        print("Failed job: %s" % job)
    129131                        return
    130132       
    131133        print
    132         print "All jobs passed"
     134        print("All jobs passed")
    133135
    134136if __name__ == '__main__':
Note: See TracChangeset for help on using the changeset viewer.