rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
def Execute(self): super(ThreadSanitizerWindows, self).Execute() return 0
def Analyze(self, check_sanity=False): filenames = glob.glob(self.temp_dir + "/tsan.*") analyzer = tsan_analyze.TsanAnalyzer(self._source_dir) ret = analyzer.Report(filenames, check_sanity) if ret != 0: logging.info(self.INFO_MESSAGE) return ret
9ed558436290b29292c279b4a3235675f3372aae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/9ed558436290b29292c279b4a3235675f3372aae/valgrind_test.py
json_results_generator.JSONResultsGenerator(
json_results_generator.JSONResultsGenerator(port_obj,
def __init__(self, options): self._options = options
7cc949cabfe8f93d4a777c9be8277aa573ca846e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7cc949cabfe8f93d4a777c9be8277aa573ca846e/test_output_xml_to_json.py
path = self.request.path
path = os.path.realpath(os.path.join('/', self.request.path))
def get(self): path = self.request.path # special path to invoke the unit tests # TODO(nickbaum): is there a less ghetto way to invoke the unit test? if path == "/test/": self.unitTest() return # if root, redirect to index.html # TODO(nickbaum): this doesn't handle /chrome/extensions/trunk, etc if (path == "/chrome/ext...
01441792ed84697b412d5ca25fcffa1d67991d40 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/01441792ed84697b412d5ca25fcffa1d67991d40/chromeextensionsdocs.py
if path == "/test/":
if path == "/test":
def get(self): path = self.request.path # special path to invoke the unit tests # TODO(nickbaum): is there a less ghetto way to invoke the unit test? if path == "/test/": self.unitTest() return # if root, redirect to index.html # TODO(nickbaum): this doesn't handle /chrome/extensions/trunk, etc if (path == "/chrome/ext...
01441792ed84697b412d5ca25fcffa1d67991d40 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/01441792ed84697b412d5ca25fcffa1d67991d40/chromeextensionsdocs.py
test_dir = os.path.join(os.path.abspath(self.DataDir()), 'history')
test_dir = os.path.join(os.path.abspath(self.DataDir()), 'History')
def testRedirectHistory(self): """HTTP meta-refresh redirects should have separate history entries.""" assert not self.GetHistoryInfo().History(), 'Expecting clean history.' test_dir = os.path.join(os.path.abspath(self.DataDir()), 'history') file_url = self.GetFileURLForPath(os.path.join(test_dir, 'redirector.html')) l...
b6eb899cf3badbb687af46cb2af2ff19a73ca7ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b6eb899cf3badbb687af46cb2af2ff19a73ca7ef/history.py
'xml' : 'text/xml', 'pdf' : 'application/pdf'
'pdf' : 'application/pdf', 'xml' : 'text/xml'
def __init__(self, request, client_address, socket_server): connect_handlers = [ self.RedirectConnectHandler, self.ServerAuthConnectHandler, self.DefaultConnectResponseHandler] get_handlers = [ self.NoCacheMaxAgeTimeHandler, self.NoCacheTimeHandler, self.CacheTimeHandler, self.CacheExpiresHandler, self.CacheProxyRevali...
3d6c1e0b70d20e2aad03da624c84efa53f732224 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/3d6c1e0b70d20e2aad03da624c84efa53f732224/testserver.py
if start_dir.endswith('build'): print 'coverage_posix.py: doing a "cd src" to accomodate buildbot PWD' os.chdir('src')
elif self.IsMac(): pass else: if start_dir.endswith('build'): print 'coverage_posix.py: doing a "cd src" to accomodate buildbot PWD' os.chdir('src')
def GenerateLcovPosix(self): """Convert profile data to lcov on Mac or Linux.""" start_dir = os.getcwd() if self.IsLinux(): # With Linux/make (e.g. the coverage_run target), the current # directory for this command is .../build/src/chrome but we need # to be in .../build/src for the relative path of source files # to b...
26dfa7aa33ca867c6a7c6665e3286cb90069ca1b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/26dfa7aa33ca867c6a7c6665e3286cb90069ca1b/coverage_posix.py
def __init__(self, filename, file_comment = None): CWriter.__init__(self, filename)
bec520fe8c1d67407f6827f1c5d09e7c7d4b9bd2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/bec520fe8c1d67407f6827f1c5d09e7c7d4b9bd2/build_gles2_cmd_buffer.py
node.attrs['first_id'] = id_list.pop(0)
node.attrs['first_id'] = str(id_list.pop(0))
def AssignFirstIds(self, filename_or_stream, first_id_filename): '''Assign first ids to each grouping node based on values from tools/grit/resource_ids.''' # If the input is a stream, then we're probably in a unit test and # should skip this step. if type(filename_or_stream) not in (str, unicode): return
53bca30ed88fdadd05993ef8e11a88d6376cfd85 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/53bca30ed88fdadd05993ef8e11a88d6376cfd85/misc.py
if 'CHROME_ORIGIN' not in os.environ.keys() or \ (os.environ['CHROME_ORIGIN'] != 'LOCAL_SOURCE' and os.environ['CHROME_ORIGIN'] != 'SERVER_SOURCE'): logging.info('Skipping Chrome test resource setup for non-local builds') return chrome_test_files = os.environ['SYSROOT'] + '/usr/local/autotest-chrome' logging.info('Con...
return
def setup(top_dir): if 'CHROME_ORIGIN' not in os.environ.keys() or \ (os.environ['CHROME_ORIGIN'] != 'LOCAL_SOURCE' and os.environ['CHROME_ORIGIN'] != 'SERVER_SOURCE'): logging.info('Skipping Chrome test resource setup for non-local builds') return chrome_test_files = os.environ['SYSROOT'] + '/usr/local/autotest-chrom...
ec0b7e5672fdfee40f84a25bd56d5dcc5d49a068 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ec0b7e5672fdfee40f84a25bd56d5dcc5d49a068/chrome_test.py
utils.update_version(pwd + '/src', False, version, setup, pwd)
utils.update_version(pwd + '/src', False, version, setup, None)
def setup(top_dir): if 'CHROME_ORIGIN' not in os.environ.keys() or \ (os.environ['CHROME_ORIGIN'] != 'LOCAL_SOURCE' and os.environ['CHROME_ORIGIN'] != 'SERVER_SOURCE'): logging.info('Skipping Chrome test resource setup for non-local builds') return chrome_test_files = os.environ['SYSROOT'] + '/usr/local/autotest-chrom...
ec0b7e5672fdfee40f84a25bd56d5dcc5d49a068 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ec0b7e5672fdfee40f84a25bd56d5dcc5d49a068/chrome_test.py
logging.debug('Executing javascript: ', js)
logging.debug('Executing javascript: %s', js)
def CallJavascriptFunc(self, function, args=[], tab_index=0, windex=0): """Executes a script which calls a given javascript function.
61a8f7df1ad40e0e3595d5c71639da22b266ce2d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/61a8f7df1ad40e0e3595d5c71639da22b266ce2d/pyauto.py
def ParseDir(path): """Examine a third_party/foo component and extract its metadata.""" # Try to find README.chromium. readme_path = os.path.join(path, 'README.chromium') if not os.path.exists(readme_path): raise LicenseError("missing README.chromium") # Parse metadata fields out of README.chromium. # We provide a de...
9d61b0d2232bfecdd693dc18aae58f3e81c08d8e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/9d61b0d2232bfecdd693dc18aae58f3e81c08d8e/licenses.py
license_file = metadata["License File"] license_path = os.path.join(path, license_file) if not os.path.exists(license_path): raise LicenseError("License file '" + license_file + "' doesn't exist. " "Either add a 'License File:' section to " "README.chromium or add the missing file.")
for filename in (metadata["License File"], "COPYING"): license_path = os.path.join(path, filename) if os.path.exists(license_path): metadata["License File"] = filename break license_path = None if not license_path: raise LicenseError("License file not found. " "Either add a file named LICENSE, " "import upstream's COP...
def ParseDir(path): """Examine a third_party/foo component and extract its metadata.""" # Try to find README.chromium. readme_path = os.path.join(path, 'README.chromium') if not os.path.exists(readme_path): raise LicenseError("missing README.chromium") # Parse metadata fields out of README.chromium. # We provide a de...
9d61b0d2232bfecdd693dc18aae58f3e81c08d8e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/9d61b0d2232bfecdd693dc18aae58f3e81c08d8e/licenses.py
skip_dirs = ('.svn', '.git', 'out', 'Debug', 'Release', 'layout_tests')
def FindThirdPartyDirs(): """Find all third_party directories underneath the current directory.""" skip_dirs = ('.svn', '.git', # VCS metadata 'out', 'Debug', 'Release', # build files 'layout_tests') # lots of subdirs third_party_dirs = [] for path, dirs, files in os.walk('.'): path = path[len...
9d61b0d2232bfecdd693dc18aae58f3e81c08d8e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/9d61b0d2232bfecdd693dc18aae58f3e81c08d8e/licenses.py
for skip in skip_dirs:
for skip in PRUNE_DIRS:
def FindThirdPartyDirs(): """Find all third_party directories underneath the current directory.""" skip_dirs = ('.svn', '.git', # VCS metadata 'out', 'Debug', 'Release', # build files 'layout_tests') # lots of subdirs third_party_dirs = [] for path, dirs, files in os.walk('.'): path = path[len...
9d61b0d2232bfecdd693dc18aae58f3e81c08d8e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/9d61b0d2232bfecdd693dc18aae58f3e81c08d8e/licenses.py
third_party_dirs.extend([os.path.join(path, dir) for dir in dirs])
for dir in dirs: dirpath = os.path.join(path, dir) if dirpath not in PRUNE_PATHS: third_party_dirs.append(dirpath)
def FindThirdPartyDirs(): """Find all third_party directories underneath the current directory.""" skip_dirs = ('.svn', '.git', # VCS metadata 'out', 'Debug', 'Release', # build files 'layout_tests') # lots of subdirs third_party_dirs = [] for path, dirs, files in os.walk('.'): path = path[len...
9d61b0d2232bfecdd693dc18aae58f3e81c08d8e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/9d61b0d2232bfecdd693dc18aae58f3e81c08d8e/licenses.py
""" /* Copyright (c) 2010 The Chromium Authors. All rights reserved.
"""/* Copyright (c) 2010 The Chromium Authors. All rights reserved.
def WriteLines(filename, lines): outfile = open(filename, 'w') for line in lines: outfile.write(line) outfile.write('\n')
103d37f9fc371b91eea4e911da3a585056bbb52c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/103d37f9fc371b91eea4e911da3a585056bbb52c/generate_ppapi_include_tests.py
""" // Copyright (c) 2010 The Chromium Authors. All rights reserved.
"""// Copyright (c) 2010 The Chromium Authors. All rights reserved.
def WriteLines(filename, lines): outfile = open(filename, 'w') for line in lines: outfile.write(line) outfile.write('\n')
103d37f9fc371b91eea4e911da3a585056bbb52c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/103d37f9fc371b91eea4e911da3a585056bbb52c/generate_ppapi_include_tests.py
def GetSourcesForTarget(target_name, gyp_file_data): for target in gyp_file_data[GYP_TARGETS_KEY]: if target[GYP_TARGET_NAME_KEY] == target_name: sources = target[GYP_SOURCES_KEY] sources.sort() return sources print 'Warning: no target named ', target, ' found.' return []
103d37f9fc371b91eea4e911da3a585056bbb52c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/103d37f9fc371b91eea4e911da3a585056bbb52c/generate_ppapi_include_tests.py
WriteLines('tests/test_c_includes.c', lines)
lines.append('\n WriteLines('tests/all_c_includes.h', lines)
def GenerateCIncludeTest(gyp_file_data): c_sources = GetSourcesForTarget('ppapi_c', gyp_file_data) lines = [COPYRIGHT_STRING_C] for source in c_sources: lines.append('#include "ppapi/' + source + '"\n') WriteLines('tests/test_c_includes.c', lines)
103d37f9fc371b91eea4e911da3a585056bbb52c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/103d37f9fc371b91eea4e911da3a585056bbb52c/generate_ppapi_include_tests.py
def GenerateCIncludeTest(gyp_file_data): c_sources = GetSourcesForTarget('ppapi_c', gyp_file_data) lines = [COPYRIGHT_STRING_C] for source in c_sources: lines.append('#include "ppapi/' + source + '"\n') WriteLines('tests/test_c_includes.c', lines)
103d37f9fc371b91eea4e911da3a585056bbb52c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/103d37f9fc371b91eea4e911da3a585056bbb52c/generate_ppapi_include_tests.py
WriteLines('tests/test_cc_includes.cc', lines)
lines.append('\n WriteLines('tests/all_cpp_includes.h', lines)
def GenerateCCIncludeTest(gyp_file_data): cc_sources = GetSourcesForTarget('ppapi_cpp_objects', gyp_file_data) header_re = re.compile('.+\.h$') lines = [COPYRIGHT_STRING_CC] for source in cc_sources: if header_re.match(source): lines.append('#include "ppapi/' + source + '"\n') WriteLines('tests/test_cc_includes.cc', li...
103d37f9fc371b91eea4e911da3a585056bbb52c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/103d37f9fc371b91eea4e911da3a585056bbb52c/generate_ppapi_include_tests.py
PermanentItem('google_chrome_sessions', name='Sessions', parent_tag='google_chrome', sync_type=SESSION),
def __init__(self, tag, name, parent_tag, sync_type): self.tag = tag self.name = name self.parent_tag = parent_tag self.sync_type = sync_type
72056dfd3beee98a65b3aeac4062b5bffb52df3c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/72056dfd3beee98a65b3aeac4062b5bffb52df3c/chromiumsync.py
from pyautolib import *
import pyautolib
def _LocateBinDirs(): script_dir = os.path.dirname(__file__) chrome_src = os.path.join(script_dir, os.pardir, os.pardir, os.pardir) bin_dirs = { 'linux2': [ os.path.join(chrome_src, 'out', 'Debug'), os.path.join(chrome_src, 'sconsbuild', 'Debug'), os.path.join(chrome_src, 'out', 'Release'), os.path.join(chrome_src, 's...
16e4b90d3594ab33ede7dc98616af3af2f6797e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/16e4b90d3594ab33ede7dc98616af3af2f6797e0/pyauto.py
class PyUITest(PyUITestSuite, unittest.TestCase):
class PyUITest(pyautolib.PyUITestSuite, unittest.TestCase):
def _LocateBinDirs(): script_dir = os.path.dirname(__file__) chrome_src = os.path.join(script_dir, os.pardir, os.pardir, os.pardir) bin_dirs = { 'linux2': [ os.path.join(chrome_src, 'out', 'Debug'), os.path.join(chrome_src, 'sconsbuild', 'Debug'), os.path.join(chrome_src, 'out', 'Release'), os.path.join(chrome_src, 's...
16e4b90d3594ab33ede7dc98616af3af2f6797e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/16e4b90d3594ab33ede7dc98616af3af2f6797e0/pyauto.py
PyUITestSuite.__init__(self, sys.argv)
pyautolib.PyUITestSuite.__init__(self, sys.argv) browser_dir = os.path.normpath(os.path.dirname(pyautolib.__file__)) os.environ['PATH'] = browser_dir + os.pathsep + os.environ['PATH'] self.Initialize(pyautolib.FilePath(browser_dir))
def __init__(self, methodName='runTest'): PyUITestSuite.__init__(self, sys.argv) unittest.TestCase.__init__(self, methodName)
16e4b90d3594ab33ede7dc98616af3af2f6797e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/16e4b90d3594ab33ede7dc98616af3af2f6797e0/pyauto.py
PyUITestSuite.__del__(self)
pyautolib.PyUITestSuite.__del__(self)
def __del__(self): PyUITestSuite.__del__(self)
16e4b90d3594ab33ede7dc98616af3af2f6797e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/16e4b90d3594ab33ede7dc98616af3af2f6797e0/pyauto.py
result = self._CreateImageDiff(filename, target)
def CompareOutput(self, filename, proc, output, test_args, target): """Implementation of CompareOutput that checks the output image and checksum against the expected files from the LayoutTest directory. """ failures = []
850534ab2821c8ce7c927eb5074c2628bc2b9a9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/850534ab2821c8ce7c927eb5074c2628bc2b9a9c/image_diff.py
def __init__(self, methodName='runTest', extra_chrome_flags=None):
def __init__(self, methodName='runTest', **kwargs):
def __init__(self, methodName='runTest', extra_chrome_flags=None): """Initialize PyUITest.
1c7ab112b8fd89fc71616f789ad0474489b02d18 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/1c7ab112b8fd89fc71616f789ad0474489b02d18/pyauto.py
extra_chrome_flags: additional flags to pass when launching chrome
(The rest of the args can be in any order. They can even be skipped in which case the defaults will be used.) extra_chrome_flags: additional flags to pass when launching chrome. Defaults to None clear_profile: If True, clean the profile dir before use. Defaults to True homepage: the home page. Defaults to "about:blan...
def __init__(self, methodName='runTest', extra_chrome_flags=None): """Initialize PyUITest.
1c7ab112b8fd89fc71616f789ad0474489b02d18 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/1c7ab112b8fd89fc71616f789ad0474489b02d18/pyauto.py
if extra_chrome_flags is not None:
if extra_chrome_flags:
def __init__(self, methodName='runTest', extra_chrome_flags=None): """Initialize PyUITest.
1c7ab112b8fd89fc71616f789ad0474489b02d18 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/1c7ab112b8fd89fc71616f789ad0474489b02d18/pyauto.py
pyautolib.PyUITestSuite.__init__(self, args)
pyautolib.PyUITestSuite.__init__(self, args, clear_profile, homepage)
def __init__(self, methodName='runTest', extra_chrome_flags=None): """Initialize PyUITest.
1c7ab112b8fd89fc71616f789ad0474489b02d18 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/1c7ab112b8fd89fc71616f789ad0474489b02d18/pyauto.py
def GenerateHeader(file, functions, setName):
def GenerateHeader(file, functions, set_name):
def GenerateHeader(file, functions, setName): """Generates gl_binding_autogen_x.h""" # Write file header. file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\...
41b13474f628e124e24db208e67a4b0ebf16f001 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/41b13474f628e124e24db208e67a4b0ebf16f001/generate_bindings.py
file.write(' file.write('
file.write(' file.write('
file.write('#ifndef APP_GFX_GL_GL_BINDINGS_AUTOGEN_%s_H_\n' % setName.upper())
41b13474f628e124e24db208e67a4b0ebf16f001 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/41b13474f628e124e24db208e67a4b0ebf16f001/generate_bindings.py
file.write('void InitializeGLBindings%s();\n' % setName.upper())
file.write('void InitializeGLBindings%s();\n' % set_name.upper()) file.write('void InitializeDebugGLBindings%s();\n' % set_name.upper())
file.write('#ifndef APP_GFX_GL_GL_BINDINGS_AUTOGEN_%s_H_\n' % setName.upper())
41b13474f628e124e24db208e67a4b0ebf16f001 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/41b13474f628e124e24db208e67a4b0ebf16f001/generate_bindings.py
for [returnType, names, arguments] in functions:
for [return_type, names, arguments] in functions:
file.write('#ifndef APP_GFX_GL_GL_BINDINGS_AUTOGEN_%s_H_\n' % setName.upper())
41b13474f628e124e24db208e67a4b0ebf16f001 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/41b13474f628e124e24db208e67a4b0ebf16f001/generate_bindings.py
(returnType, names[0], arguments))
(return_type, names[0], arguments))
file.write('typedef %s (GL_BINDING_CALL *%sProc)(%s);\n' % (returnType, names[0], arguments))
41b13474f628e124e24db208e67a4b0ebf16f001 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/41b13474f628e124e24db208e67a4b0ebf16f001/generate_bindings.py
for [returnType, names, arguments] in functions:
for [return_type, names, arguments] in functions:
file.write('typedef %s (GL_BINDING_CALL *%sProc)(%s);\n' % (returnType, names[0], arguments))
41b13474f628e124e24db208e67a4b0ebf16f001 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/41b13474f628e124e24db208e67a4b0ebf16f001/generate_bindings.py
for [returnType, names, arguments] in functions:
for [return_type, names, arguments] in functions:
file.write('typedef %s (GL_BINDING_CALL *%sProc)(%s);\n' % (returnType, names[0], arguments))
41b13474f628e124e24db208e67a4b0ebf16f001 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/41b13474f628e124e24db208e67a4b0ebf16f001/generate_bindings.py
setName.upper()) def GenerateSource(file, functions, setName):
set_name.upper()) def GenerateSource(file, functions, set_name):
file.write('typedef %s (GL_BINDING_CALL *%sProc)(%s);\n' % (returnType, names[0], arguments))
41b13474f628e124e24db208e67a4b0ebf16f001 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/41b13474f628e124e24db208e67a4b0ebf16f001/generate_bindings.py
for [returnType, names, arguments] in functions:
for [return_type, names, arguments] in functions:
def GenerateSource(file, functions, setName): """Generates gl_binding_autogen_x.cc""" # Write file header. file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file....
41b13474f628e124e24db208e67a4b0ebf16f001 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/41b13474f628e124e24db208e67a4b0ebf16f001/generate_bindings.py
file.write('void InitializeGLBindings%s() {\n' % setName.upper()) for [returnType, names, arguments] in functions:
file.write('void InitializeGLBindings%s() {\n' % set_name.upper()) for [return_type, names, arguments] in functions:
def GenerateSource(file, functions, setName): """Generates gl_binding_autogen_x.cc""" # Write file header. file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file....
41b13474f628e124e24db208e67a4b0ebf16f001 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/41b13474f628e124e24db208e67a4b0ebf16f001/generate_bindings.py
for [returnType, names, arguments] in functions:
for [return_type, names, arguments] in functions:
def GenerateMockSource(file, functions): """Generates functions that invoke a mock GLInterface""" file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\n') file...
41b13474f628e124e24db208e67a4b0ebf16f001 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/41b13474f628e124e24db208e67a4b0ebf16f001/generate_bindings.py
(returnType, names[0], arguments)) argumentNames = re.sub(r'(const )?[a-zA-Z0-9]+\** ([a-zA-Z0-9]+)', r'\2',
(return_type, names[0], arguments)) argument_names = re.sub(r'(const )?[a-zA-Z0-9]+\** ([a-zA-Z0-9]+)', r'\2',
def GenerateMockSource(file, functions): """Generates functions that invoke a mock GLInterface""" file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\n') file...
41b13474f628e124e24db208e67a4b0ebf16f001 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/41b13474f628e124e24db208e67a4b0ebf16f001/generate_bindings.py
if argumentNames == 'void': argumentNames = '' functionName = names[0][2:] if returnType == 'void':
if argument_names == 'void': argument_names = '' function_name = names[0][2:] if return_type == 'void':
def GenerateMockSource(file, functions): """Generates functions that invoke a mock GLInterface""" file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\n') file...
41b13474f628e124e24db208e67a4b0ebf16f001 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/41b13474f628e124e24db208e67a4b0ebf16f001/generate_bindings.py
(functionName, argumentNames))
(function_name, argument_names))
def GenerateMockSource(file, functions): """Generates functions that invoke a mock GLInterface""" file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\n') file...
41b13474f628e124e24db208e67a4b0ebf16f001 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/41b13474f628e124e24db208e67a4b0ebf16f001/generate_bindings.py
(functionName, argumentNames))
(function_name, argument_names))
def GenerateMockSource(file, functions): """Generates functions that invoke a mock GLInterface""" file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\n') file...
41b13474f628e124e24db208e67a4b0ebf16f001 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/41b13474f628e124e24db208e67a4b0ebf16f001/generate_bindings.py
for [returnType, names, arguments] in functions:
for [return_type, names, arguments] in functions:
def GenerateMockSource(file, functions): """Generates functions that invoke a mock GLInterface""" file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\n') file...
41b13474f628e124e24db208e67a4b0ebf16f001 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/41b13474f628e124e24db208e67a4b0ebf16f001/generate_bindings.py
for [functions, setName] in FUNCTION_SETS: headerFile = open( os.path.join(dir, 'gl_bindings_autogen_%s.h' % setName), 'wb') GenerateHeader(headerFile, functions, setName) headerFile.close() sourceFile = open( os.path.join(dir, 'gl_bindings_autogen_%s.cc' % setName), 'wb') GenerateSource(sourceFile, functions, setName...
for [functions, set_name] in FUNCTION_SETS: header_file = open( os.path.join(dir, 'gl_bindings_autogen_%s.h' % set_name), 'wb') GenerateHeader(header_file, functions, set_name) header_file.close() source_file = open( os.path.join(dir, 'gl_bindings_autogen_%s.cc' % set_name), 'wb') GenerateSource(source_file, functions...
def main(argv): """This is the main function.""" if len(argv) >= 1: dir = argv[0] else: dir = '.' for [functions, setName] in FUNCTION_SETS: headerFile = open( os.path.join(dir, 'gl_bindings_autogen_%s.h' % setName), 'wb') GenerateHeader(headerFile, functions, setName) headerFile.close() sourceFile = open( os.path.j...
41b13474f628e124e24db208e67a4b0ebf16f001 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/41b13474f628e124e24db208e67a4b0ebf16f001/generate_bindings.py
'name': func.name, 'arg_index': arg_index, 'value_index': value_index, 'gl_func_name': gl_func_name, 'args': ", ".join(arg_strings), 'all_but_last_args': ", ".join(arg_strings[:-1]), 'gl_args': ", ".join(gl_arg_strings), 'parse_result': parse_result,
'test_name': 'GLES2DecoderTest%d' % file.file_num , 'name': func.name, 'arg_index': arg_index, 'value_index': value_index, 'gl_func_name': gl_func_name, 'args': ", ".join(arg_strings), 'all_but_last_args': ", ".join(arg_strings[:-1]), 'gl_args': ", ".join(gl_arg_strings), 'parse_result': parse_result,
def WriteInvalidUnitTest(self, func, file, test, extra = {}): """Writes a invalid unit test.""" arg_index = 0 for arg in func.GetOriginalArgs(): num_invalid_values = arg.GetNumInvalidValues() for value_index in range(0, num_invalid_values): arg_strings = [] parse_result = "kNoError" count = 0 for arg in func.GetOrigina...
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
if func.GetInfo('unit_test') == False: file.Write("// TODO(gman): %s\n" % func.name) return
def WriteServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" if func.GetInfo('unit_test') == False: file.Write("// TODO(gman): %s\n" % func.name) return valid_test = """
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
TEST_F(GLES2DecoderTest, %(name)sValidArgs) {
TEST_F(%(test_name)s, %(name)sValidArgs) {
def WriteServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" if func.GetInfo('unit_test') == False: file.Write("// TODO(gman): %s\n" % func.name) return valid_test = """
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
TEST_F(GLES2DecoderTest, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) {
TEST_F(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) {
def WriteServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" if func.GetInfo('unit_test') == False: file.Write("// TODO(gman): %s\n" % func.name) return valid_test = """
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
TEST_F(GLES2DecoderTest, %(name)sValidArgs) {
TEST_F(%(test_name)s, %(name)sValidArgs) {
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
TEST_F(GLES2DecoderTest, %(name)sInvalidArgs) {
TEST_F(%(test_name)s, %(name)sInvalidArgs) {
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
TEST_F(GLES2DecoderTest, %(name)sValidArgs) {
TEST_F(%(test_name)s, %(name)sValidArgs) {
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
TEST_F(GLES2DecoderTest, %(name)sInvalidArgs) {
TEST_F(%(test_name)s, %(name)sInvalidArgs) {
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
TEST_F(GLES2DecoderTest, %(name)sValidArgs) {
TEST_F(%(test_name)s, %(name)sValidArgs) {
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
TEST_F(GLES2DecoderTest, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) {
TEST_F(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) {
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
TEST_F(GLES2DecoderTest, %(name)sValidArgs) {
TEST_F(%(test_name)s, %(name)sValidArgs) {
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
TEST_F(GLES2DecoderTest, %(name)sInvalidArgs) {
TEST_F(%(test_name)s, %(name)sInvalidArgs) {
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
TEST_F(GLES2DecoderTest, %(name)sValidArgs) {
TEST_F(%(test_name)s, %(name)sValidArgs) {
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
TEST_F(GLES2DecoderTest, %(name)sInvalidArgs) {
TEST_F(%(test_name)s, %(name)sInvalidArgs) {
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
TEST_F(GLES2DecoderTest, %(name)sValidArgs) {
TEST_F(%(test_name)s, %(name)sValidArgs) {
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
TEST_F(GLES2DecoderTest, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) {
TEST_F(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) {
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
TEST_F(GLES2DecoderTest, %(name)sValidArgs) {
TEST_F(%(test_name)s, %(name)sValidArgs) {
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
TEST_F(GLES2DecoderTest, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) {
TEST_F(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) {
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
TEST_F(GLES2DecoderTest, %(name)sValidArgs) {
TEST_F(%(test_name)s, %(name)sValidArgs) {
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
TEST_F(GLES2DecoderTest, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) {
TEST_F(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) {
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
file.Write(" if (!id_manager_->GetServiceId(c.%s, &%s)) {\n" %
file.Write(" if (!id_manager()->GetServiceId(c.%s, &%s)) {\n" %
def WriteGetCode(self, file): """Overridden from Argument.""" file.Write(" %s %s;\n" % (self.type, self.name)) file.Write(" if (!id_manager_->GetServiceId(c.%s, &%s)) {\n" % (self.name, self.name)) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return error::kNoError;\n") file.Write(" }\n")
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
def __init__(self, name, info, return_type, original_args, args_for_cmds, cmd_args, init_args, num_pointer_args):
def __init__(self, original_name, name, info, return_type, original_args, args_for_cmds, cmd_args, init_args, num_pointer_args):
def __init__(self, name, info, return_type, original_args, args_for_cmds, cmd_args, init_args, num_pointer_args): self.name = name self.original_name = name self.info = info self.type_handler = info.type_handler self.return_type = return_type self.original_args = original_args self.num_pointer_args = num_pointer_args s...
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
self.original_name = name
self.original_name = original_name
def __init__(self, name, info, return_type, original_args, args_for_cmds, cmd_args, init_args, num_pointer_args): self.name = name self.original_name = name self.info = info self.type_handler = info.type_handler self.return_type = return_type self.original_args = original_args self.num_pointer_args = num_pointer_args s...
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
if self.GetInfo('DecoderFunc'): return self.GetInfo('DecoderFunc')
if self.GetInfo('decoder_func'): return self.GetInfo('decoder_func')
def GetGLFunctionName(self): """Gets the function to call to execute GL for this command.""" if self.GetInfo('DecoderFunc'): return self.GetInfo('DecoderFunc') return "gl%s" % self.original_name
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
gl_func_name = self.name
gl_func_name = self.original_name
def GetGLTestFunctionName(self): gl_func_name = self.GetInfo('gl_test_func') if gl_func_name == None: gl_func_name = self.GetGLFunctionName() if gl_func_name.startswith("gl"): gl_func_name = gl_func_name[2:] else: gl_func_name = self.name return gl_func_name
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
self.original_name = func.name
def __init__(self, func): new_args = [] for arg in func.GetOriginalArgs(): new_arg = arg.GetImmediateVersion() if new_arg: new_args.append(new_arg)
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
f = Function(func_name, func_info, return_type, args, args_for_cmds, cmd_args, init_args, num_pointer_args)
f = Function(func_name, func_name, func_info, return_type, args, args_for_cmds, cmd_args, init_args, num_pointer_args)
def ParseGLH(self, filename): """Parses the GL2.h file and extracts the functions""" for line in _GL_FUNCTIONS.splitlines(): match = self._function_re.match(line) if match: func_name = match.group(2)[2:] func_info = self.GetFunctionInfo(func_name) if func_info.type != 'Noop': return_type = match.group(1).strip() arg_st...
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
file = CHeaderWriter( filename, "// It is included by gles2_cmd_decoder_unittest.cc\n") for func in self.functions: func.WriteServiceUnitTest(file) file.Close()
num_tests = len(self.functions) step = (num_tests + 1) / 2 count = 0 for test_num in range(0, num_tests, step): count += 1 name = filename % count file = CHeaderWriter( name, "// It is included by gles2_cmd_decoder_unittest_%d.cc\n" % count) file.SetFileNum(count) end = test_num + step if end > num_tests: end = num_tes...
def WriteServiceUnitTests(self, filename): """Writes the service decorder unit tests.""" file = CHeaderWriter( filename, "// It is included by gles2_cmd_decoder_unittest.cc\n")
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
gen.WriteServiceUnitTests("service/gles2_cmd_decoder_unittest_autogen.h")
gen.WriteServiceUnitTests("service/gles2_cmd_decoder_unittest_%d_autogen.h")
def main(argv): """This is the main function.""" parser = OptionParser() parser.add_option( "-g", "--generate-implementation-templates", action="store_true", help="generates files that are generally hand edited..") parser.add_option( "--generate-command-id-tests", action="store_true", help="generate tests for commands ...
0cf346be2eee13b0349e5b4ec789c5a56c28b09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0cf346be2eee13b0349e5b4ec789c5a56c28b09c/build_gles2_cmd_buffer.py
def UpdateGClientBranch(webkit_rev):
def UpdateGClientBranch(webkit_rev, magic_gclient_branch):
def UpdateGClientBranch(webkit_rev): """Update the magic gclient branch to point at |webkit_rev|. Returns: true if the branch didn't need changes.""" target = FindSVNRev(webkit_rev) if not target: print "r%s not available; fetching." % webkit_rev subprocess.check_call(['git', 'fetch'], shell=(os.name == 'nt')) target ...
8a98a7e9ea84cfd8a045ced8dc0dec8c50483fc0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8a98a7e9ea84cfd8a045ced8dc0dec8c50483fc0/sync-webkit-git.py
current = RunGit(['show-ref', '--hash', MAGIC_GCLIENT_BRANCH])
current = RunGit(['show-ref', '--hash', magic_gclient_branch])
def UpdateGClientBranch(webkit_rev): """Update the magic gclient branch to point at |webkit_rev|. Returns: true if the branch didn't need changes.""" target = FindSVNRev(webkit_rev) if not target: print "r%s not available; fetching." % webkit_rev subprocess.check_call(['git', 'fetch'], shell=(os.name == 'nt')) target ...
8a98a7e9ea84cfd8a045ced8dc0dec8c50483fc0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8a98a7e9ea84cfd8a045ced8dc0dec8c50483fc0/sync-webkit-git.py
MAGIC_GCLIENT_BRANCH, target],
magic_gclient_branch, target],
def UpdateGClientBranch(webkit_rev): """Update the magic gclient branch to point at |webkit_rev|. Returns: true if the branch didn't need changes.""" target = FindSVNRev(webkit_rev) if not target: print "r%s not available; fetching." % webkit_rev subprocess.check_call(['git', 'fetch'], shell=(os.name == 'nt')) target ...
8a98a7e9ea84cfd8a045ced8dc0dec8c50483fc0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8a98a7e9ea84cfd8a045ced8dc0dec8c50483fc0/sync-webkit-git.py
def UpdateCurrentCheckoutIfAppropriate():
def UpdateCurrentCheckoutIfAppropriate(magic_gclient_branch):
def UpdateCurrentCheckoutIfAppropriate(): """Reset the current gclient branch if that's what we have checked out.""" branch = RunGit(['symbolic-ref', '-q', 'HEAD']) if branch != MAGIC_GCLIENT_BRANCH: print "We have now updated the 'gclient' branch, but third_party/WebKit" print "has some other branch ('%s') checked out...
8a98a7e9ea84cfd8a045ced8dc0dec8c50483fc0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8a98a7e9ea84cfd8a045ced8dc0dec8c50483fc0/sync-webkit-git.py
if branch != MAGIC_GCLIENT_BRANCH:
if branch != magic_gclient_branch:
def UpdateCurrentCheckoutIfAppropriate(): """Reset the current gclient branch if that's what we have checked out.""" branch = RunGit(['symbolic-ref', '-q', 'HEAD']) if branch != MAGIC_GCLIENT_BRANCH: print "We have now updated the 'gclient' branch, but third_party/WebKit" print "has some other branch ('%s') checked out...
8a98a7e9ea84cfd8a045ced8dc0dec8c50483fc0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8a98a7e9ea84cfd8a045ced8dc0dec8c50483fc0/sync-webkit-git.py
changed = UpdateGClientBranch(webkit_rev)
magic_gclient_branch = GetGClientBranchName() changed = UpdateGClientBranch(webkit_rev, magic_gclient_branch)
def main(): if not os.path.exists('third_party/WebKit/.git'): if os.path.exists('third_party/WebKit'): print "ERROR: third_party/WebKit appears to not be under git control." else: print "ERROR: third_party/WebKit could not be found." print "Did you run this script from the right directory?" print "See http://code.goog...
8a98a7e9ea84cfd8a045ced8dc0dec8c50483fc0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8a98a7e9ea84cfd8a045ced8dc0dec8c50483fc0/sync-webkit-git.py
return UpdateCurrentCheckoutIfAppropriate()
return UpdateCurrentCheckoutIfAppropriate(magic_gclient_branch)
def main(): if not os.path.exists('third_party/WebKit/.git'): if os.path.exists('third_party/WebKit'): print "ERROR: third_party/WebKit appears to not be under git control." else: print "ERROR: third_party/WebKit could not be found." print "Did you run this script from the right directory?" print "See http://code.goog...
8a98a7e9ea84cfd8a045ced8dc0dec8c50483fc0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8a98a7e9ea84cfd8a045ced8dc0dec8c50483fc0/sync-webkit-git.py
def RenderPage(name, test_shell):
def RenderPages(names, test_shell):
def RenderPage(name, test_shell): """ Calls test_shell --layout-tests .../generator.html?<name> and writes the result to .../docs/<name>.html """ if not name: raise Exception("RenderPage called with empty name") generator_url = "file:" + urllib.pathname2url(_generator_html) + "?" + name input_file = _base_dir + "/" + ...
b40d40f02a627229cc5081b53a2adde3111a181e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b40d40f02a627229cc5081b53a2adde3111a181e/build.py
Calls test_shell --layout-tests .../generator.html?<name> and writes the result to .../docs/<name>.html
Calls test_shell --layout-tests .../generator.html?<names> and writes the results to .../docs/<name>.html
def RenderPage(name, test_shell): """ Calls test_shell --layout-tests .../generator.html?<name> and writes the result to .../docs/<name>.html """ if not name: raise Exception("RenderPage called with empty name") generator_url = "file:" + urllib.pathname2url(_generator_html) + "?" + name input_file = _base_dir + "/" + ...
b40d40f02a627229cc5081b53a2adde3111a181e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b40d40f02a627229cc5081b53a2adde3111a181e/build.py
if not name: raise Exception("RenderPage called with empty name") generator_url = "file:" + urllib.pathname2url(_generator_html) + "?" + name input_file = _base_dir + "/" + name + ".html" original = None if (os.path.isfile(input_file)): original = open(input_file, 'rb').read()
if not names: raise Exception("RenderPage called with empty names param") generator_url = "file:" + urllib.pathname2url(_generator_html) generator_url += "?" + ",".join(names) originals = {} for name in names: input_file = _base_dir + "/" + name + ".html" if (os.path.isfile(input_file)): originals[name] = open(inp...
def RenderPage(name, test_shell): """ Calls test_shell --layout-tests .../generator.html?<name> and writes the result to .../docs/<name>.html """ if not name: raise Exception("RenderPage called with empty name") generator_url = "file:" + urllib.pathname2url(_generator_html) + "?" + name input_file = _base_dir + "/" + ...
b40d40f02a627229cc5081b53a2adde3111a181e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b40d40f02a627229cc5081b53a2adde3111a181e/build.py
shutil.copy(_page_shell_html, input_file) p = Popen([test_shell, "--layout-tests", generator_url], stdout=PIPE) result = p.stdout.read() content_start = result.find(_expected_output_preamble) content_end = result.find(_expected_output_postamble) if (content_start < 0): if (result.startswith(" raise Exception("test...
open(input_file, 'wb').write(result) if (originals[name] and result != originals[name]): changed_files.append(input_file) return changed_files
def RenderPage(name, test_shell): """ Calls test_shell --layout-tests .../generator.html?<name> and writes the result to .../docs/<name>.html """ if not name: raise Exception("RenderPage called with empty name") generator_url = "file:" + urllib.pathname2url(_generator_html) + "?" + name input_file = _base_dir + "/" + ...
b40d40f02a627229cc5081b53a2adde3111a181e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b40d40f02a627229cc5081b53a2adde3111a181e/build.py
search_locations.append(chrome_dir + "/Release/test_shell.exe")
def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.geten...
b40d40f02a627229cc5081b53a2adde3111a181e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b40d40f02a627229cc5081b53a2adde3111a181e/build.py
search_locations.append(src_dir + "/sconsbuild/Release/test_shell") search_locations.append(src_dir + "/out/Release/test_shell")
def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.geten...
b40d40f02a627229cc5081b53a2adde3111a181e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b40d40f02a627229cc5081b53a2adde3111a181e/build.py
search_locations.append(src_dir + "/xcodebuild/Release/TestShell.app/Contents/MacOS/TestShell")
def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.geten...
b40d40f02a627229cc5081b53a2adde3111a181e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b40d40f02a627229cc5081b53a2adde3111a181e/build.py
raise Exception ("Could not find test_shell executable\n" + "**test_shell may need to be built**\n" + "Searched: \n" + "\n".join(search_locations) + "\n" + "To specify a path to test_shell use --test-shell-path")
raise Exception("Could not find test_shell executable\n" + "**test_shell may need to be built**\n" + "Searched: \n" + "\n".join(search_locations) + "\n" + "To specify a path to test_shell use --test-shell-path")
def FindTestShell(): # This is hacky. It is used to guess the location of the test_shell chrome_dir = os.path.normpath(_base_dir + "/../../../") src_dir = os.path.normpath(chrome_dir + "/../") search_locations = [] if (sys.platform in ('cygwin', 'win32')): home_dir = os.path.normpath(os.getenv("HOMEDRIVE") + os.geten...
b40d40f02a627229cc5081b53a2adde3111a181e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b40d40f02a627229cc5081b53a2adde3111a181e/build.py
modified_files = [] for page in page_names: modified_file = RenderPage(page, test_shell) if (modified_file): modified_files.append(modified_file)
modified_files = RenderPages(page_names, test_shell)
def main(): # Prevent windows from using cygwin python. if (sys.platform == "cygwin"): raise Exception("Building docs not supported for cygwin python.\n" "Please run the build.bat script.") parser = OptionParser() parser.add_option("--test-shell-path", dest="test_shell_path") (options, args) = parser.parse_args() if ...
b40d40f02a627229cc5081b53a2adde3111a181e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b40d40f02a627229cc5081b53a2adde3111a181e/build.py
credit_cards = self.EvalDataFrom(file_path) self.FillAutoFillProfile(credit_cards=credit_cards) self.assertEqual(credit_cards,
test_data = self.EvalDataFrom(file_path) credit_cards_input = test_data['input'] self.FillAutoFillProfile(credit_cards=credit_cards_input) self.assertEqual(test_data['expected'],
def testFillProfileCrazyCharacters(self): """Test filling profiles with unicode strings and crazy characters.""" # Adding autofill profiles. file_path = os.path.join(self.DataDir(), 'autofill', 'crazy_autofill.txt') profiles = self.EvalDataFrom(file_path) self.FillAutoFillProfile(profiles=profiles)
6f82ef0f8c10cdd25097e449948ca9c042f3171e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/6f82ef0f8c10cdd25097e449948ca9c042f3171e/autofill.py
credit_card = {'CREDIT_CARD_NUMBER': 'Not_Checked'}
credit_card = {'CREDIT_CARD_NUMBER': 'Not_0123-5Checked'} expected_credit_card = {'CREDIT_CARD_NUMBER': '01235'}
def testAutofillInvalid(self): """Test filling in invalid values for profiles and credit cards.""" # First try profiles with invalid input. without_invalid = {'NAME_FIRST': u'Will', 'ADDRESS_HOME_CITY': 'Sunnyvale', 'ADDRESS_HOME_STATE': 'CA', 'ADDRESS_HOME_ZIP': 'my_zip', 'ADDRESS_HOME_COUNTRY': 'USA'} # Add some inva...
6f82ef0f8c10cdd25097e449948ca9c042f3171e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/6f82ef0f8c10cdd25097e449948ca9c042f3171e/autofill.py
self.assertEqual([credit_card], self.GetAutoFillProfile()['credit_cards'])
self.assertEqual([expected_credit_card], self.GetAutoFillProfile()['credit_cards'])
def testAutofillInvalid(self): """Test filling in invalid values for profiles and credit cards.""" # First try profiles with invalid input. without_invalid = {'NAME_FIRST': u'Will', 'ADDRESS_HOME_CITY': 'Sunnyvale', 'ADDRESS_HOME_STATE': 'CA', 'ADDRESS_HOME_ZIP': 'my_zip', 'ADDRESS_HOME_COUNTRY': 'USA'} # Add some inva...
6f82ef0f8c10cdd25097e449948ca9c042f3171e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/6f82ef0f8c10cdd25097e449948ca9c042f3171e/autofill.py
if os.path.exists(deps_file):
if os.path.isfile(deps_file):
def Lookup(self, var_name): """Implements the Var syntax.""" if var_name in self._local_scope.get("vars", {}): return self._local_scope["vars"][var_name] raise Error("Var is not defined: %s" % var_name)
f42c7e5c22c625194c1cd4fc70ca350e2d96dd21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f42c7e5c22c625194c1cd4fc70ca350e2d96dd21/checkdeps.py
return self.SimpleTest("chrome", "remoting_unittests", cmd_args=[ "--ui-test-timeout=240000", "--ui-test-action-timeout=120000", "--ui-test-action-max-timeout=280000"])
return self.SimpleTest("chrome", "remoting_unittests")
def TestRemoting(self): return self.SimpleTest("chrome", "remoting_unittests", cmd_args=[ "--ui-test-timeout=240000", "--ui-test-action-timeout=120000", "--ui-test-action-max-timeout=280000"])
33e152860faa695847e6e9c8c0cf4ea71d6421e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/33e152860faa695847e6e9c8c0cf4ea71d6421e6/chrome_tests.py