Changeset 28f4adb in mainline for tools/checkers
- Timestamp:
- 2010-11-02T11:13:36Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4687a26c, e06ef614
- Parents:
- 458619f7
- git-author:
- Vojtech Horky <> (2010-11-02 11:13:36)
- git-committer:
- Martin Decky <martin@…> (2010-11-02 11:13:36)
- Location:
- tools/checkers
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/checkers/clang.py
r458619f7 r28f4adb 42 42 def usage(prname): 43 43 "Print usage syntax" 44 print prname + " <ROOT>"44 print(prname + " <ROOT>") 45 45 46 46 def clang(root, job): … … 50 50 51 51 if (not os.path.isfile(inname)): 52 print "Unable to open %s" % inname53 print "Did you run \"make precheck\" on the source tree?"52 print("Unable to open %s" % inname) 53 print("Did you run \"make precheck\" on the source tree?") 54 54 return False 55 55 56 inf = file(inname, "r")56 inf = open(inname, "r") 57 57 records = inf.read().splitlines() 58 58 inf.close() … … 64 64 65 65 if (len(arg) < 6): 66 print "Not enought jobfile record arguments"66 print("Not enought jobfile record arguments") 67 67 return False 68 68 … … 76 76 srcfqname = os.path.join(base, srcfname) 77 77 if (not os.path.isfile(srcfqname)): 78 print "Source %s not found" % srcfqname78 print("Source %s not found" % srcfqname) 79 79 return False 80 80 … … 108 108 109 109 if (not os.path.isfile(config)): 110 print "%s not found." % config111 print "Please specify the path to HelenOS build tree root as the first argument."110 print("%s not found." % config) 111 print("Please specify the path to HelenOS build tree root as the first argument.") 112 112 return 113 113 … … 115 115 if (not clang(rootdir, job)): 116 116 print 117 print "Failed job: %s" % job117 print("Failed job: %s" % job) 118 118 return 119 119 120 120 print 121 print "All jobs passed"121 print("All jobs passed") 122 122 123 123 if __name__ == '__main__': -
tools/checkers/jobfile.py
r458619f7 r28f4adb 54 54 nil = True 55 55 else: 56 print "Unexpected '%s'" % record[i]56 print("Unexpected '%s'" % record[i]) 57 57 return False 58 58 -
tools/checkers/stanse.py
r458619f7 r28f4adb 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 enought jobfile record arguments") 72 72 return False 73 73 … … 81 81 srcfqname = os.path.join(base, srcfname) 82 82 if (not os.path.isfile(srcfqname)): 83 print "Source %s not found" % srcfqname83 print("Source %s not found" % srcfqname) 84 84 return False 85 85 … … 90 90 output.append([srcfname, tgtfname, base, options]) 91 91 92 outf = file(outname, "w")92 outf = open(outname, "w") 93 93 for record in output: 94 94 outf.write("{%s},{%s},{%s},{%s}\n" % (record[0], record[1], record[2], record[3])) … … 121 121 122 122 if (not os.path.isfile(config)): 123 print "%s not found." % config124 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.") 125 125 return 126 126 … … 128 128 if (not stanse(rootdir, job)): 129 129 print 130 print "Failed job: %s" % job130 print("Failed job: %s" % job) 131 131 return 132 132 133 133 print 134 print "All jobs passed"134 print("All jobs passed") 135 135 136 136 if __name__ == '__main__': -
tools/checkers/vcc.py
r458619f7 r28f4adb 49 49 def usage(prname): 50 50 "Print usage syntax" 51 print prname + " <ROOT> [VCC_PATH]"51 print(prname + " <ROOT> [VCC_PATH]") 52 52 53 53 def cygpath(upath): … … 72 72 preproc = subprocess.Popen(args, stdout = subprocess.PIPE).communicate()[0] 73 73 74 tmpf = file(tmpfname, "w")74 tmpf = open(tmpfname, "w") 75 75 tmpf.write(specification) 76 76 … … 108 108 109 109 if (not os.path.isfile(inname)): 110 print "Unable to open %s" % inname111 print "Did you run \"make precheck\" on the source tree?"110 print("Unable to open %s" % inname) 111 print("Did you run \"make precheck\" on the source tree?") 112 112 return False 113 113 114 inf = file(inname, "r")114 inf = open(inname, "r") 115 115 records = inf.read().splitlines() 116 116 inf.close() … … 122 122 123 123 if (len(arg) < 6): 124 print "Not enought jobfile record arguments"124 print("Not enought jobfile record arguments") 125 125 return False 126 126 … … 134 134 srcfqname = os.path.join(base, srcfname) 135 135 if (not os.path.isfile(srcfqname)): 136 print "Source %s not found" % srcfqname136 print("Source %s not found" % srcfqname) 137 137 return False 138 138 … … 153 153 154 154 # Run Vcc 155 print " -- %s --" % srcfname155 print(" -- %s --" % srcfname) 156 156 retval = subprocess.Popen([vcc_path, '/pointersize:32', '/newsyntax', cygpath(tmpfqname)]).wait() 157 157 … … 182 182 183 183 if (not os.path.isfile(vcc_path)): 184 print "%s is not a binary." % vcc_path185 print "Please supply the full Cygwin path to Vcc as the second argument."184 print("%s is not a binary." % vcc_path) 185 print("Please supply the full Cygwin path to Vcc as the second argument.") 186 186 return 187 187 … … 189 189 190 190 if (not os.path.isfile(config)): 191 print "%s not found." % config192 print "Please specify the path to HelenOS build tree root as the first argument."191 print("%s not found." % config) 192 print("Please specify the path to HelenOS build tree root as the first argument.") 193 193 return 194 194 195 195 specpath = os.path.join(rootdir, "tools/checkers/vcc.h") 196 196 if (not os.path.isfile(specpath)): 197 print "%s not found." % config197 print("%s not found." % config) 198 198 return 199 199 … … 205 205 if (not vcc(vcc_path, rootdir, job)): 206 206 print 207 print "Failed job: %s" % job207 print("Failed job: %s" % job) 208 208 return 209 209 210 210 print 211 print "All jobs passed"211 print("All jobs passed") 212 212 213 213 if __name__ == '__main__':
Note:
See TracChangeset
for help on using the changeset viewer.