- Timestamp:
- 2013-07-25 16:35:17 (10 years ago)
- Location:
- 2013/30
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
2013/30/build_games.py
r4506 r4685 24 24 personal_dirs = [d for d in os.listdir(".") if isdir(d) and d not in ("lib", basename(output_dir), ".svn")] 25 25 projects_that_did_not_build = [] 26 users_that_did_not_build = [] 26 27 msbuild = "msbuild" 27 28 … … 66 67 for d in personal_dirs: 67 68 path = abspath(d) 68 69 time = datetime(2000, 1, 1) 69 70 if should_write_results and exists(join(path, ".svn")): 70 71 call("svn update " + path, shell=True) 71 72 outputs = Popen("svn info " + path, stdout=PIPE).communicate() 72 73 time = parse_last_changed_date(outputs[0]) 73 build_games_in_personal_dir(path, time) 74 try: 75 build_games_in_personal_dir(path, time) 76 except Exception, e: 77 print 78 print "NOT SUCCESSFUL FOR USER ", d, ": ", e 79 users_that_did_not_build.append(d) 74 80 75 81 … … 111 117 print "NOTE: There is more than one project file in", root 112 118 113 project_name = splitext(basename(projects[0]))[0] 114 author = basename(personal_dir) 119 try: 120 project_name = splitext(basename(projects[0]))[0] 121 author = basename(personal_dir) 115 122 116 success = build(projects[0])123 success = build(projects[0]) 117 124 118 if should_write_results:119 write_result(author, project_name, success, last_changed_date)125 if should_write_results: 126 write_result(author, project_name, success, last_changed_date) 120 127 121 if success: 122 dst_dir = join(output_dir, author) 123 copy_game(project_name, root, dst_dir) 124 print author + ": " + project_name 125 else: 128 if success: 129 dst_dir = join(output_dir, author) 130 copy_game(project_name, root, dst_dir) 131 print author + ": " + project_name 132 else: 133 projects_that_did_not_build.append(projects[0]) 134 except Exception, e: 135 print 136 print "PROJECT CAUSED EXCEPTION:", project_name, " :", e 126 137 projects_that_did_not_build.append(projects[0]) 127 138 … … 165 176 return 1 166 177 178 print 'Build failed for users (%d):' % len(users_that_did_not_build) 179 for p in users_that_did_not_build: 180 print p 181 167 182 print 168 print ' Projects that did not build(%d):' % len(projects_that_did_not_build)183 print 'Build failed for projects (%d):' % len(projects_that_did_not_build) 169 184 for p in projects_that_did_not_build: 170 185 print p -
2013/30/write_report.py
r4506 r4685 97 97 98 98 def write_results(): 99 results = [] 100 99 101 for d in os.listdir("build"): 100 102 with open(join("build", d), "r") as f: … … 104 106 result = lines[2].strip() 105 107 time_of_update = lines[3].strip() 106 107 108 if hide_pong_games and re.search("pong", name, flags=re.IGNORECASE): 108 109 continue 109 110 110 111 success = (result == "success") 112 rtuple = (author, name, result, time_of_update, success) 113 results.append(rtuple) 111 114 112 style = "success" 113 if not success: 114 style = "fail" 115 tr = addElement(table, "tr") 116 tr.setAttribute("class", style) 117 addTextElement(tr, "td", author) 118 addTextElement(tr, "td", name) 119 timeElement = addTextElement(tr, "td", time_of_update) 120 timeElement.setAttribute("class", "datetime") 115 results.sort() 121 116 117 for r in results: 118 style = "success" 119 if not r[4]: 120 style = "fail" 121 tr = addElement(table, "tr") 122 tr.setAttribute("class", style) 123 addTextElement(tr, "td", r[0]) 124 addTextElement(tr, "td", r[1]) 125 timeElement = addTextElement(tr, "td", r[3]) 126 timeElement.setAttribute("class", "datetime") 122 127 123 128 def write_report():
Note: See TracChangeset
for help on using the changeset viewer.