rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
if (values[0] > bins[0]):
if (values[0] >= bins[0]):
def inline_as_py(values, bins=10, range=None): # define bins, size N if (range is not None): mn, mx = range if (mn > mx): raise AttributeError( 'max must be larger than min in range parameter.') if not np.iterable(bins): if range is None: range = (values.min(), values.max()) mn, mx = [mi+0.0 for mi in range] if mn == ...
9e18fb4ccbe8fc12e6d4b00c5e25907331679ebc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11557/9e18fb4ccbe8fc12e6d4b00c5e25907331679ebc/profile_histogram.py
valid = valid & (values[rb] < bins[nbins - 1])
valid = valid & (values[rb] < bins[nbins-1])
def inline_as_py(values, bins=10, range=None): # define bins, size N if (range is not None): mn, mx = range if (mn > mx): raise AttributeError( 'max must be larger than min in range parameter.') if not np.iterable(bins): if range is None: range = (values.min(), values.max()) mn, mx = [mi+0.0 for mi in range] if mn == ...
9e18fb4ccbe8fc12e6d4b00c5e25907331679ebc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11557/9e18fb4ccbe8fc12e6d4b00c5e25907331679ebc/profile_histogram.py
while (bins[lb+1] < values[rb]):
while (bins[lb+1] <= values[rb]):
def inline_as_py(values, bins=10, range=None): # define bins, size N if (range is not None): mn, mx = range if (mn > mx): raise AttributeError( 'max must be larger than min in range parameter.') if not np.iterable(bins): if range is None: range = (values.min(), values.max()) mn, mx = [mi+0.0 for mi in range] if mn == ...
9e18fb4ccbe8fc12e6d4b00c5e25907331679ebc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11557/9e18fb4ccbe8fc12e6d4b00c5e25907331679ebc/profile_histogram.py
if bins[-1] == values[rb]: count[-1] += 1
def inline_as_py(values, bins=10, range=None): # define bins, size N if (range is not None): mn, mx = range if (mn > mx): raise AttributeError( 'max must be larger than min in range parameter.') if not np.iterable(bins): if range is None: range = (values.min(), values.max()) mn, mx = [mi+0.0 for mi in range] if mn == ...
9e18fb4ccbe8fc12e6d4b00c5e25907331679ebc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11557/9e18fb4ccbe8fc12e6d4b00c5e25907331679ebc/profile_histogram.py
outputs = project_dirs[project]
outputs = project_dirs[project] + '/outputs'
def make_today_dir(project='tuning_change'): outputs = project_dirs[project] today = outputs + '/' + time.strftime('%y%m%d') if not os.path.exists(today): os.mkdir(today) return today
2d29c87718633abbb209822b9b0a5b9ffe1b7d7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11557/2d29c87718633abbb209822b9b0a5b9ffe1b7d7b/out_files.py
def GrepForActions(path, actions): """Grep a source file for calls to UserMetrics functions. Arguments: path: path to the file actions: set of actions to add to """ global number_of_files_total number_of_files_total = number_of_files_total + 1 # we look for the UserMetricsAction structur constructor # this should be o...
7e1f5d579bc962aa590e1bf1cde4367a9fdcb2ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7e1f5d579bc962aa590e1bf1cde4367a9fdcb2ee/extract_actions.py
if msg.policy_scope == 'cros/device':
if msg.policy_scope == 'chromeos/device':
def ProcessPolicy(self, msg): """Handles a policy request.
fa682f7d51bd14a9fb9e4f7ed3a874030e1c1d18 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fa682f7d51bd14a9fb9e4f7ed3a874030e1c1d18/device_management.py
dmtoken = None
def CheckToken(self): """Helper for checking whether the client supplied a valid DM token.
fa682f7d51bd14a9fb9e4f7ed3a874030e1c1d18 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fa682f7d51bd14a9fb9e4f7ed3a874030e1c1d18/device_management.py
if not dmtoken: error = dm.DeviceManagementResponse.DEVICE_MANAGEMENT_TOKEN_INVALID elif not self._server.LookupDevice(dmtoken): error = dm.DeviceManagementResponse.DEVICE_NOT_FOUND else: return (dmtoken, None)
if not dmtoken: error = dm.DeviceManagementResponse.DEVICE_MANAGEMENT_TOKEN_INVALID elif not self._server.LookupDevice(dmtoken): error = dm.DeviceManagementResponse.DEVICE_NOT_FOUND else: return (dmtoken, None)
def CheckToken(self): """Helper for checking whether the client supplied a valid DM token.
fa682f7d51bd14a9fb9e4f7ed3a874030e1c1d18 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fa682f7d51bd14a9fb9e4f7ed3a874030e1c1d18/device_management.py
file.Write("%s %s(%s);\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write("\n")
impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s);\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write("\n")
def WriteGLES2ImplementationDeclaration(self, func, file): """Writes the GLES2 Implemention declaration.""" file.Write("%s %s(%s);\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write("\n")
ba9076ac9e2b9ad35b8f1cee9127a758f59c439d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ba9076ac9e2b9ad35b8f1cee9127a758f59c439d/build_gles2_cmd_buffer.py
if func.can_auto_generate and (impl_func == None or impl_func == True):
impl_decl = func.GetInfo('impl_decl') if (func.can_auto_generate and (impl_func == None or impl_func == True) and (impl_decl == None or impl_decl == True)):
def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention.""" impl_func = func.GetInfo('impl_func') if func.can_auto_generate and (impl_func == None or impl_func == True): file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) for arg in fu...
ba9076ac9e2b9ad35b8f1cee9127a758f59c439d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ba9076ac9e2b9ad35b8f1cee9127a758f59c439d/build_gles2_cmd_buffer.py
file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" FreeIds(%s);\n" % func.MakeOriginalArgString("")) file.Write(" helper_->%sImmediate(%s);\n" % (func.name, func.MakeOriginalArgString(""))) file.Write("}\n") file.Write("\n")
impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" FreeIds(%s);\n" % func.MakeOriginalArgString("")) file.Write(" helper_->%sImmediate(%s);\n" % (func.name, func.MakeOri...
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" FreeIds(%s);\n" % func.MakeOriginalArgString("")) file.Write(" helper_->%sImmediate(%s);\n" % (func.name, func...
ba9076ac9e2b9ad35b8f1cee9127a758f59c439d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ba9076ac9e2b9ad35b8f1cee9127a758f59c439d/build_gles2_cmd_buffer.py
file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) all_but_last_args = func.GetOriginalArgs()[:-1] arg_string = ( ", ".join(["%s" % arg.name for arg in all_but_last_args])) code = """ typedef %(func_name)s::Result Result;
impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) all_but_last_args = func.GetOriginalArgs()[:-1] arg_string = ( ", ".join(["%s" % arg.name for arg in all_but_last_args])) code = """ ...
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) all_but_last_args = func.GetOriginalArgs()[:-1] arg_string = ( ", ".join(["%s" % arg.name for arg in all_but_last_args])) cod...
ba9076ac9e2b9ad35b8f1cee9127a758f59c439d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ba9076ac9e2b9ad35b8f1cee9127a758f59c439d/build_gles2_cmd_buffer.py
helper_->%(func_name)s(%(arg_string)s, result_shm_id(), result_shm_offset());
helper_->%(func_name)s(%(arg_string)s, result_shm_id(), result_shm_offset());
code = """ typedef %(func_name)s::Result Result;
ba9076ac9e2b9ad35b8f1cee9127a758f59c439d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ba9076ac9e2b9ad35b8f1cee9127a758f59c439d/build_gles2_cmd_buffer.py
file.Write(code % { 'func_name': func.name, 'arg_string': arg_string, })
file.Write(code % { 'func_name': func.name, 'arg_string': arg_string, })
code = """ typedef %(func_name)s::Result Result;
ba9076ac9e2b9ad35b8f1cee9127a758f59c439d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ba9076ac9e2b9ad35b8f1cee9127a758f59c439d/build_gles2_cmd_buffer.py
action is to wait for 60secs, and can be changed by changing kWaitForActionMaxMsec in ui_test.cc.
action is to wait for kWaitForActionMaxMsec, as set in ui_test.cc
def WaitUntil(self, function, timeout=-1, retry_sleep=0.25, args=[]): """Poll on a condition until timeout.
2304add6954b3e90297814aa6374bc13be7b0af8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/2304add6954b3e90297814aa6374bc13be7b0af8/pyauto.py
Deaults to 0.25 secs.
Defaults to 0.25 secs.
def WaitUntil(self, function, timeout=-1, retry_sleep=0.25, args=[]): """Poll on a condition until timeout.
2304add6954b3e90297814aa6374bc13be7b0af8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/2304add6954b3e90297814aa6374bc13be7b0af8/pyauto.py
url = self.GetFileURLForPath(os.path.join(self.DataDir(), 'title2.html'))
url = self.GetFileURLForDataPath('title2.html')
def testHistoryResult(self): """Verify that omnibox can fetch items from history.""" url = self.GetFileURLForPath(os.path.join(self.DataDir(), 'title2.html')) title = 'Title Of Awesomeness' self.AppendTab(pyauto.GURL(url)) def _VerifyHistoryResult(query_list, description, windex=0): """Verify result matching given desc...
7f17d9e6533559f2265179bd0d746f9daaa37a14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7f17d9e6533559f2265179bd0d746f9daaa37a14/omnibox.py
url1 = self.GetFileURLForPath(os.path.join(self.DataDir(), 'title2.html')) url2 = self.GetFileURLForPath(os.path.join(self.DataDir(), 'title1.html'))
url1 = self.GetFileURLForDataPath('title2.html') url2 = self.GetFileURLForDataPath('title1.html')
def testSelect(self): """Verify omnibox popup selection.""" url1 = self.GetFileURLForPath(os.path.join(self.DataDir(), 'title2.html')) url2 = self.GetFileURLForPath(os.path.join(self.DataDir(), 'title1.html')) title1 = 'Title Of Awesomeness' self.NavigateToURL(url1) self.NavigateToURL(url2) matches = self._GetOmniboxMa...
7f17d9e6533559f2265179bd0d746f9daaa37a14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7f17d9e6533559f2265179bd0d746f9daaa37a14/omnibox.py
"""Verify suggest results in omnibox."""
"""Verify suggested results in omnibox."""
def testSuggest(self): """Verify suggest results in omnibox.""" matches = self._GetOmniboxMatchesFor('apple') self.assertTrue(matches) self.assertTrue([x for x in matches if x['type'] == 'search-suggest'])
7f17d9e6533559f2265179bd0d746f9daaa37a14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7f17d9e6533559f2265179bd0d746f9daaa37a14/omnibox.py
def testDifferentTypesOfResults(self): """Verify different types of results from omnibox.
7f17d9e6533559f2265179bd0d746f9daaa37a14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7f17d9e6533559f2265179bd0d746f9daaa37a14/omnibox.py
matches = self._GetOmniboxMatchesFor('google')
matches = self._GetOmniboxMatchesFor(search_string)
def testDifferentTypesOfResults(self): """Verify different types of results from omnibox.
7f17d9e6533559f2265179bd0d746f9daaa37a14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7f17d9e6533559f2265179bd0d746f9daaa37a14/omnibox.py
"""Verify omnibox suggest-service enable/disable pref."""
"""Verify no suggests for omnibox when suggested-services disabled.""" search_string = 'apple'
def testSuggestPref(self): """Verify omnibox suggest-service enable/disable pref.""" self.assertTrue(self.GetPrefsInfo().Prefs(pyauto.kSearchSuggestEnabled)) matches = self._GetOmniboxMatchesFor('apple') self.assertTrue(matches) self.assertTrue([x for x in matches if x['type'] == 'search-suggest']) # Disable suggest-se...
7f17d9e6533559f2265179bd0d746f9daaa37a14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7f17d9e6533559f2265179bd0d746f9daaa37a14/omnibox.py
matches = self._GetOmniboxMatchesFor('apple')
matches = self._GetOmniboxMatchesFor(search_string)
def testSuggestPref(self): """Verify omnibox suggest-service enable/disable pref.""" self.assertTrue(self.GetPrefsInfo().Prefs(pyauto.kSearchSuggestEnabled)) matches = self._GetOmniboxMatchesFor('apple') self.assertTrue(matches) self.assertTrue([x for x in matches if x['type'] == 'search-suggest']) # Disable suggest-se...
7f17d9e6533559f2265179bd0d746f9daaa37a14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7f17d9e6533559f2265179bd0d746f9daaa37a14/omnibox.py
matches = self._GetOmniboxMatchesFor('apple')
matches = self._GetOmniboxMatchesFor(search_string)
def testSuggestPref(self): """Verify omnibox suggest-service enable/disable pref.""" self.assertTrue(self.GetPrefsInfo().Prefs(pyauto.kSearchSuggestEnabled)) matches = self._GetOmniboxMatchesFor('apple') self.assertTrue(matches) self.assertTrue([x for x in matches if x['type'] == 'search-suggest']) # Disable suggest-se...
7f17d9e6533559f2265179bd0d746f9daaa37a14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7f17d9e6533559f2265179bd0d746f9daaa37a14/omnibox.py
def _CheckBookmarkResultForVariousInputs(self, url, title, windex=0): """Check if we get the Bookmark for complete and partial inputs.""" # Check if the complete URL would get the bookmark url_matches = self._GetOmniboxMatchesFor(url, windex=windex) self._VerifyHasBookmarkResult(url_matches) # Check if the complete tit...
7f17d9e6533559f2265179bd0d746f9daaa37a14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7f17d9e6533559f2265179bd0d746f9daaa37a14/omnibox.py
def _CheckBookmarkResultForVariousInputs(self, url, title, windex=0): """Check if we get the Bookmark for complete and partial inputs.""" # Check if the complete URL would get the bookmark url_matches = self._GetOmniboxMatchesFor(url, windex=windex) self._VerifyHasBookmarkResult(url_matches) # Check if the complete tit...
7f17d9e6533559f2265179bd0d746f9daaa37a14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7f17d9e6533559f2265179bd0d746f9daaa37a14/omnibox.py
def _CheckBookmarkResultForVariousInputs(self, url, title, windex=0): """Check if we get the Bookmark for complete and partial inputs.""" # Check if the complete URL would get the bookmark url_matches = self._GetOmniboxMatchesFor(url, windex=windex) self._VerifyHasBookmarkResult(url_matches) # Check if the complete tit...
7f17d9e6533559f2265179bd0d746f9daaa37a14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7f17d9e6533559f2265179bd0d746f9daaa37a14/omnibox.py
def _CheckBookmarkResultForVariousInputs(self, url, title, windex=0): """Check if we get the Bookmark for complete and partial inputs.""" # Check if the complete URL would get the bookmark url_matches = self._GetOmniboxMatchesFor(url, windex=windex) self._VerifyHasBookmarkResult(url_matches) # Check if the complete tit...
7f17d9e6533559f2265179bd0d746f9daaa37a14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7f17d9e6533559f2265179bd0d746f9daaa37a14/omnibox.py
"""Verify that omnibox can recognize bookmark in the search options in new tabs and Windows. """
"""Verify that omnibox can recognize a bookmark within search options in new tabs and windows."""
def testBookmarkResultInNewTabAndWindow(self): """Verify that omnibox can recognize bookmark in the search options in new tabs and Windows. """ url = self.GetFileURLForDataPath('title2.html') self.NavigateToURL(url) title = 'This is Awesomeness' bookmarks = self.GetBookmarkModel() bar_id = bookmarks.BookmarkBar()['id']...
7f17d9e6533559f2265179bd0d746f9daaa37a14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7f17d9e6533559f2265179bd0d746f9daaa37a14/omnibox.py
with contextlib.closing(tarfile.open(output_fullname, 'w:bz2')) as archive:
archive = tarfile.open(output_fullname, 'w:bz2') try:
def ShouldExcludePath(path): head, tail = os.path.split(path) if tail in ('.svn', '.git'): return True
55ae0190890bf5ebcba15ea41b1f00c695dff89f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/55ae0190890bf5ebcba15ea41b1f00c695dff89f/export_tarball.py
if 'delta' not in perf_data[key] or 'var' not in perf_data[key]: bad_keys.append(key) if (not isinstance(perf_data[key]['delta'], int) and not isinstance(perf_data[key]['delta'], float)): bad_keys.append(key) if (not isinstance(perf_data[key]['var'], int) and not isinstance(perf_data[key]['var'], float)): bad_keys.appe...
if 'regress' in perf_data[key]: if 'improve' not in perf_data[key]: bad_keys.append(key) if (not isinstance(perf_data[key]['regress'], int) and not isinstance(perf_data[key]['regress'], float)): bad_keys.append(key) if (not isinstance(perf_data[key]['improve'], int) and not isinstance(perf_data[key]['improve'], float...
def testPerfExpectations(self): perf_data = LoadData()
b1025ba3afc3b463d7d55e95c9e0b542cc63ff67 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b1025ba3afc3b463d7d55e95c9e0b542cc63ff67/perf_expectations_unittest.py
SANITY_TEST_SUPPRESSIONS_LINUX = {
SANITY_TEST_SUPPRESSIONS = {
def find_and_truncate(f): f.seek(0) while True: line = f.readline() if line == "": return False if '</valgrindoutput>' in line: # valgrind often has garbage after </valgrindoutput> upon crash f.truncate() return True
7fcb9a25d24814a37d618fd3c2636f7eb2dba070 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7fcb9a25d24814a37d618fd3c2636f7eb2dba070/memcheck_analyze.py
} SANITY_TEST_SUPPRESSIONS_MAC = { "Memcheck sanity test 01 (memory leak).": 1, "Memcheck sanity test 02 (malloc/read left).": 1, "Memcheck sanity test 03 (malloc/read right).": 1, "Memcheck sanity test 06 (new/read left).": 1, "Memcheck sanity test 07 (new/read right).": 1, "Memcheck sanity test 10 (write after free)...
def find_and_truncate(f): f.seek(0) while True: line = f.readline() if line == "": return False if '</valgrindoutput>' in line: # valgrind often has garbage after </valgrindoutput> upon crash f.truncate() return True
7fcb9a25d24814a37d618fd3c2636f7eb2dba070 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7fcb9a25d24814a37d618fd3c2636f7eb2dba070/memcheck_analyze.py
if common.IsLinux(): remaining_sanity_supp = MemcheckAnalyzer.SANITY_TEST_SUPPRESSIONS_LINUX elif common.IsMac(): remaining_sanity_supp = MemcheckAnalyzer.SANITY_TEST_SUPPRESSIONS_MAC else: remaining_sanity_supp = {} if check_sanity: logging.warn("No sanity test list for platform %s", sys.platform)
remaining_sanity_supp = MemcheckAnalyzer.SANITY_TEST_SUPPRESSIONS
def Report(self, files, check_sanity=False): '''Reads in a set of files and prints Memcheck report.
7fcb9a25d24814a37d618fd3c2636f7eb2dba070 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7fcb9a25d24814a37d618fd3c2636f7eb2dba070/memcheck_analyze.py
file = self.path[len(prefix):] if file.find('?') > -1: url, querystring = file.split('?') else: url = file entries = url.split('/') path = os.path.join(self.server.data_dir, *entries) if os.path.isdir(path): path = os.path.join(path, 'index.html') if not os.path.isfile(path): print "File not found " + file + " full p...
_, _, url_path, _, query, _ = urlparse.urlparse(self.path) sub_path = url_path[len(prefix):] entries = sub_path.split('/') file_path = os.path.join(self.server.data_dir, *entries) if os.path.isdir(file_path): file_path = os.path.join(file_path, 'index.html') if not os.path.isfile(file_path): print "File not found " + ...
def FileHandler(self): """This handler sends the contents of the requested file. Wow, it's like a real webserver!"""
aa36f586cbe59a6e7c1e5f942a2340077678f23c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/aa36f586cbe59a6e7c1e5f942a2340077678f23c/testserver.py
f = open(path, "rb")
f = open(file_path, "rb")
def FileHandler(self): """This handler sends the contents of the requested file. Wow, it's like a real webserver!"""
aa36f586cbe59a6e7c1e5f942a2340077678f23c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/aa36f586cbe59a6e7c1e5f942a2340077678f23c/testserver.py
headers_path = path + '.mock-http-headers'
headers_path = file_path + '.mock-http-headers'
def FileHandler(self): """This handler sends the contents of the requested file. Wow, it's like a real webserver!"""
aa36f586cbe59a6e7c1e5f942a2340077678f23c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/aa36f586cbe59a6e7c1e5f942a2340077678f23c/testserver.py
self.send_header('Content-type', self.GetMIMETypeFromName(file))
self.send_header('Content-type', self.GetMIMETypeFromName(file_path))
def FileHandler(self): """This handler sends the contents of the requested file. Wow, it's like a real webserver!"""
aa36f586cbe59a6e7c1e5f942a2340077678f23c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/aa36f586cbe59a6e7c1e5f942a2340077678f23c/testserver.py
'http://chromium-status.appspot.com/current?format=raw', '(?i).*closed.*'))
json_url='http://chromium-status.appspot.com/current?format=json'))
def CheckChangeOnCommit(input_api, output_api): results = [] if not input_api.json: results.append(output_api.PresubmitNotifyResult( 'You don\'t have json nor simplejson installed.\n' ' This is a warning that you will need to upgrade your python ' 'installation.\n' ' This is no big deal but you\'ll eventually need to...
548bd271ccdc19bf009078b5e76baf9af0420f75 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/548bd271ccdc19bf009078b5e76baf9af0420f75/PRESUBMIT.py
output = posixpath.splitext(output)[0] + ".o3dtgz"
output_base = posixpath.splitext(output)[0] output_tgz = output_base + ".o3dtgz" output_json = output_base + "/scene.json" output = output_tgz if webgl_mode: output = output_json
def write_action(asset, webgl_mode): filename = posixpath.splitext(posixpath.basename(asset['path']))[0] filename = filename.replace('.','_') filename = filename.replace('-','_') filename = filename.lower() name = "convert_" + filename if webgl_mode: name = name + "_webgl" output = asset['path'].replace('convert_', '')...
c1d68e3887ce83ecb89b20fecb5dfaec4e243be3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/c1d68e3887ce83ecb89b20fecb5dfaec4e243be3/samples_gen.py
output_file.write(" '<(_outputs)',\n")
if webgl_mode: output_file.write(" '%s',\n" % output_tgz) else: output_file.write(" '<(_outputs)',\n")
def write_action(asset, webgl_mode): filename = posixpath.splitext(posixpath.basename(asset['path']))[0] filename = filename.replace('.','_') filename = filename.replace('-','_') filename = filename.lower() name = "convert_" + filename if webgl_mode: name = name + "_webgl" output = asset['path'].replace('convert_', '')...
c1d68e3887ce83ecb89b20fecb5dfaec4e243be3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/c1d68e3887ce83ecb89b20fecb5dfaec4e243be3/samples_gen.py
proc = subprocess.Popen(['git'] + command, stdout=subprocess.PIPE)
shell = (os.name == 'nt') proc = subprocess.Popen(['git'] + command, shell=shell, stdout=subprocess.PIPE)
def RunGit(command): """Run a git subcommand, returning its output.""" proc = subprocess.Popen(['git'] + command, stdout=subprocess.PIPE) return proc.communicate()[0].strip()
518e0028821eee26f7f22ed40e99e5ab0f588578 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/518e0028821eee26f7f22ed40e99e5ab0f588578/sync-webkit-git.py
'--pretty=medium', 'origin'],
'--pretty=medium', 'origin'], shell=shell,
def FindSVNRev(target_rev): """Map an SVN revision to a git hash. Like 'git svn find-rev' but without the git-svn bits.""" # We iterate through the commit log looking for "git-svn-id" lines, # which contain the SVN revision of that commit. We can stop once # we've found our target (or hit a revision number lower than...
518e0028821eee26f7f22ed40e99e5ab0f588578 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/518e0028821eee26f7f22ed40e99e5ab0f588578/sync-webkit-git.py
self.assertEqual('Popup Success!', blocked_popups[0]['title'])
def testPopupBlockerEnabled(self): """Verify popup blocking is enabled.""" self.assertFalse(self.GetBlockedPopupsInfo(), msg='Should have no blocked popups on startup') file_url = self.GetFileURLForPath(os.path.join( self.DataDir(), 'popup_blocker', 'popup-blocked-to-post-blank.html')) self.NavigateToURL(file_url) bloc...
ff79e1e9eda961f16315b0811f544ff39a085664 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ff79e1e9eda961f16315b0811f544ff39a085664/popups.py
'<a href="http://localhost:8888/echo">back to referring page</a></div>'
'<a href="/echo">back to referring page</a></div>'
def EchoAllHandler(self): """This handler yields a (more) human-readable page listing information about the request header & contents."""
b1364e081e9a5c511778fec70e77a599995bfb01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b1364e081e9a5c511778fec70e77a599995bfb01/testserver.py
print 'HTTPS server started on port %d...' % port
print 'HTTPS server started on port %d...' % server.server_port
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
b1364e081e9a5c511778fec70e77a599995bfb01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b1364e081e9a5c511778fec70e77a599995bfb01/testserver.py
print 'HTTP server started on port %d...' % port
print 'HTTP server started on port %d...' % server.server_port
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
b1364e081e9a5c511778fec70e77a599995bfb01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b1364e081e9a5c511778fec70e77a599995bfb01/testserver.py
listen_port = server.server_port
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
b1364e081e9a5c511778fec70e77a599995bfb01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b1364e081e9a5c511778fec70e77a599995bfb01/testserver.py
print 'FTP server started on port %d...' % port
listen_port = server.socket.getsockname()[1] print 'FTP server started on port %d...' % listen_port
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
b1364e081e9a5c511778fec70e77a599995bfb01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b1364e081e9a5c511778fec70e77a599995bfb01/testserver.py
startup_pipe.write("READY")
startup_pipe.write(struct.pack('@H', listen_port))
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
b1364e081e9a5c511778fec70e77a599995bfb01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b1364e081e9a5c511778fec70e77a599995bfb01/testserver.py
option_parser.add_option('', '--port', default='8888', type='int', help='Port used by the server.')
option_parser.add_option('', '--port', default='0', type='int', help='Port used by the server. If unspecified, the ' 'server will listen on an ephemeral port.')
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
b1364e081e9a5c511778fec70e77a599995bfb01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b1364e081e9a5c511778fec70e77a599995bfb01/testserver.py
if len(args) != 1: print 'You must provide only one argument: path to the test binary'
if not args: print 'You must provide path to the test binary'
def main(argv): parser = optparse.OptionParser() parser.add_option("--shards", type="int", dest="shards", default=10) options, args = parser.parse_args(argv) if len(args) != 1: print 'You must provide only one argument: path to the test binary' return 1 launchers = [] for shard in range(options.shards): launcher = ...
5fbea88f423de6096b2f5e3ebef8c2cd14678266 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5fbea88f423de6096b2f5e3ebef8c2cd14678266/parallel_launcher.py
launcher = TestLauncher(args[0], args[0], options.shards, shard)
launcher = TestLauncher(args, args[0], options.shards, shard)
def main(argv): parser = optparse.OptionParser() parser.add_option("--shards", type="int", dest="shards", default=10) options, args = parser.parse_args(argv) if len(args) != 1: print 'You must provide only one argument: path to the test binary' return 1 launchers = [] for shard in range(options.shards): launcher = ...
5fbea88f423de6096b2f5e3ebef8c2cd14678266 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5fbea88f423de6096b2f5e3ebef8c2cd14678266/parallel_launcher.py
self.KillHandler,
def __init__(self, request, client_address, socket_server): self._connect_handlers = [ self.RedirectConnectHandler, self.ServerAuthConnectHandler, self.DefaultConnectResponseHandler] self._get_handlers = [ self.KillHandler, self.NoCacheMaxAgeTimeHandler, self.NoCacheTimeHandler, self.CacheTimeHandler, self.CacheExpires...
814d8c519498ba4f6ab732363a6f66cc5da8a33c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/814d8c519498ba4f6ab732363a6f66cc5da8a33c/testserver.py
def KillHandler(self): """This request handler kills the server, for use when we're done" with the a particular test.""" if (self.path.find("kill") < 0): return False self.send_response(200) self.send_header('Content-type', 'text/html') self.send_header('Cache-Control', 'max-age=0') self.end_headers() if options.neve...
def KillHandler(self): """This request handler kills the server, for use when we're done" with the a particular test."""
814d8c519498ba4f6ab732363a6f66cc5da8a33c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/814d8c519498ba4f6ab732363a6f66cc5da8a33c/testserver.py
def line_logger(msg): if (msg.find("kill") >= 0): server.stop = True print 'shutting down server' sys.exit(0)
def line_logger(msg): if (msg.find("kill") >= 0): server.stop = True print 'shutting down server' sys.exit(0)
814d8c519498ba4f6ab732363a6f66cc5da8a33c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/814d8c519498ba4f6ab732363a6f66cc5da8a33c/testserver.py
pyftpdlib.ftpserver.logline = line_logger
def line_logger(msg): if (msg.find("kill") >= 0): server.stop = True print 'shutting down server' sys.exit(0)
814d8c519498ba4f6ab732363a6f66cc5da8a33c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/814d8c519498ba4f6ab732363a6f66cc5da8a33c/testserver.py
option_parser.add_option('', '--never-die', default=False, action="store_true", help='Prevent the server from dying when visiting ' 'a /kill URL. Useful for manually running some ' 'tests.')
def line_logger(msg): if (msg.find("kill") >= 0): server.stop = True print 'shutting down server' sys.exit(0)
814d8c519498ba4f6ab732363a6f66cc5da8a33c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/814d8c519498ba4f6ab732363a6f66cc5da8a33c/testserver.py
if (%(id)s != 0) { %(lc_type)s_id_allocator_.MarkAsUsed(%(id)s); }
%(lc_type)s_id_handler_->MarkAsUsedForBind(%(id)s);
def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention.""" impl_func = func.GetInfo('impl_func') impl_decl = func.GetInfo('impl_decl') if (func.can_auto_generate and (impl_func == None or impl_func == True) and (impl_decl == None or impl_decl == True)): file.Write("%s %s(%s) {\n" % (func...
4c88460a7b91becd0096dcec4b3ba1338a49bc73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/4c88460a7b91becd0096dcec4b3ba1338a49bc73/build_gles2_cmd_buffer.py
MakeIds(&%(resource_type)s_id_allocator_, %(args)s);
%(resource_type)s_id_handler_->MakeIds(0, %(args)s);
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" code = """%(return_type)s %(name)s(%(typed_args)s) {
4c88460a7b91becd0096dcec4b3ba1338a49bc73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/4c88460a7b91becd0096dcec4b3ba1338a49bc73/build_gles2_cmd_buffer.py
file.Write(" MakeIds(&program_and_shader_id_allocator_, 1, &client_id);\n")
file.Write(" program_and_shader_id_handler_->MakeIds(0, 1, &client_id);\n")
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" GLuint client_id;\n") file.Write(" MakeIds(&program_and_shader_id_allocator_, 1, &client_id);\n") file.Write("...
4c88460a7b91becd0096dcec4b3ba1338a49bc73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/4c88460a7b91becd0096dcec4b3ba1338a49bc73/build_gles2_cmd_buffer.py
file.Write(" FreeIds(&%s_id_allocator_, %s);\n" %
file.Write(" %s_id_handler_->FreeIds(%s);\n" %
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" FreeIds(&%s_id_allocator_, %s)...
4c88460a7b91becd0096dcec4b3ba1338a49bc73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/4c88460a7b91becd0096dcec4b3ba1338a49bc73/build_gles2_cmd_buffer.py
module_dir = os.path.join(self._source_dir, module) self._data_dirs = [path_utils.ScriptDir()] if module == "chrome": self._data_dirs.append(os.path.join(module_dir, "test", "data", "valgrind")) else: self._data_dirs.append(os.path.join(module_dir, "data", "valgrind"))
def _DefaultCommand(self, tool, module, exe=None, valgrind_test_args=None): '''Generates the default command array that most tests will use.''' module_dir = os.path.join(self._source_dir, module)
d35297c058de3a3b67fa5f3676e7a2532504540b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/d35297c058de3a3b67fa5f3676e7a2532504540b/chrome_tests.py
for directory in self._data_dirs: tool_name = tool.ToolName(); suppression_file = os.path.join(directory, "%s/suppressions.txt" % tool_name) if os.path.exists(suppression_file): cmd.append("--suppressions=%s" % suppression_file) for suppression_platform in common.PlatformNames(): suppression_file_platform = \ os.path....
script_dir = path_utils.ScriptDir() tool_name = tool.ToolName(); suppression_file = os.path.join(script_dir, tool_name, "suppressions.txt") if os.path.exists(suppression_file): cmd.append("--suppressions=%s" % suppression_file) for platform in common.PlatformNames(): platform_suppression_file = \ os.path.join(scri...
def _DefaultCommand(self, tool, module, exe=None, valgrind_test_args=None): '''Generates the default command array that most tests will use.''' module_dir = os.path.join(self._source_dir, module)
d35297c058de3a3b67fa5f3676e7a2532504540b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/d35297c058de3a3b67fa5f3676e7a2532504540b/chrome_tests.py
for directory in self._data_dirs: gtest_filter_files = [ os.path.join(directory, name + ".gtest.txt"), os.path.join(directory, name + ".gtest-%s.txt" % \ tool.ToolName())] for platform_suffix in common.PlatformNames(): gtest_filter_files += [ os.path.join(directory, name + ".gtest_%s.txt" % platform_suffix), os.path.jo...
gtest_files_dir = os.path.join(path_utils.ScriptDir(), "gtest_exclude") gtest_filter_files = [ os.path.join(gtest_files_dir, name + ".gtest.txt"), os.path.join(gtest_files_dir, name + ".gtest-%s.txt" % tool.ToolName())] for platform_suffix in common.PlatformNames(): gtest_filter_files += [ os.path.join(gtest_files_dir...
def _ReadGtestFilterFile(self, tool, name, cmd): '''Read a file which is a list of tests to filter out with --gtest_filter and append the command-line option to cmd. ''' filters = [] for directory in self._data_dirs: gtest_filter_files = [ os.path.join(directory, name + ".gtest.txt"), os.path.join(directory, name + ".g...
d35297c058de3a3b67fa5f3676e7a2532504540b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/d35297c058de3a3b67fa5f3676e7a2532504540b/chrome_tests.py
(len(parts[ii]) > 0 and not parts[ii][0] == ")")
(len(parts[ii]) > 0 and not parts[ii][0] == ")" and not fptr.match(parts[ii]))
def __FindSplit(self, string): """Finds a place to split a string.""" splitter = string.find('=') if splitter >= 0 and not string[splitter + 1] == '=' and splitter < 80: return splitter parts = string.split('(') if len(parts) > 1: splitter = len(parts[0]) for ii in range(1, len(parts)): if (not parts[ii - 1][-3:] == "i...
8549b9f45547e09f8d1fc9cae1f9eb51438bfd38 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8549b9f45547e09f8d1fc9cae1f9eb51438bfd38/build_gles2_cmd_buffer.py
def __init__(self, filename, file_comment = None):
def __init__(self, filename, file_comment = None, guard_depth = None):
def __init__(self, filename, file_comment = None): CWriter.__init__(self, filename)
8549b9f45547e09f8d1fc9cae1f9eb51438bfd38 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8549b9f45547e09f8d1fc9cae1f9eb51438bfd38/build_gles2_cmd_buffer.py
base = os.path.dirname( os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) hpath = os.path.abspath(filename)[len(base) + 1:]
if guard_depth == None: hpath = os.path.relpath(filename) else: base = os.path.abspath(filename) for i in xrange(0, guard_depth): base = os.path.dirname(base) hpath = os.path.relpath(base)
def __init__(self, filename, file_comment = None): CWriter.__init__(self, filename)
8549b9f45547e09f8d1fc9cae1f9eb51438bfd38 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8549b9f45547e09f8d1fc9cae1f9eb51438bfd38/build_gles2_cmd_buffer.py
file.Write("}\n");
file.Write("}\n\n");
def WriteServiceUtilsImplementation(self, filename): """Writes the gles2 auto generated utility implementation.""" file = CHeaderWriter(filename) enums = sorted(_ENUM_LISTS.keys()) for enum in enums: if len(_ENUM_LISTS[enum]['valid']) > 0: file.Write("static %s valid_%s_table[] = {\n" % (_ENUM_LISTS[enum]['type'], ToUn...
8549b9f45547e09f8d1fc9cae1f9eb51438bfd38 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8549b9f45547e09f8d1fc9cae1f9eb51438bfd38/build_gles2_cmd_buffer.py
gen.WriteCommandIds("common/gles2_cmd_ids_autogen.h") gen.WriteFormat("common/gles2_cmd_format_autogen.h") gen.WriteFormatTest("common/gles2_cmd_format_test_autogen.h") gen.WriteGLES2ImplementationHeader("client/gles2_implementation_autogen.h") gen.WriteGLES2CLibImplementation("client/gles2_c_lib_autogen.h") gen.WriteC...
if options.alternate_mode == "ppapi": gen.WritePepperGLES2Interface("ppapi/c/ppb_opengles.h") elif options.alternate_mode == "chrome_ppapi": gen.WritePepperGLES2Implementation("webkit/glue/plugins/pepper_graphics_3d_gl.cc") else: gen.WriteCommandIds("common/gles2_cmd_ids_autogen.h") gen.WriteFormat("common/gles2_cmd...
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 ...
8549b9f45547e09f8d1fc9cae1f9eb51438bfd38 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8549b9f45547e09f8d1fc9cae1f9eb51438bfd38/build_gles2_cmd_buffer.py
self.AddFunction(f) f.type_handler.AddImmediateFunction(self, f) f.type_handler.AddBucketFunction(self, f)
gen_cmd = f.GetInfo('gen_cmd') if gen_cmd == True or gen_cmd == None: self.AddFunction(f) f.type_handler.AddImmediateFunction(self, f) f.type_handler.AddBucketFunction(self, f)
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...
ee42ed4a69c7e3b162746340666f981a90cdd8be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ee42ed4a69c7e3b162746340666f981a90cdd8be/build_gles2_cmd_buffer.py
if not func.name in _CMD_ID_TABLE: self.Error("Command %s not in _CMD_ID_TABLE" % func.name) by_id[_CMD_ID_TABLE[func.name]] = func
if True: if not func.name in _CMD_ID_TABLE: self.Error("Command %s not in _CMD_ID_TABLE" % func.name) by_id[_CMD_ID_TABLE[func.name]] = func
def WriteCommandIds(self, filename): """Writes the command buffer format""" file = CHeaderWriter(filename) file.Write("#define GLES2_COMMAND_LIST(OP) \\\n") by_id = {} for func in self.functions: if not func.name in _CMD_ID_TABLE: self.Error("Command %s not in _CMD_ID_TABLE" % func.name) by_id[_CMD_ID_TABLE[func.name]]...
ee42ed4a69c7e3b162746340666f981a90cdd8be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ee42ed4a69c7e3b162746340666f981a90cdd8be/build_gles2_cmd_buffer.py
func.WriteStruct(file)
if True: func.WriteStruct(file)
def WriteFormat(self, filename): """Writes the command buffer format""" file = CHeaderWriter(filename) for func in self.functions: func.WriteStruct(file) file.Write("\n") file.Close()
ee42ed4a69c7e3b162746340666f981a90cdd8be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ee42ed4a69c7e3b162746340666f981a90cdd8be/build_gles2_cmd_buffer.py
func.WriteDocs(file)
if True: func.WriteDocs(file)
def WriteDocs(self, filename): """Writes the command buffer doc version of the commands""" file = CWriter(filename) for func in self.functions: func.WriteDocs(file) file.Write("\n") file.Close()
ee42ed4a69c7e3b162746340666f981a90cdd8be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ee42ed4a69c7e3b162746340666f981a90cdd8be/build_gles2_cmd_buffer.py
func.WriteFormatTest(file)
if True: func.WriteFormatTest(file)
def WriteFormatTest(self, filename): """Writes the command buffer format test.""" file = CHeaderWriter( filename, "// This file contains unit tests for gles2 commmands\n" "// It is included by gles2_cmd_format_test.cc\n" "\n")
ee42ed4a69c7e3b162746340666f981a90cdd8be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ee42ed4a69c7e3b162746340666f981a90cdd8be/build_gles2_cmd_buffer.py
if not func.name in _CMD_ID_TABLE: self.Error("Command %s not in _CMD_ID_TABLE" % func.name) file.Write(" COMPILE_ASSERT(%s::kCmdId == %d,\n" % (func.name, _CMD_ID_TABLE[func.name])) file.Write(" GLES2_%s_kCmdId_mismatch);\n" % func.name)
if True: if not func.name in _CMD_ID_TABLE: self.Error("Command %s not in _CMD_ID_TABLE" % func.name) file.Write(" COMPILE_ASSERT(%s::kCmdId == %d,\n" % (func.name, _CMD_ID_TABLE[func.name])) file.Write(" GLES2_%s_kCmdId_mismatch);\n" % func.name)
def WriteCommandIdTest(self, filename): """Writes the command id test.""" file = CHeaderWriter( filename, "// This file contains unit tests for gles2 commmand ids\n")
ee42ed4a69c7e3b162746340666f981a90cdd8be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ee42ed4a69c7e3b162746340666f981a90cdd8be/build_gles2_cmd_buffer.py
func.WriteCmdHelper(file)
if True: func.WriteCmdHelper(file)
def WriteCmdHelperHeader(self, filename): """Writes the gles2 command helper.""" file = CHeaderWriter(filename)
ee42ed4a69c7e3b162746340666f981a90cdd8be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ee42ed4a69c7e3b162746340666f981a90cdd8be/build_gles2_cmd_buffer.py
func.WriteServiceImplementation(file)
if True: func.WriteServiceImplementation(file)
def WriteServiceImplementation(self, filename): """Writes the service decorder implementation.""" file = CHeaderWriter( filename, "// It is included by gles2_cmd_decoder.cc\n")
ee42ed4a69c7e3b162746340666f981a90cdd8be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ee42ed4a69c7e3b162746340666f981a90cdd8be/build_gles2_cmd_buffer.py
if func.GetInfo('unit_test') == False: file.Write("// TODO(gman): %s\n" % func.name) else: func.WriteServiceUnitTest(file)
if True: if func.GetInfo('unit_test') == False: file.Write("// TODO(gman): %s\n" % func.name) else: func.WriteServiceUnitTest(file)
def WriteServiceUnitTests(self, filename): """Writes the service decorder unit tests.""" 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...
ee42ed4a69c7e3b162746340666f981a90cdd8be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ee42ed4a69c7e3b162746340666f981a90cdd8be/build_gles2_cmd_buffer.py
def __str__(self): return 'Failed with code %s: %s' % (self.message, repr(self.error_code))
225aef4d1775945ef3f069dfdc5404a00cc0ce10 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/225aef4d1775945ef3f069dfdc5404a00cc0ce10/generate_stubs.py
return STUB_FUNCTION_DEFINITION % { 'return_type': signature['return_type'], 'name': signature['name'], 'params': ', '.join(signature['params']), 'return_prefix': return_prefix, 'arg_list': arg_list}
if arg_list != '' and len(arguments) > 1 and arguments[-1] == '...': if return_prefix != '': return VARIADIC_STUB_FUNCTION_DEFINITION % { 'return_type': signature['return_type'], 'name': signature['name'], 'params': ', '.join(signature['params']), 'arg_list': ', '.join(arguments[0:-1]), 'last_named_arg': arguments[-2]...
def StubFunction(cls, signature): """Generates a stub function definition for the given signature.
225aef4d1775945ef3f069dfdc5404a00cc0ce10 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/225aef4d1775945ef3f069dfdc5404a00cc0ce10/generate_stubs.py
from pyautolib import PyUITestSuite
from pyautolib import *
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...
91d88f75702697b806923a4a8245d52499c57873 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/91d88f75702697b806923a4a8245d52499c57873/pyauto.py
self.WaitForNotificationCount(1) self._CreateHTMLNotification(self.NO_SUCH_URL2, 'chat')
def testNotificationReplacement(self): """Test that we can replace a notification using the replaceId.""" self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) self._CreateHTMLNotification(self.NO_SUCH_URL, 'chat') self.WaitForNotificationCount(1) self._CreateHTMLNotification(self.NO_SUCH_URL2, 'chat') notific...
fa5f9112a4ab829b8153e2427e24f85e8c16cc79 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fa5f9112a4ab829b8153e2427e24f85e8c16cc79/notifications.py
self.assertEquals(self.NO_SUCH_URL2, notifications[0]['content_url'])
self.assertEquals(self.NO_SUCH_URL, notifications[0]['content_url'])
def testNotificationReplacement(self): """Test that we can replace a notification using the replaceId.""" self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) self._CreateHTMLNotification(self.NO_SUCH_URL, 'chat') self.WaitForNotificationCount(1) self._CreateHTMLNotification(self.NO_SUCH_URL2, 'chat') notific...
fa5f9112a4ab829b8153e2427e24f85e8c16cc79 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fa5f9112a4ab829b8153e2427e24f85e8c16cc79/notifications.py
PermanentItem('google_chrome_extensions', name='Extensions', parent_tag='google_chrome', sync_type=EXTENSIONS), PermanentItem('google_chrome_passwords', name='Passwords', parent_tag='google_chrome', sync_type=PASSWORD),
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
169156b2f729dd209ab7154e5569e27f784948be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/169156b2f729dd209ab7154e5569e27f784948be/chromiumsync.py
continue if line == '{': skip_next_line = True
def CheckChange(input_api, output_api): """Checks the memcheck suppressions files for bad data.""" errors = [] skip_next_line = False func_re = input_api.re.compile('[a-z_.]+\(.+\)$') for f, line_num, line in input_api.RightHandSideLines(lambda x: x.LocalPath().endswith('.txt')): line = line.lstrip() if line.startswith...
515cd121c6eefe82e0017073815cb5ceecf0d030 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/515cd121c6eefe82e0017073815cb5ceecf0d030/PRESUBMIT.py
proc = subprocess.Popen(['git'] + command, shell=shell, stdout=subprocess.PIPE) return proc.communicate()[0].strip()
proc = subprocess.Popen(command, shell=shell, stdout=subprocess.PIPE) out = proc.communicate()[0].strip() logging.info('Returned "%s"' % out) return out
def RunGit(command): """Run a git subcommand, returning its output.""" # On Windows, use shell=True to get PATH interpretation. shell = (os.name == 'nt') proc = subprocess.Popen(['git'] + command, shell=shell, stdout=subprocess.PIPE) return proc.communicate()[0].strip()
44352fb92c99120b312967481ebe6e000b76bfa4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/44352fb92c99120b312967481ebe6e000b76bfa4/sync-webkit-git.py
log = subprocess.Popen(['git', 'log', '--no-color', '--first-parent', '--pretty=medium', 'origin'], shell=(os.name == 'nt'), stdout=subprocess.PIPE)
cmd = ['git', 'log', '--no-color', '--first-parent', '--pretty=medium', 'origin/master'] logging.info(' '.join(cmd)) log = subprocess.Popen(cmd, shell=(os.name == 'nt'), stdout=subprocess.PIPE)
def FindSVNRev(target_rev): """Map an SVN revision to a git hash. Like 'git svn find-rev' but without the git-svn bits.""" # We iterate through the commit log looking for "git-svn-id" lines, # which contain the SVN revision of that commit. We can stop once # we've found our target (or hit a revision number lower than...
44352fb92c99120b312967481ebe6e000b76bfa4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/44352fb92c99120b312967481ebe6e000b76bfa4/sync-webkit-git.py
path_utils.PlatformName(), options.target == 'Debug')
path_utils.PlatformName(), self._options.target == 'Debug')
def PrepareListsAndPrintOutput(self, write): """Create appropriate subsets of test lists and returns a ResultSummary object. Also prints expected test counts.
ea941151f3bec1e0a60138f7d9a162ee9bd93434 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ea941151f3bec1e0a60138f7d9a162ee9bd93434/run_chromium_webkit_tests.py
startup_pipe.write(struct.pack('@H', listen_port))
startup_pipe.write(struct.pack('=L', server_data_len)) startup_pipe.write(server_data_json)
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
d3f157dd265ecc1d71b7556d2bd2ae491f6646ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/d3f157dd265ecc1d71b7556d2bd2ae491f6646ee/testserver.py
except:
except SQLExecutionError:
def testDeleteNonexistentRow(self): """Attempts to delete a nonexistent row in the table.""" self.NavigateToURL(self.TEST_PAGE_URL) self._CreateTable() self._InsertRecord('text') did_throw_exception = False try: self._DeleteRecord(1) except: did_throw_exception = True self.assertTrue(did_throw_exception) self.assertEqu...
a41c3ac6f7e48ac6751e1b3a750b52eacc911ff1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a41c3ac6f7e48ac6751e1b3a750b52eacc911ff1/databases.py
can_read_regular_database = False try: if len(self._GetRecords(windex=1)) == 1: can_read_regular_database = True except SQLExecutionError: pass self.assertFalse(can_read_regular_database) self._CreateTable(windex=1) self.assertEqual(0, len(self._GetRecords(windex=1)))
self.assertFalse(self._HasTable(windex=1)) self._CreateTable(windex=1) self.assertFalse(self._GetRecords(windex=1))
def testIncognitoCannotReadRegularDatabase(self): """Attempt to read a database created in a regular browser from an incognito browser. """ self.NavigateToURL(self.TEST_PAGE_URL) self._CreateTable() self._InsertRecord('text') self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW) self.NavigateToURL(self.TEST_PAGE_URL, 1, 0) ...
a41c3ac6f7e48ac6751e1b3a750b52eacc911ff1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a41c3ac6f7e48ac6751e1b3a750b52eacc911ff1/databases.py
can_read_incognito_database = False try: if len(self._GetRecords()) == 1: can_read_incognito_database = True except SQLExecutionError: pass self.assertFalse(can_read_incognito_database)
self.assertFalse(self._HasTable()) self._CreateTable() self.assertFalse(self._GetRecords())
def testRegularCannotReadIncognitoDatabase(self): """Attempt to read a database created in an incognito browser from a regular browser. """ self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW) self.NavigateToURL(self.TEST_PAGE_URL, 1, 0) self._CreateTable(windex=1) self._InsertRecord('text', windex=1)
a41c3ac6f7e48ac6751e1b3a750b52eacc911ff1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a41c3ac6f7e48ac6751e1b3a750b52eacc911ff1/databases.py
'%s seems to contain a definition of DllRegisterServer.\n'
'%s contains a definition of DllRegisterServer at line %s.\n'
def CheckNoDllRegisterServer(input_api, output_api): for f, line_num, line in input_api.RightHandSideLines(): if DLL_REGISTER_SERVER_RE.search(line): file_name = os.path.basename(f.LocalPath()) if file_name not in ['install_utils.h', 'install_utils_unittest.cc']: return [output_api.PresubmitError( '%s seems to contain ...
cbd33c4268f30f01274582ebe0becc6b9e643fa5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/cbd33c4268f30f01274582ebe0becc6b9e643fa5/ceee_presubmit.py
f.LocalPath())]
(f.LocalPath(), line_num))]
def CheckNoDllRegisterServer(input_api, output_api): for f, line_num, line in input_api.RightHandSideLines(): if DLL_REGISTER_SERVER_RE.search(line): file_name = os.path.basename(f.LocalPath()) if file_name not in ['install_utils.h', 'install_utils_unittest.cc']: return [output_api.PresubmitError( '%s seems to contain ...
cbd33c4268f30f01274582ebe0becc6b9e643fa5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/cbd33c4268f30f01274582ebe0becc6b9e643fa5/ceee_presubmit.py
arg.WriteClientSideValidationCode(file)
arg.WriteClientSideValidationCode(file, func)
def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention.""" impl_func = func.GetInfo('impl_func') impl_decl = func.GetInfo('impl_decl') if (func.can_auto_generate and (impl_func == None or impl_func == True) and (impl_decl == None or impl_decl == True)): file.Write("%s %s(%s) {\n" % (func...
bda273cb982a1cc60958aa574bc939271a82f552 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/bda273cb982a1cc60958aa574bc939271a82f552/build_gles2_cmd_buffer.py
arg.WriteClientSideValidationCode(file)
arg.WriteClientSideValidationCode(file, func)
def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention.""" impl_func = func.GetInfo('impl_func') impl_decl = func.GetInfo('impl_decl') if (func.can_auto_generate and (impl_func == None or impl_func == True) and (impl_decl == None or impl_decl == True)): file.Write("%s %s(%s) {\n" % (func...
bda273cb982a1cc60958aa574bc939271a82f552 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/bda273cb982a1cc60958aa574bc939271a82f552/build_gles2_cmd_buffer.py
SetGLError(GL_INVALID_OPERATION);
SetGLError(GL_INVALID_OPERATION, "%(name)s: %(id)s reserved id");
def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention.""" impl_func = func.GetInfo('impl_func') impl_decl = func.GetInfo('impl_decl') if (func.can_auto_generate and (impl_func == None or impl_func == True) and (impl_decl == None or impl_decl == True)): file.Write("%s %s(%s) {\n" % (func...
bda273cb982a1cc60958aa574bc939271a82f552 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/bda273cb982a1cc60958aa574bc939271a82f552/build_gles2_cmd_buffer.py
SetGLError(GL_INVALID_ENUM);
SetGLError(GL_INVALID_ENUM, "gl%(func_name)s: invalid enum");
code = """ typedef %(func_name)s::Result Result;
bda273cb982a1cc60958aa574bc939271a82f552 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/bda273cb982a1cc60958aa574bc939271a82f552/build_gles2_cmd_buffer.py