Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Side by Side Diff: client/tests/kvm/scan_results.py

Issue 6124004: Revert "Merge remote branch 'cros/upstream' into autotest-rebase" (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « client/tests/kvm/migration_control.srv ('k') | client/tests/kvm/scripts/allocator.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 """ 2 """
3 Program that parses the autotest results and return a nicely printed final test 3 Program that parses the autotest results and return a nicely printed final test
4 result. 4 result.
5 5
6 @copyright: Red Hat 2008-2009 6 @copyright: Red Hat 2008-2009
7 """ 7 """
8 8
9 def parse_results(text): 9 def parse_results(text):
10 """ 10 """
(...skipping 20 matching lines...) Expand all
31 # Found an END line -- get end time, name and status 31 # Found an END line -- get end time, name and status
32 elif (line.startswith("END") and len(parts) >= 5 and 32 elif (line.startswith("END") and len(parts) >= 5 and
33 parts[3].startswith("timestamp")): 33 parts[3].startswith("timestamp")):
34 end_time = float(parts[3].split("=")[1]) 34 end_time = float(parts[3].split("=")[1])
35 start_time = start_time_list.pop() 35 start_time = start_time_list.pop()
36 info = info_list.pop() 36 info = info_list.pop()
37 test_name = parts[2] 37 test_name = parts[2]
38 test_status = parts[0].split()[1] 38 test_status = parts[0].split()[1]
39 # Remove "kvm." prefix 39 # Remove "kvm." prefix
40 if test_name.startswith("kvm."): 40 if test_name.startswith("kvm."):
41 test_name = test_name[4:] 41 test_name = test_name.split("kvm.")[1]
42 result_list.append((test_name, test_status, 42 result_list.append((test_name, test_status,
43 int(end_time - start_time), info)) 43 int(end_time - start_time), info))
44 44
45 # Found a FAIL/ERROR/GOOD line -- get failure/success info 45 # Found a FAIL/ERROR/GOOD line -- get failure/success info
46 elif (len(parts) >= 6 and parts[3].startswith("timestamp") and 46 elif (len(parts) >= 6 and parts[3].startswith("timestamp") and
47 parts[4].startswith("localtime")): 47 parts[4].startswith("localtime")):
48 info_list[-1] = parts[5] 48 info_list[-1] = parts[5]
49 49
50 return result_list 50 return result_list
51 51
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 if __name__ == "__main__": 88 if __name__ == "__main__":
89 import sys, os, glob 89 import sys, os, glob
90 90
91 resfiles = glob.glob("../../results/default/status*") 91 resfiles = glob.glob("../../results/default/status*")
92 if len(sys.argv) > 1: 92 if len(sys.argv) > 1:
93 if sys.argv[1] == "-h" or sys.argv[1] == "--help": 93 if sys.argv[1] == "-h" or sys.argv[1] == "--help":
94 print "Usage: %s [result files]" % sys.argv[0] 94 print "Usage: %s [result files]" % sys.argv[0]
95 sys.exit(0) 95 sys.exit(0)
96 resfiles = sys.argv[1:] 96 resfiles = sys.argv[1:]
97 main(resfiles) 97 main(resfiles)
OLDNEW
« no previous file with comments | « client/tests/kvm/migration_control.srv ('k') | client/tests/kvm/scripts/allocator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698