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

Side by Side Diff: tools/testrunner/local/utils.py

Issue 532673002: Revert "Refactoring: Make gtest testsuite the default." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | « tools/testrunner/local/testsuite.py ('k') | tools/unittests/run_perf_test.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 # Copyright 2012 the V8 project authors. All rights reserved. 1 # Copyright 2012 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 18 matching lines...) Expand all
29 import os 29 import os
30 from os.path import exists 30 from os.path import exists
31 from os.path import isdir 31 from os.path import isdir
32 from os.path import join 32 from os.path import join
33 import platform 33 import platform
34 import re 34 import re
35 import urllib2 35 import urllib2
36 36
37 37
38 def GetSuitePaths(test_root): 38 def GetSuitePaths(test_root):
39 return [ f for f in os.listdir(test_root) if isdir(join(test_root, f)) ] 39 def IsSuite(path):
40 return isdir(path) and exists(join(path, 'testcfg.py'))
41 return [ f for f in os.listdir(test_root) if IsSuite(join(test_root, f)) ]
40 42
41 43
42 # Reads a file into an array of strings 44 # Reads a file into an array of strings
43 def ReadLinesFrom(name): 45 def ReadLinesFrom(name):
44 lines = [] 46 lines = []
45 with open(name) as f: 47 with open(name) as f:
46 for line in f: 48 for line in f:
47 if line.startswith('#'): continue 49 if line.startswith('#'): continue
48 if '#' in line: 50 if '#' in line:
49 line = line[:line.find('#')] 51 line = line[:line.find('#')]
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 114
113 def IsWindows(): 115 def IsWindows():
114 return GuessOS() == 'windows' 116 return GuessOS() == 'windows'
115 117
116 118
117 def URLRetrieve(source, destination): 119 def URLRetrieve(source, destination):
118 """urllib is broken for SSL connections via a proxy therefore we 120 """urllib is broken for SSL connections via a proxy therefore we
119 can't use urllib.urlretrieve().""" 121 can't use urllib.urlretrieve()."""
120 with open(destination, 'w') as f: 122 with open(destination, 'w') as f:
121 f.write(urllib2.urlopen(source).read()) 123 f.write(urllib2.urlopen(source).read())
OLDNEW
« no previous file with comments | « tools/testrunner/local/testsuite.py ('k') | tools/unittests/run_perf_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698