rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
(filename, e.errno, e.strerror)) | (filename, e.errno, e.strerror)) | def ReadFile(filename): try: file = open(filename, 'r') except IOError, e: print >> sys.stderr, ('I/O Error reading file %s(%s): %s' % (filename, e.errno, e.strerror)) raise e if not file: return None contents = file.read() file.close() return contents | 2611fae0fc9831e6c5f2d0b8b1b2caefda76749c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/2611fae0fc9831e6c5f2d0b8b1b2caefda76749c/make_expectations.py |
if not file: return None | def ReadFile(filename): try: file = open(filename, 'r') except IOError, e: print >> sys.stderr, ('I/O Error reading file %s(%s): %s' % (filename, e.errno, e.strerror)) raise e if not file: return None contents = file.read() file.close() return contents | 2611fae0fc9831e6c5f2d0b8b1b2caefda76749c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/2611fae0fc9831e6c5f2d0b8b1b2caefda76749c/make_expectations.py | |
pdf_files_path = os.path.join(self.DataDir(), 'pyauto_private', 'pdf') | pdf_files_path = os.path.join(self.DataDir(), 'plugin', 'pdf') | def testPDFRunner(self): """Navigate to pdf files and verify that browser doesn't crash""" # bail out if not a branded build properties = self.GetBrowserInfo()['properties'] if properties['branding'] != 'Google Chrome': return pdf_files_path = os.path.join(self.DataDir(), 'pyauto_private', 'pdf') pdf_files = glob.glob(... | 0f3a714d221bd73f36bc3a9c21230668a3649740 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0f3a714d221bd73f36bc3a9c21230668a3649740/pdf.py |
samples.sort(lambda x,y: cmp(x['name'].upper(), y['name'].upper())) | def compareSamples(sample1, sample2): """ Compares two samples as a sort comparator, by name then path. """ value = cmp(sample1['name'].upper(), sample2['name'].upper()) if value == 0: value = cmp(sample1['path'], sample2['path']) return value samples.sort(compareSamples) | def _parseManifestData(self, manifest_paths, api_manifest): """ Returns metadata about the sample extensions given their manifest paths. | 990414a5ad56d1cd0aeb691b4f06b9460c058921 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/990414a5ad56d1cd0aeb691b4f06b9460c058921/directory.py |
def __init__(self, server_address, request_hander_class, cert_path): | def __init__(self, server_address, request_hander_class, cert_path, ssl_client_auth): | def __init__(self, server_address, request_hander_class, cert_path): s = open(cert_path).read() x509 = tlslite.api.X509() x509.parse(s) self.cert_chain = tlslite.api.X509CertChain([x509]) s = open(cert_path).read() self.private_key = tlslite.api.parsePEMKey(s, private=True) | b940ded2f8be403e1d19cc628d74d0ca83312dde /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b940ded2f8be403e1d19cc628d74d0ca83312dde/testserver.py |
sessionCache=self.session_cache) | sessionCache=self.session_cache, reqCert=self.ssl_client_auth) | def handshake(self, tlsConnection): """Creates the SSL connection.""" try: tlsConnection.handshakeServer(certChain=self.cert_chain, privateKey=self.private_key, sessionCache=self.session_cache) tlsConnection.ignoreAbruptClose = True return True except tlslite.api.TLSError, error: print "Handshake failure:", str(error) ... | b940ded2f8be403e1d19cc628d74d0ca83312dde /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b940ded2f8be403e1d19cc628d74d0ca83312dde/testserver.py |
server = HTTPSServer(('127.0.0.1', port), TestPageHandler, options.cert) | server = HTTPSServer(('127.0.0.1', port), TestPageHandler, options.cert, options.ssl_client_auth) | def main(options, args): # redirect output to a log file so it doesn't spam the unit test output logfile = open('testserver.log', 'w') sys.stderr = sys.stdout = logfile port = options.port # Try to free up the port if there's an orphaned old instance. TryKillingOldServer(port) if options.server_type == SERVER_HTTP: ... | b940ded2f8be403e1d19cc628d74d0ca83312dde /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b940ded2f8be403e1d19cc628d74d0ca83312dde/testserver.py |
metadata = ParseDir(path) | try: metadata = ParseDir(path) except LicenseError: print >>sys.stderr, ("WARNING: licensing info for " + path + " is incomplete, skipping.") continue | def EvaluateTemplate(template, env, escape=True): """Expand a template with variables like {{foo}} using a dictionary of expansions.""" for key, val in env.items(): if escape: val = cgi.escape(val) template = template.replace('{{%s}}' % key, val) return template | 0af039e4950a5fa1485e4c6c49e0af4614d98cf0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0af039e4950a5fa1485e4c6c49e0af4614d98cf0/licenses.py |
pyauto_utils.RemovePath(os.path.join(download_dir, name)) | self.files_to_remove.append(os.path.join(download_dir, name)) | def tearDown(self): # Cleanup all files we created in the download dir download_dir = self.GetDownloadDirectory().value() if os.path.isdir(download_dir): for name in os.listdir(download_dir): if name not in self._existing_downloads: pyauto_utils.RemovePath(os.path.join(download_dir, name)) pyauto.PyUITest.tearDown(self... | 82b82740e3826022b41e938416349ddd5caaf5cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/82b82740e3826022b41e938416349ddd5caaf5cc/downloads.py |
os.path.exists(file_path) and os.remove(file_path) | self.files_to_remove.append(file_path) | def testCancelDownload(self): """Verify that we can cancel a download.""" # Create a big file (250 MB) on the fly, so that the download won't finish # before being cancelled. file_path = self._MakeFile(2**28) file_url = self.GetFileURLForPath(file_path) downloaded_pkg = os.path.join(self.GetDownloadDirectory().value(),... | 82b82740e3826022b41e938416349ddd5caaf5cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/82b82740e3826022b41e938416349ddd5caaf5cc/downloads.py |
urllib.urlretrieve(download_url, BUILD_ZIP_NAME) | urllib.urlretrieve(download_url, BUILD_ZIP_NAME, _Reporthook) print | def TryRevision(rev, profile, args): """Downloads revision |rev|, unzips it, and opens it for the user to test. |profile| is the profile to use.""" # Do this in a temp dir so we don't collide with user files. cwd = os.getcwd() tempdir = tempfile.mkdtemp(prefix='bisect_tmp') os.chdir(tempdir) # Download the file. downl... | 6ad3b2f81e30b63588810b891ef17aa98afa9942 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/6ad3b2f81e30b63588810b891ef17aa98afa9942/build-bisect.py |
tombstone = sync_pb2.SyncEntity() tombstone.id_string = entry.id_string tombstone.deleted = True tombstone.name = '' entry = tombstone | def MakeTombstone(id_string): """Make a tombstone entry that will replace the entry being deleted. Args: id_string: Index of the SyncEntity to be deleted. Returns: A new SyncEntity reflecting the fact that the entry is deleted. """ tombstone = sync_pb2.SyncEntity() tombstone.id_string = id_string tombstone.deleted... | def CommitEntry(self, entry, cache_guid, commit_session): """Attempt to commit one entry to the user's account. | 36fd968ba8b27b494cf2b1665496c31a36826def /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/36fd968ba8b27b494cf2b1665496c31a36826def/chromiumsync.py |
def CommitEntry(self, entry, cache_guid, commit_session): """Attempt to commit one entry to the user's account. | 36fd968ba8b27b494cf2b1665496c31a36826def /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/36fd968ba8b27b494cf2b1665496c31a36826def/chromiumsync.py | ||
data = eval(raw_data.replace('null', 'None')) | patched_data = raw_data.replace('null', 'None') patched_data = patched_data.replace('false', 'False') patched_data = patched_data.replace('true', 'True') data = eval(patched_data) | def CheckPendingBuilds(input_api, output_api, url, max_pendings, ignored): try: connection = input_api.urllib2.urlopen(url) raw_data = connection.read() connection.close() try: import simplejson data = simplejson.loads(raw_data) except ImportError: # simplejson is much safer. But we should be just fine enough with that... | e181b21a9e65284ff9a8686b79261e92fe22b889 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e181b21a9e65284ff9a8686b79261e92fe22b889/PRESUBMIT.py |
server_data = { 'port': listen_port } server_data_json = json.dumps(server_data) debug('sending server_data: %s' % server_data_json) server_data_len = len(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... | 24571f4d2f036756d7661440d8db27f99d30aa5a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/24571f4d2f036756d7661440d8db27f99d30aa5a/testserver.py | |
startup_pipe.write(struct.pack('=L', server_data_len)) startup_pipe.write(server_data_json) | 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... | 24571f4d2f036756d7661440d8db27f99d30aa5a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/24571f4d2f036756d7661440d8db27f99d30aa5a/testserver.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... | a1ceb02d41f5956cad1d296c7215e34d78c8803f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a1ceb02d41f5956cad1d296c7215e34d78c8803f/testserver.py |
def CheckChangeOnUpload(input_api, output_api): | _LICENSE_HEADER = ( r".*? Copyright \(c\) 20\d\d The Chromium Authors\. All rights reserved\." "\n" r".*? Use of this source code is governed by a BSD-style license that can " "be\n" r".*? found in the LICENSE file\." "\n" ) def _CommonChecks(input_api, output_api): | def CheckChangeOnUpload(input_api, output_api): results = [] # What does this code do? # It loads the default black list (e.g. third_party, experimental, etc) and # add our black list (breakpad, skia and v8 are still not following # google style and are not really living this repository). # See presubmit_support.py Inp... | f92520aecd35259e11b9a675f1242d5ba575f834 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f92520aecd35259e11b9a675f1242d5ba575f834/PRESUBMIT.py |
black_list = input_api.DEFAULT_BLACK_LIST + EXCLUDED_PATHS sources = lambda x: input_api.FilterSourceFile(x, black_list=black_list) results.extend(input_api.canned_checks.CheckLongLines( input_api, output_api, sources)) results.extend(input_api.canned_checks.CheckChangeHasNoTabs( input_api, output_api, sources)) result... | results.extend(_CommonChecks(input_api, output_api)) | def CheckChangeOnCommit(input_api, output_api): results = [] black_list = input_api.DEFAULT_BLACK_LIST + EXCLUDED_PATHS sources = lambda x: input_api.FilterSourceFile(x, black_list=black_list) results.extend(input_api.canned_checks.CheckLongLines( input_api, output_api, sources)) results.extend(input_api.canned_checks.... | f92520aecd35259e11b9a675f1242d5ba575f834 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f92520aecd35259e11b9a675f1242d5ba575f834/PRESUBMIT.py |
self._indirect_analyze_results_file = "" | def __init__(self): BaseTool.__init__(self) self.RegisterOptionParserHook(ValgrindTool.ExtendOptionParser) self._indirect_analyze_results_file = "" | b91d8155e1de5888b96ea1b17ac5fce7d82773ca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b91d8155e1de5888b96ea1b17ac5fce7d82773ca/valgrind_test.py | |
def GetAnalyzeResultsIndirect(self): assert self._indirect_analyze_results_file != "" f = open(self._indirect_analyze_results_file) if f: if len([True for l in f.readlines() if "FAIL" in l]) > 0: logging.error("There were some Valgrind reports in the tests!") print "-----------------------------------------------------... | def GetAnalyzeResultsIndirect(self): assert self._indirect_analyze_results_file != "" f = open(self._indirect_analyze_results_file) if f: if len([True for l in f.readlines() if "FAIL" in l]) > 0: logging.error("There were some Valgrind reports in the tests!") print "-----------------------------------------------------... | b91d8155e1de5888b96ea1b17ac5fce7d82773ca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b91d8155e1de5888b96ea1b17ac5fce7d82773ca/valgrind_test.py | |
self._indirect_analyze_results_file = tempfile.mkstemp( dir=self.TMP_DIR, prefix="valgrind_analyze.", text=True)[1] analyze_script = os.path.join(self._source_dir, 'tools', 'valgrind', self.ToolName() + '_analyze.py') | def CreateBrowserWrapper(self, command, logfiles): """The program being run invokes Python or something else that can't stand to be valgrinded, and also invokes the Chrome browser. Set an environment variable to tell the program to prefix the Chrome commandline with a magic wrapper. Build the magic wrapper here. """ ... | b91d8155e1de5888b96ea1b17ac5fce7d82773ca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b91d8155e1de5888b96ea1b17ac5fce7d82773ca/valgrind_test.py | |
f.write('echo "Started Valgrind wrapper for this test, PID=$$"\n') | def CreateBrowserWrapper(self, command, logfiles): """The program being run invokes Python or something else that can't stand to be valgrinded, and also invokes the Chrome browser. Set an environment variable to tell the program to prefix the Chrome commandline with a magic wrapper. Build the magic wrapper here. """ ... | b91d8155e1de5888b96ea1b17ac5fce7d82773ca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b91d8155e1de5888b96ea1b17ac5fce7d82773ca/valgrind_test.py | |
f.write("EXITCODE=$?\n") logs_list = logfiles.replace("%p", "$$.*") f.write("python %s %s || echo FAIL >>%s\n" \ % (analyze_script, logs_list, self._indirect_analyze_results_file)) f.write("rm %s\n" % logs_list) f.write("exit $EXITCODE\n") | def CreateBrowserWrapper(self, command, logfiles): """The program being run invokes Python or something else that can't stand to be valgrinded, and also invokes the Chrome browser. Set an environment variable to tell the program to prefix the Chrome commandline with a magic wrapper. Build the magic wrapper here. """ ... | b91d8155e1de5888b96ea1b17ac5fce7d82773ca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b91d8155e1de5888b96ea1b17ac5fce7d82773ca/valgrind_test.py | |
if self._options.indirect: return self.GetAnalyzeResultsIndirect() filenames = glob.glob(self.TMP_DIR + "/memcheck.*") use_gdb = common.IsMac() analyzer = memcheck_analyze.MemcheckAnalyze(self._source_dir, filenames, self._options.show_all_leaks, use_gdb=use_gdb) ret = analyzer.Report(check_sanity) | ret = self.GetAnalyzeResults(check_sanity) | def Analyze(self, check_sanity=False): if self._options.indirect: return self.GetAnalyzeResultsIndirect() # Glob all the files in the "valgrind.tmp" directory filenames = glob.glob(self.TMP_DIR + "/memcheck.*") | b91d8155e1de5888b96ea1b17ac5fce7d82773ca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b91d8155e1de5888b96ea1b17ac5fce7d82773ca/valgrind_test.py |
def Analyze(self, check_sanity=False): filenames = glob.glob(self.TMP_DIR + "/tsan.*") use_gdb = common.IsMac() analyzer = tsan_analyze.TsanAnalyze(self._source_dir, filenames, use_gdb=use_gdb) ret = analyzer.Report(check_sanity) if ret != 0: logging.info("Please see http://dev.chromium.org/developers/how-tos/" "using-... | def Analyze(self, check_sanity=False): filenames = glob.glob(self.TMP_DIR + "/tsan.*") use_gdb = common.IsMac() analyzer = tsan_analyze.TsanAnalyze(self._source_dir, filenames, use_gdb=use_gdb) ret = analyzer.Report(check_sanity) if ret != 0: logging.info("Please see http://dev.chromium.org/developers/how-tos/" "using-... | b91d8155e1de5888b96ea1b17ac5fce7d82773ca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b91d8155e1de5888b96ea1b17ac5fce7d82773ca/valgrind_test.py | |
def Analyze(self, check_sanity=False): if self._options.indirect: return ValgrindTool.GetAnalyzeResultsIndirect(self) return ThreadSanitizerBase.Analyze(self, check_sanity) | def __init__(self): ValgrindTool.__init__(self) ThreadSanitizerBase.__init__(self) | b91d8155e1de5888b96ea1b17ac5fce7d82773ca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b91d8155e1de5888b96ea1b17ac5fce7d82773ca/valgrind_test.py | |
"--timeout=120000", | "--timeout=180000", | def TestUI(self): return self.SimpleTest("chrome", "ui_tests", valgrind_test_args=[ "--timeout=120000", "--trace_children", "--indirect"], cmd_args=[ "--ui-test-timeout=120000", "--ui-test-action-timeout=80000", "--ui-test-action-max-timeout=180000", "--ui-test-terminate-timeout=60000"]) | e14a345f15b4474f95c58904e17e5bda36d7313c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e14a345f15b4474f95c58904e17e5bda36d7313c/chrome_tests.py |
"--ui-test-timeout=120000", "--ui-test-action-timeout=80000", | "--ui-test-timeout=180000", "--ui-test-action-timeout=120000", | def TestUI(self): return self.SimpleTest("chrome", "ui_tests", valgrind_test_args=[ "--timeout=120000", "--trace_children", "--indirect"], cmd_args=[ "--ui-test-timeout=120000", "--ui-test-action-timeout=80000", "--ui-test-action-max-timeout=180000", "--ui-test-terminate-timeout=60000"]) | e14a345f15b4474f95c58904e17e5bda36d7313c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e14a345f15b4474f95c58904e17e5bda36d7313c/chrome_tests.py |
"--ui-test-terminate-timeout=60000"]) | "--ui-test-terminate-timeout=120000"]) | def TestUI(self): return self.SimpleTest("chrome", "ui_tests", valgrind_test_args=[ "--timeout=120000", "--trace_children", "--indirect"], cmd_args=[ "--ui-test-timeout=120000", "--ui-test-action-timeout=80000", "--ui-test-action-max-timeout=180000", "--ui-test-terminate-timeout=60000"]) | e14a345f15b4474f95c58904e17e5bda36d7313c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e14a345f15b4474f95c58904e17e5bda36d7313c/chrome_tests.py |
now = time.time() | def testForge(self): """Brief test of forging history items. | e50027fd002a1c4392a5b043a18480291b688c19 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e50027fd002a1c4392a5b043a18480291b688c19/history.py | |
'time': now}) | 'time': new_time}) | def testForge(self): """Brief test of forging history items. | e50027fd002a1c4392a5b043a18480291b688c19 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e50027fd002a1c4392a5b043a18480291b688c19/history.py |
self.assertTrue(abs(now - history[0]['time']) < 1.0) | self.assertTrue(abs(new_time - history[0]['time']) < 1.0) | def testForge(self): """Brief test of forging history items. | e50027fd002a1c4392a5b043a18480291b688c19 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e50027fd002a1c4392a5b043a18480291b688c19/history.py |
def _ClickTranslateUntilSuccess(self): | def _ClickTranslateUntilSuccess(self, window_index=0, tab_index=0): | def _ClickTranslateUntilSuccess(self): """Since the translate can fail due to server error, continue trying until it is successful or until it has tried too many times.""" max_tries = 10 curr_try = 0 while curr_try < max_tries and not self.ClickTranslateBarTranslate(): curr_try = curr_try + 1 if curr_try == 10: self.fa... | bc1c20e7d6c410e0e8422070d8abe3a8beaa3f5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/bc1c20e7d6c410e0e8422070d8abe3a8beaa3f5d/translate.py |
while curr_try < max_tries and not self.ClickTranslateBarTranslate(): | while (curr_try < max_tries and not self.ClickTranslateBarTranslate(window_index=window_index, tab_index=tab_index)): | def _ClickTranslateUntilSuccess(self): """Since the translate can fail due to server error, continue trying until it is successful or until it has tried too many times.""" max_tries = 10 curr_try = 0 while curr_try < max_tries and not self.ClickTranslateBarTranslate(): curr_try = curr_try + 1 if curr_try == 10: self.fa... | bc1c20e7d6c410e0e8422070d8abe3a8beaa3f5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/bc1c20e7d6c410e0e8422070d8abe3a8beaa3f5d/translate.py |
if curr_try == 10: | if curr_try == max_tries: | def _ClickTranslateUntilSuccess(self): """Since the translate can fail due to server error, continue trying until it is successful or until it has tried too many times.""" max_tries = 10 curr_try = 0 while curr_try < max_tries and not self.ClickTranslateBarTranslate(): curr_try = curr_try + 1 if curr_try == 10: self.fa... | bc1c20e7d6c410e0e8422070d8abe3a8beaa3f5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/bc1c20e7d6c410e0e8422070d8abe3a8beaa3f5d/translate.py |
self._NavigateAndWaitForBar(self._GetDefaultSpanishURL()) translate_info = self.GetTranslateInfo() self.assertTrue('translate_bar' in translate_info) self.SelectTranslateOption('toggle_always_translate') self._ClickTranslateUntilSuccess() | self.NavigateToURL("http://www.news.google.com") self.AppendTab(pyauto.GURL("http://www.google.com/webhp?hl=es")) self.WaitForInfobarCount(1, tab_index=1) translate_info = self.GetTranslateInfo(tab_index=1) self.assertTrue('translate_bar' in translate_info) self.SelectTranslateOption('toggle_always_translate', tab_ind... | def testSessionRestore(self): """Test that session restore restores the translate infobar and other translate settings. """ self._NavigateAndWaitForBar(self._GetDefaultSpanishURL()) translate_info = self.GetTranslateInfo() self.assertTrue('translate_bar' in translate_info) self.SelectTranslateOption('toggle_always_tran... | bc1c20e7d6c410e0e8422070d8abe3a8beaa3f5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/bc1c20e7d6c410e0e8422070d8abe3a8beaa3f5d/translate.py |
self.WaitForInfobarCount(1) translate_info = self.GetTranslateInfo() | self.WaitForInfobarCount(1, tab_index=1) self.WaitUntilTranslateComplete() translate_info = self.GetTranslateInfo(tab_index=1) | def testSessionRestore(self): """Test that session restore restores the translate infobar and other translate settings. """ self._NavigateAndWaitForBar(self._GetDefaultSpanishURL()) translate_info = self.GetTranslateInfo() self.assertTrue('translate_bar' in translate_info) self.SelectTranslateOption('toggle_always_tran... | bc1c20e7d6c410e0e8422070d8abe3a8beaa3f5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/bc1c20e7d6c410e0e8422070d8abe3a8beaa3f5d/translate.py |
self._test_list = { "base": self.TestBase, "base_unittests": self.TestBase, "browser": self.TestBrowser, "browser_tests": self.TestBrowser, "googleurl": self.TestGURL, "googleurl_unittests": self.TestGURL, "ipc": self.TestIpc, "ipc_tests": self.TestIpc, "layout": self.TestLayout, ... | if ':' in test: (self._test, self._gtest_filter) = test.split(':', 1) else: self._test = test self._gtest_filter = options.gtest_filter if self._test not in self._test_list: | def __init__(self, options, args, test): # The known list of tests. # Recognise the original abbreviations as well as full executable names. self._test_list = { "base": self.TestBase, "base_unittests": self.TestBase, "browser": self.TestBrowser, "browser_tests": self.TestBrowser, "googleurl": self.TestG... | 12b088258129428dc1801ea3c18d209258507ff6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/12b088258129428dc1801ea3c18d209258507ff6/chrome_tests.py |
self._test = test | def __init__(self, options, args, test): # The known list of tests. # Recognise the original abbreviations as well as full executable names. self._test_list = { "base": self.TestBase, "base_unittests": self.TestBase, "browser": self.TestBrowser, "browser_tests": self.TestBrowser, "googleurl": self.TestG... | 12b088258129428dc1801ea3c18d209258507ff6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/12b088258129428dc1801ea3c18d209258507ff6/chrome_tests.py | |
return self._test_list[self._test]() | return self._test_list[self._test](self) | def Run(self): ''' Runs the test specified by command-line argument --test ''' logging.info("running test %s" % (self._test)) return self._test_list[self._test]() | 12b088258129428dc1801ea3c18d209258507ff6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/12b088258129428dc1801ea3c18d209258507ff6/chrome_tests.py |
gtest_filter = self._options.gtest_filter | gtest_filter = self._gtest_filter | def _ReadGtestFilterFile(self, 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 + ".gtest-%... | 12b088258129428dc1801ea3c18d209258507ff6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/12b088258129428dc1801ea3c18d209258507ff6/chrome_tests.py |
parser.add_option("-t", "--test", action="append", help="which test to run") | parser.add_option("-t", "--test", action="append", default=[], help="which test to run, supports test:gtest_filter format " "as well.") | def _main(_): parser = optparse.OptionParser("usage: %prog -b <dir> -t <test> " "[-t <test> ...]") parser.disable_interspersed_args() parser.add_option("-b", "--build_dir", help="the location of the output of the compiler output") parser.add_option("-t", "--test", action="append", help="which test to run") parser.add_o... | 12b088258129428dc1801ea3c18d209258507ff6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/12b088258129428dc1801ea3c18d209258507ff6/chrome_tests.py |
if not options.test or not len(options.test): | if not options.test: | def _main(_): parser = optparse.OptionParser("usage: %prog -b <dir> -t <test> " "[-t <test> ...]") parser.disable_interspersed_args() parser.add_option("-b", "--build_dir", help="the location of the output of the compiler output") parser.add_option("-t", "--test", action="append", help="which test to run") parser.add_o... | 12b088258129428dc1801ea3c18d209258507ff6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/12b088258129428dc1801ea3c18d209258507ff6/chrome_tests.py |
stack_line = re.compile('\s*@\s*(?:0x)?[0-9a-fA-F]*\s*([^\n]*)') | stack_line = re.compile('\s*@\s*(?:0x)?[0-9a-fA-F]+\s*([^\n]*)') | def Analyze(self, log_lines, check_sanity=False): """Analyzes the app's output and applies suppressions to the reports. | f33cb836ae54c81434ddacec1ae0326a40f46727 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f33cb836ae54c81434ddacec1ae0326a40f46727/heapcheck_test.py |
reports = map(lambda(x): map(str, x), a) | reports = map(lambda(x): map(str, x), reports) | def GetReports(self, files): '''Extracts reports from a set of files. | 761e577532c39e0792cc57a794fd3028436de714 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/761e577532c39e0792cc57a794fd3028436de714/tsan_analyze.py |
return self.SimpleTest("chrome", "remoting_unittests") | return self.SimpleTest("chrome", "remoting_unittests", cmd_args=[ "--ui-test-timeout=240000", "--ui-test-action-timeout=120000", "--ui-test-action-max-timeout=280000"]) | def TestRemoting(self): return self.SimpleTest("chrome", "remoting_unittests") | e1471b09b1aa21a0cc045be123d36866fc4c9b62 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1471b09b1aa21a0cc045be123d36866fc4c9b62/chrome_tests.py |
proc += ["-logdir", (os.getcwd() + "\\" + self.temp_dir)] | proc += ["-logdir", self.temp_dir] | def ToolCommand(self): """Get the valgrind command to run.""" tool_name = self.ToolName() | 457528630b8710ff1ff24d65db33ed7a68a248f6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/457528630b8710ff1ff24d65db33ed7a68a248f6/valgrind_test.py |
if BUILD_ARCHIVE_TYPE in ('linux', 'linux-64'): | if BUILD_ARCHIVE_TYPE in ('linux', 'linux-64', 'linux-chromiumos'): | def SetArchiveVars(archive): """Set a bunch of global variables appropriate for the specified archive.""" global BUILD_ARCHIVE_TYPE global BUILD_ARCHIVE_DIR global BUILD_ZIP_NAME global BUILD_DIR_NAME global BUILD_EXE_NAME global BUILD_BASE_URL BUILD_ARCHIVE_TYPE = archive BUILD_ARCHIVE_DIR = 'chromium-rel-' + BUILD_A... | 2bd3b91c6417d02027f746a4af2e97cde3f094e2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/2bd3b91c6417d02027f746a4af2e97cde3f094e2/build-bisect.py |
choices = ['mac', 'xp', 'linux', 'linux-64'] | choices = ['mac', 'xp', 'linux', 'linux-64', 'linux-chromiumos'] | def main(): usage = ('%prog [options] [-- chromium-options]\n' 'Perform binary search on the snapshot builds.') parser = optparse.OptionParser(usage=usage) # Strangely, the default help output doesn't include the choice list. choices = ['mac', 'xp', 'linux', 'linux-64'] parser.add_option('-a', '--archive', choices = ch... | 2bd3b91c6417d02027f746a4af2e97cde3f094e2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/2bd3b91c6417d02027f746a4af2e97cde3f094e2/build-bisect.py |
if dir in DEPENDENT_DIRS: return [output_api.PresubmitPromptWarning(REBUILD_WARNING)] | while len(dir): if dir in BLACKLIST_DIRS: return [] if dir in DEPENDENT_DIRS: return [output_api.PresubmitPromptWarning(REBUILD_WARNING)] dir = os.path.dirname(dir) | def CheckChange(input_api, output_api): for f in input_api.AffectedFiles(): dir = os.path.normpath(input_api.os_path.dirname(f.LocalPath())) if dir in DEPENDENT_DIRS: return [output_api.PresubmitPromptWarning(REBUILD_WARNING)] return [] | 6d5fb296da1289e609ed2bc5e86d0f9460ae2042 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/6d5fb296da1289e609ed2bc5e86d0f9460ae2042/PRESUBMIT.py |
def __init__(self, name, type): SizeArgument.__init__(self, name, "GLsizei") | def __init__(self, name, type, gl_type): SizeArgument.__init__(self, name, gl_type) | def __init__(self, name, type): SizeArgument.__init__(self, name, "GLsizei") | 0a93dd5abe4872c4e82284847005b9da2174055d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0a93dd5abe4872c4e82284847005b9da2174055d/build_gles2_cmd_buffer.py |
arg_parts[0] != "GLintptr"): | not arg_parts[0].startswith('GLintptr')): | def CreateArg(arg_string): """Creates an Argument.""" arg_parts = arg_string.split() if len(arg_parts) == 1 and arg_parts[0] == 'void': return None # Is this a pointer argument? elif arg_string.find('*') >= 0: if arg_parts[0] == 'NonImmediate': return NonImmediatePointerArgument( arg_parts[-1], " ".join(arg_parts[1:-1]... | 0a93dd5abe4872c4e82284847005b9da2174055d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0a93dd5abe4872c4e82284847005b9da2174055d/build_gles2_cmd_buffer.py |
elif arg_parts[0].startswith('GLsizeiNotNegative'): return SizeNotNegativeArgument(arg_parts[-1], " ".join(arg_parts[0:-1])) | elif (arg_parts[0].startswith('GLsizeiNotNegative') or arg_parts[0].startswith('GLintptrNotNegative')): return SizeNotNegativeArgument(arg_parts[-1], " ".join(arg_parts[0:-1]), arg_parts[0][0:-11]) | def CreateArg(arg_string): """Creates an Argument.""" arg_parts = arg_string.split() if len(arg_parts) == 1 and arg_parts[0] == 'void': return None # Is this a pointer argument? elif arg_string.find('*') >= 0: if arg_parts[0] == 'NonImmediate': return NonImmediatePointerArgument( arg_parts[-1], " ".join(arg_parts[1:-1]... | 0a93dd5abe4872c4e82284847005b9da2174055d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0a93dd5abe4872c4e82284847005b9da2174055d/build_gles2_cmd_buffer.py |
" .WillOnce(SetArgumentPointee<2>(strlen(kInfo)));") % ( | " .WillOnce(SetArgumentPointee<2>(strlen(kInfo) + 1));") % ( | def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | 781be2ded1df2fd52e261693cb2f62d53c35cdb5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/781be2ded1df2fd52e261693cb2f62d53c35cdb5/build_gles2_cmd_buffer.py |
"""Verify toolbar buttons prefs..""" | """Verify toolbar buttons prefs.""" | def testToolbarButtonsPref(self): """Verify toolbar buttons prefs..""" # Assert defaults first self.assertFalse(self.GetPrefsInfo().Prefs(pyauto.kShowHomeButton)) self.SetPrefs(pyauto.kShowHomeButton, True) self.RestartBrowser(clear_profile=False) self.assertTrue(self.GetPrefsInfo().Prefs(pyauto.kShowHomeButton)) | 3e3bb819d5bd6cb3d719463b2a7fe8fbce92ff2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/3e3bb819d5bd6cb3d719463b2a7fe8fbce92ff2a/prefs.py |
def testDnsPrefectchingEnabledPref(self): | def testDnsPrefetchingEnabledPref(self): | def testDnsPrefectchingEnabledPref(self): """Verify DNS prefetching pref.""" # Assert default self.assertTrue(self.GetPrefsInfo().Prefs(pyauto.kDnsPrefetchingEnabled)) self.SetPrefs(pyauto.kDnsPrefetchingEnabled, False) self.RestartBrowser(clear_profile=False) self.assertFalse(self.GetPrefsInfo().Prefs(pyauto.kDnsPrefe... | 3e3bb819d5bd6cb3d719463b2a7fe8fbce92ff2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/3e3bb819d5bd6cb3d719463b2a7fe8fbce92ff2a/prefs.py |
return self.SimpleTest("chrome", "remoting_unittests") | return self.SimpleTest("chrome", "remoting_unittests", cmd_args=[ "--ui-test-timeout=240000", "--ui-test-action-timeout=120000", "--ui-test-action-max-timeout=280000"]) | def TestRemoting(self): return self.SimpleTest("chrome", "remoting_unittests") | afdc527faecd2c6d6005320ef59c18dfdcf59599 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/afdc527faecd2c6d6005320ef59c18dfdcf59599/chrome_tests.py |
'third_party', 'WebKit', 'WebKitTools', 'pywebsocket') | 'third_party', 'WebKit', 'WebKitTools', 'Scripts', 'webkitpy', 'thirdparty', 'pywebsocket') | def start(self): if not self._web_socket_tests: logging.info('No need to start %s server.' % self._server_name) return if self.is_running(): raise PyWebSocketNotStarted('%s is already running.' % self._server_name) | 924d706fda763645f8d4ac928791f8f97575f55b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/924d706fda763645f8d4ac928791f8f97575f55b/websocket_server.py |
'third_party', 'WebKit', 'WebKitTools', 'pywebsocket', 'mod_pywebsocket', 'standalone.py') | 'third_party', 'WebKit', 'WebKitTools', 'Scripts', 'webkitpy', 'thirdparty', 'pywebsocket', 'mod_pywebsocket', 'standalone.py') | def start(self): if not self._web_socket_tests: logging.info('No need to start %s server.' % self._server_name) return if self.is_running(): raise PyWebSocketNotStarted('%s is already running.' % self._server_name) | 924d706fda763645f8d4ac928791f8f97575f55b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/924d706fda763645f8d4ac928791f8f97575f55b/websocket_server.py |
return os.path.splitext(basename)[0] | while 1: new_basename = os.path.splitext(basename)[0] if basename == new_basename: break else: basename = new_basename return basename | def ExtractModuleName(infile_path): """Infers the module name from the input file path. The input filename is supposed to be in the form "ModuleName.sigs". This function splits the filename from the extention on that basename of the path and returns that as the module name. Args: infile_path: String holding the path ... | a7aa64b6e7525fa285abee08d6ea511e4d4ba41b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a7aa64b6e7525fa285abee08d6ea511e4d4ba41b/generate_stubs.py |
fd, file_path = tempfile.mkstemp(suffix='.zip', prefix='file-') | fd, file_path = tempfile.mkstemp(suffix='.zip', prefix='file-downloads-') | def _MakeFile(self, size): """Make a file on-the-fly with the given size. Returns the path to the file. """ fd, file_path = tempfile.mkstemp(suffix='.zip', prefix='file-') os.lseek(fd, size, 0) os.write(fd, 'a') os.close(fd) return file_path | 8e0daf09511a151a6386fdc3c1f277c6814387aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8e0daf09511a151a6386fdc3c1f277c6814387aa/downloads.py |
self._macCodeSign(browser_info) | self._MacCodeSign(browser_info) | def testCodeSign(self): """Check the app for codesign and bail out if it's non-branded.""" browser_info = self.GetBrowserInfo() | bf1b20e40af2cccb5245740478524383b5353b3c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/bf1b20e40af2cccb5245740478524383b5353b3c/codesign.py |
def WaitUntil(self, function, timeout=-1, retry_sleep=0.25, args=[]): | def WaitUntil(self, function, timeout=-1, retry_sleep=0.25, args=[], expect_retval=None): | def WaitUntil(self, function, timeout=-1, retry_sleep=0.25, args=[]): """Poll on a condition until timeout. | 91228cf9e257aa62f3e55a2d23dc75a2b99223cb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/91228cf9e257aa62f3e55a2d23dc75a2b99223cb/pyauto.py |
Waits until the |function| evalues to True or until |timeout| secs, whichever occurs earlier. | Waits until the |function| evalues to |expect_retval| or until |timeout| secs, whichever occurs earlier. | def WaitUntil(self, function, timeout=-1, retry_sleep=0.25, args=[]): """Poll on a condition until timeout. | 91228cf9e257aa62f3e55a2d23dc75a2b99223cb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/91228cf9e257aa62f3e55a2d23dc75a2b99223cb/pyauto.py |
timeout = self.action_max_timeout_ms()/1000.0 | timeout = self.action_max_timeout_ms() / 1000.0 | def WaitUntil(self, function, timeout=-1, retry_sleep=0.25, args=[]): """Poll on a condition until timeout. | 91228cf9e257aa62f3e55a2d23dc75a2b99223cb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/91228cf9e257aa62f3e55a2d23dc75a2b99223cb/pyauto.py |
if function(*args): | retval = function(*args) if (expect_retval is None and retval) or expect_retval == retval: | def WaitUntil(self, function, timeout=-1, retry_sleep=0.25, args=[]): """Poll on a condition until timeout. | 91228cf9e257aa62f3e55a2d23dc75a2b99223cb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/91228cf9e257aa62f3e55a2d23dc75a2b99223cb/pyauto.py |
cmd_dict = { 'command': 'WaitForInfobarCount', 'count': count, 'tab_index': tab_index, } | def WaitForInfobarCount(self, count, windex=0, tab_index=0): """Wait until infobar count becomes |count|. | 91228cf9e257aa62f3e55a2d23dc75a2b99223cb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/91228cf9e257aa62f3e55a2d23dc75a2b99223cb/pyauto.py | |
return self.WaitUntil( lambda(count): len(self.GetBrowserInfo()\ ['windows'][windex]['tabs'][tab_index]['infobars']) == count, args=[count]) | def _InfobarCount(): windows = self.GetBrowserInfo()['windows'] if windex >= len(windows): return -1 tabs = windows[windex]['tabs'] if tab_index >= len(tabs): return -1 return len(tabs[tab_index]['infobars']) return self.WaitUntil(_InfobarCount, expect_retval=count) | def WaitForInfobarCount(self, count, windex=0, tab_index=0): """Wait until infobar count becomes |count|. | 91228cf9e257aa62f3e55a2d23dc75a2b99223cb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/91228cf9e257aa62f3e55a2d23dc75a2b99223cb/pyauto.py |
filename_queue.put('.', [self._get_test_info_for_file(test_file)]) | filename_queue.put( ('.', [self._GetTestInfoForFile(test_file)])) | def _get_test_file_queue(self, test_files): """Create the thread safe queue of lists of (test filenames, test URIs) tuples. Each TestShellThread pulls a list from this queue and runs those tests in order before grabbing the next available list. | de73bcff1a19de9f2afa5e51a2abc7370a58261b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/de73bcff1a19de9f2afa5e51a2abc7370a58261b/run_chromium_webkit_tests.py |
'glue', 'editor_client_impl.cc') | 'api', 'src','EditorClientImpl.cc') | def AddWebKitEditorActions(actions): """Add editor actions from editor_client_impl.cc. Arguments: actions: set of actions to add to. """ action_re = re.compile(r'''\{ [\w']+, +\w+, +"(.*)" +\},''') editor_file = os.path.join(path_utils.ScriptDir(), '..', '..', 'webkit', 'glue', 'editor_client_impl.cc') for line in op... | 53d51d208e5e097ceae9eebdc8be7f377edb4476 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/53d51d208e5e097ceae9eebdc8be7f377edb4476/extract_actions.py |
action_re = re.compile(r'[> ]UserMetrics:?:?RecordAction\(L"(.*)"') other_action_re = re.compile(r'[> ]UserMetrics:?:?RecordAction\(') | global number_of_files_total number_of_files_total = number_of_files_total + 1 action_re = re.compile(r'UserMetricsAction\("([^"]*)') | 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 """ action_re = re.compile(r'[> ]UserMetrics:?:?RecordAction\(L"(.*)"') other_action_re = re.compile(r'[> ]UserMetrics:?:?RecordAction\(') computed_action_re... | 53d51d208e5e097ceae9eebdc8be7f377edb4476 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/53d51d208e5e097ceae9eebdc8be7f377edb4476/extract_actions.py |
elif other_action_re.search(line): if os.path.basename(path) != 'user_metrics.cc': print >>sys.stderr, 'WARNING: %s has funny RecordAction' % path | 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 """ action_re = re.compile(r'[> ]UserMetrics:?:?RecordAction\(L"(.*)"') other_action_re = re.compile(r'[> ]UserMetrics:?:?RecordAction\(') computed_action_re... | 53d51d208e5e097ceae9eebdc8be7f377edb4476 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/53d51d208e5e097ceae9eebdc8be7f377edb4476/extract_actions.py | |
print >>sys.stderr, 'WARNING: %s has RecordComputedAction' % path | print >>sys.stderr, 'WARNING: {0} has RecordComputedAction at {1}'.\ format(path, line_number) | 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 """ action_re = re.compile(r'[> ]UserMetrics:?:?RecordAction\(L"(.*)"') other_action_re = re.compile(r'[> ]UserMetrics:?:?RecordAction\(') computed_action_re... | 53d51d208e5e097ceae9eebdc8be7f377edb4476 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/53d51d208e5e097ceae9eebdc8be7f377edb4476/extract_actions.py |
if ext == '.cc': | if ext in ('.cc', '.mm', '.c', '.m'): | def WalkDirectory(root_path, actions): for path, dirs, files in os.walk(root_path): if '.svn' in dirs: dirs.remove('.svn') for file in files: ext = os.path.splitext(file)[1] if ext == '.cc': GrepForActions(os.path.join(path, file), actions) | 53d51d208e5e097ceae9eebdc8be7f377edb4476 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/53d51d208e5e097ceae9eebdc8be7f377edb4476/extract_actions.py |
AddWebKitEditorActions(actions) | def main(argv): actions = set() AddComputedActions(actions) AddWebKitEditorActions(actions) # Walk the source tree to process all .cc files. chrome_root = os.path.join(path_utils.ScriptDir(), '..') WalkDirectory(chrome_root, actions) webkit_root = os.path.join(path_utils.ScriptDir(), '..', '..', 'webkit') WalkDirector... | 53d51d208e5e097ceae9eebdc8be7f377edb4476 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/53d51d208e5e097ceae9eebdc8be7f377edb4476/extract_actions.py | |
file_url = self.GetFileURLForDataPath(os.path.join( | file_url = self.GetFileURLForPath(os.path.join( | def _TriggerUnsafeDownload(self, filename, tab_index=0, windex=0): """Trigger download of an unsafe/dangerous filetype. | c5dcef97b214630cd25c390482dc3a04a2350c80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/c5dcef97b214630cd25c390482dc3a04a2350c80/downloads.py |
self._source_dir = layout_package.path_utils.GetAbsolutePath( | self._source_dir = layout_package.path_utils.get_absolute_path( | def __init__(self, options, args, test): # The known list of tests. # Recognise the original abbreviations as well as full executable names. self._test_list = { "base": self.TestBase, "base_unittests": self.TestBase, "browser": self.TestBrowser, "browser_tests": self.TestBrowser, "googleurl": self.TestG... | 50f8998d873e0ba6148925747f72ac46ed6a4497 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/50f8998d873e0ba6148925747f72ac46ed6a4497/chrome_tests.py |
short_options = 'f:i:o:t:h' long_options = ['file=', 'help'] | short_options = 'e:f:i:o:t:h' long_options = ['eval=', 'file=', 'help'] | def main(argv=None): if argv is None: argv = sys.argv short_options = 'f:i:o:t:h' long_options = ['file=', 'help'] helpstr = """\ | c8129a7d22911e39505983228c0c7f417b62478f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/c8129a7d22911e39505983228c0c7f417b62478f/version.py |
if o in ('-f', '--file'): | if o in ('-e', '--eval'): try: evals.update(dict([a.split('=',1)])) except ValueError: raise Usage("-e requires VAR=VAL") elif o in ('-f', '--file'): | def main(argv=None): if argv is None: argv = sys.argv short_options = 'f:i:o:t:h' long_options = ['file=', 'help'] helpstr = """\ | c8129a7d22911e39505983228c0c7f417b62478f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/c8129a7d22911e39505983228c0c7f417b62478f/version.py |
sys.stderr.write('Use -h to get help.') | sys.stderr.write('; Use -h to get help.\n') | def main(argv=None): if argv is None: argv = sys.argv short_options = 'f:i:o:t:h' long_options = ['file=', 'help'] helpstr = """\ | c8129a7d22911e39505983228c0c7f417b62478f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/c8129a7d22911e39505983228c0c7f417b62478f/version.py |
for key, val in evals.iteritems(): values[key] = str(eval(val, globals(), values)) | def main(argv=None): if argv is None: argv = sys.argv short_options = 'f:i:o:t:h' long_options = ['file=', 'help'] helpstr = """\ | c8129a7d22911e39505983228c0c7f417b62478f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/c8129a7d22911e39505983228c0c7f417b62478f/version.py | |
current_dir = input_api.PresubmitLocalPath() | current_dir = str(input_api.PresubmitLocalPath()) | def LintTestFiles(input_api, output_api): current_dir = input_api.PresubmitLocalPath() # Set 'webkit/tools/layout_tests' in include path. python_paths = [ current_dir, input_api.os_path.join(current_dir, '..', '..', '..', 'tools', 'python') ] env = input_api.environ.copy() if env.get('PYTHONPATH'): python_paths.append(... | c2a2855bf15809c6583f9c30b783befcfecf9672 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/c2a2855bf15809c6583f9c30b783befcfecf9672/PRESUBMIT.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") | fcdeee1f879e446039b9900f160c32ef0b95ad52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fcdeee1f879e446039b9900f160c32ef0b95ad52/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... | fcdeee1f879e446039b9900f160c32ef0b95ad52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fcdeee1f879e446039b9900f160c32ef0b95ad52/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... | fcdeee1f879e446039b9900f160c32ef0b95ad52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fcdeee1f879e446039b9900f160c32ef0b95ad52/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... | fcdeee1f879e446039b9900f160c32ef0b95ad52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fcdeee1f879e446039b9900f160c32ef0b95ad52/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; | fcdeee1f879e446039b9900f160c32ef0b95ad52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fcdeee1f879e446039b9900f160c32ef0b95ad52/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; | fcdeee1f879e446039b9900f160c32ef0b95ad52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fcdeee1f879e446039b9900f160c32ef0b95ad52/build_gles2_cmd_buffer.py |
print('usage: %s order.html input_file_1 input_file_2 ... ' | print('usage: %s order.html input_source_dir_1 input_source_dir_2 ... ' | def main(argv): if len(argv) < 3: print('usage: %s order.html input_file_1 input_file_2 ... ' 'output_file' % argv[0]) return 1 output_file_name = argv.pop() full_paths = {} for full_path in argv[2:]: file_name = os.path.basename(full_path) if file_name.endswith('.js'): full_paths[file_name] = full_path extractor =... | 0e20df92d79799ae285040cb0cf1d5fb898e9db2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0e20df92d79799ae285040cb0cf1d5fb898e9db2/concatenate_js_files.py |
full_paths = {} for full_path in argv[2:]: file_name = os.path.basename(full_path) if file_name.endswith('.js'): full_paths[file_name] = full_path | def main(argv): if len(argv) < 3: print('usage: %s order.html input_file_1 input_file_2 ... ' 'output_file' % argv[0]) return 1 output_file_name = argv.pop() full_paths = {} for full_path in argv[2:]: file_name = os.path.basename(full_path) if file_name.endswith('.js'): full_paths[file_name] = full_path extractor =... | 0e20df92d79799ae285040cb0cf1d5fb898e9db2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0e20df92d79799ae285040cb0cf1d5fb898e9db2/concatenate_js_files.py | |
if not input_file_name in full_paths: print('A full path to %s isn\'t specified in command line. ' 'Probably, you have an obsolete script entry in %s' % (input_file_name, argv[1])) | full_path = expander.expand(input_file_name) if (full_path is None): raise Exception('File %s referenced in %s not found on any source paths, ' 'check source tree for consistency' % (input_file_name, input_file_name)) | def main(argv): if len(argv) < 3: print('usage: %s order.html input_file_1 input_file_2 ... ' 'output_file' % argv[0]) return 1 output_file_name = argv.pop() full_paths = {} for full_path in argv[2:]: file_name = os.path.basename(full_path) if file_name.endswith('.js'): full_paths[file_name] = full_path extractor =... | 0e20df92d79799ae285040cb0cf1d5fb898e9db2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0e20df92d79799ae285040cb0cf1d5fb898e9db2/concatenate_js_files.py |
input_file = open(full_paths[input_file_name], 'r') | input_file = open(full_path, 'r') | def main(argv): if len(argv) < 3: print('usage: %s order.html input_file_1 input_file_2 ... ' 'output_file' % argv[0]) return 1 output_file_name = argv.pop() full_paths = {} for full_path in argv[2:]: file_name = os.path.basename(full_path) if file_name.endswith('.js'): full_paths[file_name] = full_path extractor =... | 0e20df92d79799ae285040cb0cf1d5fb898e9db2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0e20df92d79799ae285040cb0cf1d5fb898e9db2/concatenate_js_files.py |
if os.path.exists(BaseTool.TMP_DIR): shutil.rmtree(BaseTool.TMP_DIR) os.mkdir(BaseTool.TMP_DIR) | self.temp_dir = tempfile.mkdtemp() | def __init__(self): # If we have a testing.tmp directory, we didn't cleanup last time. if os.path.exists(BaseTool.TMP_DIR): shutil.rmtree(BaseTool.TMP_DIR) os.mkdir(BaseTool.TMP_DIR) | 09a4f701e8a53003ff9f43042db088214ef61594 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/09a4f701e8a53003ff9f43042db088214ef61594/valgrind_test.py |
shutil.rmtree(self.TMP_DIR, ignore_errors=True) | shutil.rmtree(self.temp_dir, ignore_errors=True) | def Main(self, args, check_sanity): """Call this to run through the whole process: Setup, Execute, Analyze""" start = datetime.datetime.now() retcode = -1 if self.Setup(args): retcode = self.RunTestsAndAnalyze(check_sanity) if not self._nocleanup_on_exit: shutil.rmtree(self.TMP_DIR, ignore_errors=True) self.Cleanup() e... | 09a4f701e8a53003ff9f43042db088214ef61594 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/09a4f701e8a53003ff9f43042db088214ef61594/valgrind_test.py |
logfilename = self.TMP_DIR + ("/%s." % tool_name) + "%p" | logfilename = self.temp_dir + ("/%s." % tool_name) + "%p" | def ToolCommand(self): """Get the valgrind command to run.""" # Note that self._args begins with the exe to be run. tool_name = self.ToolName() | 09a4f701e8a53003ff9f43042db088214ef61594 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/09a4f701e8a53003ff9f43042db088214ef61594/valgrind_test.py |
(fd, indirect_fname) = tempfile.mkstemp(dir=self.TMP_DIR, | (fd, indirect_fname) = tempfile.mkstemp(dir=self.temp_dir, | def CreateBrowserWrapper(self, command, logfiles): """The program being run invokes Python or something else that can't stand to be valgrinded, and also invokes the Chrome browser. Set an environment variable to tell the program to prefix the Chrome commandline with a magic wrapper. Build the magic wrapper here. """ ... | 09a4f701e8a53003ff9f43042db088214ef61594 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/09a4f701e8a53003ff9f43042db088214ef61594/valgrind_test.py |
filenames = glob.glob(self.TMP_DIR + "/" + self.ToolName() + ".*") | filenames = glob.glob(self.temp_dir + "/" + self.ToolName() + ".*") | def GetAnalyzeResults(self, check_sanity=False): # Glob all the files in the "testing.tmp" directory filenames = glob.glob(self.TMP_DIR + "/" + self.ToolName() + ".*") | 09a4f701e8a53003ff9f43042db088214ef61594 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/09a4f701e8a53003ff9f43042db088214ef61594/valgrind_test.py |
logfilename = self.TMP_DIR + "/tsan.%p" | logfilename = self.temp_dir + "/tsan.%p" | def ToolSpecificFlags(self): proc = ThreadSanitizerBase.ToolSpecificFlags(self) # On PIN, ThreadSanitizer has its own suppression mechanism # and --log-file flag which work exactly on Valgrind. suppression_count = 0 for suppression_file in self._options.suppressions: if os.path.exists(suppression_file): suppression_cou... | 09a4f701e8a53003ff9f43042db088214ef61594 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/09a4f701e8a53003ff9f43042db088214ef61594/valgrind_test.py |
filenames = glob.glob(self.TMP_DIR + "/tsan.*") | filenames = glob.glob(self.temp_dir + "/tsan.*") | def Analyze(self, check_sanity=False): filenames = glob.glob(self.TMP_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 | 09a4f701e8a53003ff9f43042db088214ef61594 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/09a4f701e8a53003ff9f43042db088214ef61594/valgrind_test.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.