Changes in tools/checkers/stanse.py [6064dab:f4057f5] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/checkers/stanse.py
r6064dab rf4057f5 43 43 def usage(prname): 44 44 "Print usage syntax" 45 print prname + " <ROOT>"45 print(prname + " <ROOT>") 46 46 47 47 def stanse(root, job): … … 54 54 55 55 if (not os.path.isfile(inname)): 56 print "Unable to open %s" % inname57 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?") 58 58 return False 59 59 60 inf = file(inname, "r")60 inf = open(inname, "r") 61 61 records = inf.read().splitlines() 62 62 inf.close() … … 69 69 70 70 if (len(arg) < 6): 71 print "Not enought jobfile record arguments"71 print("Not enough jobfile record arguments") 72 72 return False 73 73 74 74 srcfname = arg[0] 75 75 tgtfname = arg[1] 76 tool = arg[2] 77 category = arg[3] 76 78 base = arg[4] 77 79 options = arg[5] … … 79 81 srcfqname = os.path.join(base, srcfname) 80 82 if (not os.path.isfile(srcfqname)): 81 print "Source %s not found" % srcfqname83 print("Source %s not found" % srcfqname) 82 84 return False 83 85 84 86 # Only C files are interesting for us 85 if ( arg[2]!= "cc"):87 if (tool != "cc"): 86 88 continue 87 89 88 90 output.append([srcfname, tgtfname, base, options]) 89 91 90 outf = file(outname, "w")92 outf = open(outname, "w") 91 93 for record in output: 92 94 outf.write("{%s},{%s},{%s},{%s}\n" % (record[0], record[1], record[2], record[3])) … … 119 121 120 122 if (not os.path.isfile(config)): 121 print "%s not found." % config122 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.") 123 125 return 124 126 … … 126 128 if (not stanse(rootdir, job)): 127 129 print 128 print "Failed job: %s" % job130 print("Failed job: %s" % job) 129 131 return 130 132 131 133 print 132 print "All jobs passed"134 print("All jobs passed") 133 135 134 136 if __name__ == '__main__':
Note:
See TracChangeset
for help on using the changeset viewer.