rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
proc += ["-logdir", (os.getcwd() + "\\" + self.TMP_DIR)] | proc += ["-logdir", (os.getcwd() + "\\" + self.temp_dir)] | def ToolCommand(self): """Get the valgrind command to run.""" tool_name = self.ToolName() | 09a4f701e8a53003ff9f43042db088214ef61594 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/09a4f701e8a53003ff9f43042db088214ef61594/valgrind_test.py |
filenames = glob.glob(self.TMP_DIR + "/*/results.txt") | filenames = glob.glob(self.temp_dir + "/*/results.txt") | def Analyze(self, check_sanity=False): # Glob all the results files in the "testing.tmp" directory filenames = glob.glob(self.TMP_DIR + "/*/results.txt") | 09a4f701e8a53003ff9f43042db088214ef61594 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/09a4f701e8a53003ff9f43042db088214ef61594/valgrind_test.py |
O3D_PLUGIN_MIME_TYPE = FLAGS.set_mimetype | O3D_PLUGIN_NPAPI_FILENAME = FLAGS.set_npapi_filename O3D_PLUGIN_NPAPI_MIMETYPE = FLAGS.set_npapi_mimetype O3D_PLUGIN_ACTIVEX_HOSTCONTROL_CLSID = FLAGS.set_activex_hostcontrol_clsid O3D_PLUGIN_ACTIVEX_TYPELIB_CLSID = FLAGS.set_activex_typelib_clsid O3D_PLUGIN_ACTIVEX_HOSTCONTROL_NAME = FLAGS.set_activex_hostcontrol_name... | def main(argv): try: files = FLAGS(argv) # Parse flags except gflags.FlagsError, e: print '%s.\nUsage: %s [<options>] [<input_file> <output_file>]\n%s' % \ (e, sys.argv[0], FLAGS) sys.exit(1) # Strip off argv[0] files = files[1:] # Get version string from o3d_version.py o3d_version_vars = {} if FLAGS.kill_switch: ex... | 53e6a0ee72319153b1382a4c9bd670f06cbdcd77 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/53e6a0ee72319153b1382a4c9bd670f06cbdcd77/version_info.py |
('@@@PluginMimeType@@@', O3D_PLUGIN_MIME_TYPE), | ('@@@PluginNpapiFilename@@@', O3D_PLUGIN_NPAPI_FILENAME), ('@@@PluginNpapiMimeType@@@', O3D_PLUGIN_NPAPI_MIMETYPE), ('@@@PluginActiveXHostControlClsid@@@', O3D_PLUGIN_ACTIVEX_HOSTCONTROL_CLSID), ('@@@PluginActiveXTypeLibClsid@@@', O3D_PLUGIN_ACTIVEX_TYPELIB_CLSID), ('@@@PluginActiveXHostControlName@@@', O3D_PLUGIN_ACTI... | def main(argv): try: files = FLAGS(argv) # Parse flags except gflags.FlagsError, e: print '%s.\nUsage: %s [<options>] [<input_file> <output_file>]\n%s' % \ (e, sys.argv[0], FLAGS) sys.exit(1) # Strip off argv[0] files = files[1:] # Get version string from o3d_version.py o3d_version_vars = {} if FLAGS.kill_switch: ex... | 53e6a0ee72319153b1382a4c9bd670f06cbdcd77 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/53e6a0ee72319153b1382a4c9bd670f06cbdcd77/version_info.py |
if not os.path.exists(os.path.join(dir_name, ".svn")): | if not (os.path.exists(os.path.join(dir_name, ".svn")) or (dir_name in GIT_SOURCE_DIRECTORY)): | def ApplyDirectoryRules(existing_rules, dir_name): """Combines rules from the existing rules and the new directory. Any directory can contain a DEPS file. Toplevel DEPS files can contain module dependencies which are used by gclient. We use these, along with additional include rules and implicit rules for the given di... | cd99caefe64b3149b85300ddb21aa965942ffd8d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/cd99caefe64b3149b85300ddb21aa965942ffd8d/checkdeps.py |
"""Test downloading with filenames containing special chars.""" | """Test downloading with filenames containing special chars. The files are created on the fly and cleaned after use. """ | def testCrazyFilenames(self): """Test downloading with filenames containing special chars.""" download_dir = self.GetDownloadDirectory().value() test_dir = os.path.join(os.path.abspath(self.DataDir()), 'downloads', 'crazy_filenames') data_file = os.path.join(test_dir, 'download_filenames') filenames = filter(os.path.is... | e1b8e33cb6c10d0cf6ee2e6f2d1c76e388c613b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1b8e33cb6c10d0cf6ee2e6f2d1c76e388c613b4/downloads.py |
test_dir = os.path.join(os.path.abspath(self.DataDir()), 'downloads', 'crazy_filenames') data_file = os.path.join(test_dir, 'download_filenames') filenames = filter(os.path.isfile, os.listdir(test_dir)) logging.info('Testing with %d crazy filenames' % len(filenames)) for filename in filenames: downloaded_file = os.path... | crazy_filenames = self._EvalDataFrom('crazy_filenames.txt') logging.info('Testing with %d crazy filenames' % len(crazy_filenames)) | def testCrazyFilenames(self): """Test downloading with filenames containing special chars.""" download_dir = self.GetDownloadDirectory().value() test_dir = os.path.join(os.path.abspath(self.DataDir()), 'downloads', 'crazy_filenames') data_file = os.path.join(test_dir, 'download_filenames') filenames = filter(os.path.is... | e1b8e33cb6c10d0cf6ee2e6f2d1c76e388c613b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1b8e33cb6c10d0cf6ee2e6f2d1c76e388c613b4/downloads.py |
downloads = self.GetDownloadsInfo().Downloads() self.assertEqual(len(downloads), len(filenames)) | def _CreateFile(name): """Create and fill the given file with some junk.""" fp = open(name, 'w') print >>fp, 'This is a junk file named %s. ' % name * 100 fp.close() | def testCrazyFilenames(self): """Test downloading with filenames containing special chars.""" download_dir = self.GetDownloadDirectory().value() test_dir = os.path.join(os.path.abspath(self.DataDir()), 'downloads', 'crazy_filenames') data_file = os.path.join(test_dir, 'download_filenames') filenames = filter(os.path.is... | e1b8e33cb6c10d0cf6ee2e6f2d1c76e388c613b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1b8e33cb6c10d0cf6ee2e6f2d1c76e388c613b4/downloads.py |
for filename in filenames: downloaded_file = os.path.join(download_dir, filename) self.assertTrue(os.path.exists(downloaded_file)) self.assertEqual( self._ComputeMD5sum(downloaded_file), self._ComputeMD5sum(os.path.join(test_dir, filename))) os.path.exists(downloaded_file) and os.remove(downloaded_file) | temp_dir = tempfile.mkdtemp(prefix='download') try: for filename in crazy_filenames: file_path = os.path.join(temp_dir, filename) _CreateFile(file_path) file_url = self.GetFileURLForPath(file_path) downloaded_file = os.path.join(download_dir, filename) os.path.exists(downloaded_file) and os.remove(downloaded_file) sel... | def testCrazyFilenames(self): """Test downloading with filenames containing special chars.""" download_dir = self.GetDownloadDirectory().value() test_dir = os.path.join(os.path.abspath(self.DataDir()), 'downloads', 'crazy_filenames') data_file = os.path.join(test_dir, 'download_filenames') filenames = filter(os.path.is... | e1b8e33cb6c10d0cf6ee2e6f2d1c76e388c613b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1b8e33cb6c10d0cf6ee2e6f2d1c76e388c613b4/downloads.py |
def testDownloadInIncognito(self): """Download a zip in incognito window and verify. | downloads = self.GetDownloadsInfo().Downloads() self.assertEqual(len(downloads), len(crazy_filenames)) | def testDownloadInIncognito(self): """Download a zip in incognito window and verify. | e1b8e33cb6c10d0cf6ee2e6f2d1c76e388c613b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1b8e33cb6c10d0cf6ee2e6f2d1c76e388c613b4/downloads.py |
Also verify that the download shelf showed up. """ test_dir = os.path.join(os.path.abspath(self.DataDir()), 'downloads') checksum_file = os.path.join(test_dir, 'a_zip_file.md5sum') file_url = self.GetFileURLForPath(os.path.join(test_dir, 'a_zip_file.zip')) golden_md5sum = urllib.urlopen(checksum_file).read() downloaded... | for filename in crazy_filenames: downloaded_file = os.path.join(download_dir, filename) self.assertTrue(os.path.exists(downloaded_file)) self.assertEqual( self._ComputeMD5sum(downloaded_file), self._ComputeMD5sum(os.path.join(temp_dir, filename))) os.path.exists(downloaded_file) and os.remove(downloaded_file) finally: ... | def testDownloadInIncognito(self): """Download a zip in incognito window and verify. | e1b8e33cb6c10d0cf6ee2e6f2d1c76e388c613b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1b8e33cb6c10d0cf6ee2e6f2d1c76e388c613b4/downloads.py |
path_utils.maybe_make_directory(self._options.results_directory) | os.makedirs(self._options.results_directory) | def __init__(self, options): self._options = options | eed2fefde6c7cfc2bfa8938d71b6c4c07233e768 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/eed2fefde6c7cfc2bfa8938d71b6c4c07233e768/test_output_xml_to_json.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... | 55b7254dc5b6b90b20cbf7a79637027fbde0cb2d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/55b7254dc5b6b90b20cbf7a79637027fbde0cb2d/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... | 55b7254dc5b6b90b20cbf7a79637027fbde0cb2d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/55b7254dc5b6b90b20cbf7a79637027fbde0cb2d/testserver.py |
def TryKillingOldServer(port): for protocol in ["http", "https"]: try: urllib2.urlopen("%s://localhost:%d/kill" % (protocol, port)).read() print "Killed old server instance on port %d (via %s)" % (port, protocol) except urllib2.URLError: pass | def TryKillingOldServer(port): # Note that an HTTP /kill request to the FTP server has the effect of # killing it. for protocol in ["http", "https"]: try: urllib2.urlopen("%s://localhost:%d/kill" % (protocol, port)).read() print "Killed old server instance on port %d (via %s)" % (port, protocol) except urllib2.URLError... | a29ca9e3b6d8f2cab697a3642eb20c3cee39712a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a29ca9e3b6d8f2cab697a3642eb20c3cee39712a/testserver.py | |
TryKillingOldServer(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 # Try to free up the port if there's an orphaned old instance. TryKillingOldServer(port) if options.server_type == SERVER_HTTP: if opt... | a29ca9e3b6d8f2cab697a3642eb20c3cee39712a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a29ca9e3b6d8f2cab697a3642eb20c3cee39712a/testserver.py | |
def CombineLibraries(output, remove_re, inputs): '''Combines all the libraries and objects in inputs, while removing any object files that match remove_re. ''' removals = [] if remove_re: removals = CollectRemovals(remove_re, inputs) print removals args = ['lib.exe', '/out:%s' % output] args += ['/remove:%s' % obj fo... | e50dd358f64b8c3ec86ec31c7d6c81ef63983476 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e50dd358f64b8c3ec86ec31c7d6c81ef63983476/combine_libs.py | ||
if sys.platform != 'win32': | if sys.platform != 'win32' and sys.platform != 'cygwin': | def Main(): '''Main function for this script''' parser = GetOptionParser() (opt, args) = parser.parse_args() output = opt.output remove = opt.remove if not output: parser.error('You must specify an output file') if not args: parser.error('You must specify at least one object or library') output = output.strip() remov... | e50dd358f64b8c3ec86ec31c7d6c81ef63983476 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e50dd358f64b8c3ec86ec31c7d6c81ef63983476/combine_libs.py |
extractor = OrderedJSFilesExtractor(argv[1]) | input_order_file_name = argv[1] extractor = OrderedJSFilesExtractor(input_order_file_name) | def main(argv): if len(argv) < 3: print('usage: %s order.html input_source_dir_1 input_source_dir_2 ... ' 'output_file' % argv[0]) return 1 output_file_name = argv.pop() extractor = OrderedJSFilesExtractor(argv[1]) expander = PathExpander(argv[2:]) output = StringIO() for input_file_name in extractor.ordered_js_file... | 6b93abb6ebafb7f90dc0dd4c47dc432464923c80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/6b93abb6ebafb7f90dc0dd4c47dc432464923c80/concatenate_js_files.py |
(input_file_name, input_file_name)) | (input_file_name, input_order_file_name)) | def main(argv): if len(argv) < 3: print('usage: %s order.html input_source_dir_1 input_source_dir_2 ... ' 'output_file' % argv[0]) return 1 output_file_name = argv.pop() extractor = OrderedJSFilesExtractor(argv[1]) expander = PathExpander(argv[2:]) output = StringIO() for input_file_name in extractor.ordered_js_file... | 6b93abb6ebafb7f90dc0dd4c47dc432464923c80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/6b93abb6ebafb7f90dc0dd4c47dc432464923c80/concatenate_js_files.py |
os.putenv("LD_LIBRARY_PATH", self._options.build_dir) | if (os.getenv("LD_LIBRARY_PATH")): os.putenv("LD_LIBRARY_PATH", "%s:%s" % (os.getenv("LD_LIBRARY_PATH"), self._options.build_dir)) else: os.putenv("LD_LIBRARY_PATH", self._options.build_dir) | def SimpleTest(self, module, name, heapcheck_test_args=None, cmd_args=None): '''Builds the command line and runs the specified test. | f4120bb913a60c41ad04bc2008ea41e9498bcd47 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f4120bb913a60c41ad04bc2008ea41e9498bcd47/chrome_tests.py |
num_invalid_values = arg.GetNumInvalidValues() | num_invalid_values = arg.GetNumInvalidValues(func) | def WriteInvalidUnitTest(self, func, file, test, extra = {}): """Writes a invalid unit test.""" arg_index = 0 for arg in func.GetOriginalArgs(): num_invalid_values = arg.GetNumInvalidValues() for value_index in range(0, num_invalid_values): arg_strings = [] parse_result = "kNoError" gl_error = None count = 0 for arg in... | e1ea91c039be302d932f52103de15e4d66c29781 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1ea91c039be302d932f52103de15e4d66c29781/build_gles2_cmd_buffer.py |
"""Writes the GLES2 Implemention declaration.""" | """Writes the GLES2 Implemention.""" | def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention declaration.""" 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(""))) f... | e1ea91c039be302d932f52103de15e4d66c29781 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1ea91c039be302d932f52103de15e4d66c29781/build_gles2_cmd_buffer.py |
file.Write("%s %s(%s);\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write("\n") | self.WriteGLES2ImplementationDeclaration(func, file) | def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention declaration.""" 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(""))) f... | e1ea91c039be302d932f52103de15e4d66c29781 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1ea91c039be302d932f52103de15e4d66c29781/build_gles2_cmd_buffer.py |
file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) arg_string = func.MakeOriginalArgString("") comma = "" if len(arg_string) > 0: comma = ", " file.Write(" helper_->%s(%s%sresult_shm_id(), result_shm_offset());\n" % (func.name, arg_string, comma)) file.Write(" Wa... | impl_func = func.GetInfo('impl_func') if impl_func == None or impl_func == True: file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" typedef %s::Result Result;\n" % func.original_name) file.Write(" Result* result = GetResultAs<Result*>();\n") file.Wri... | def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) arg_string = func.MakeOriginalArgString("") comma = "" if len(arg_string) > 0: comma = ", " file.Write(" helper_->%s(%s%sres... | e1ea91c039be302d932f52103de15e4d66c29781 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1ea91c039be302d932f52103de15e4d66c29781/build_gles2_cmd_buffer.py |
file.Write("// TODO(gman): Implement this\n") TypeHandler.WriteGLES2ImplementationHeader(self, func, file) | code = """%(return_type)s %(func_name)s(%(args)s) { helper_->SetBucketSize(kResultBucketId, 0); helper_->%(func_name)s(%(id_name)s, kResultBucketId); std::string str; if (GetBucketAsString(kResultBucketId, &str)) { GLsizei max_size = std::min(static_cast<size_t>(%(bufsize_name)s) - 1, str.size()); if (%(length_name)s !... | def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" file.Write("// TODO(gman): Implement this\n") TypeHandler.WriteGLES2ImplementationHeader(self, func, file) | e1ea91c039be302d932f52103de15e4d66c29781 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1ea91c039be302d932f52103de15e4d66c29781/build_gles2_cmd_buffer.py |
file.Write("// TODO(gman): %s\n\n" % func.name) def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" file.Write("// TODO(gman): %s\n\n" % func.name) | valid_test = """ TEST_F(%(test_name)s, %(name)sValidArgs) { const char* kInfo = "hello"; const uint32 kBucketId = 123; SpecializedSetup<%(name)s, 0>(); %(expect_len_code)s EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)) .WillOnce(DoAll(SetArgumentPointee<2>(strlen(kInfo)), SetArrayArgument<3>(kInfo, kInfo + strlen(kIn... | def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" file.Write("// TODO(gman): %s\n\n" % func.name) | e1ea91c039be302d932f52103de15e4d66c29781 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1ea91c039be302d932f52103de15e4d66c29781/build_gles2_cmd_buffer.py |
args = func.GetOriginalArgs() all_but_last_2_args = args[:-2] for arg in all_but_last_2_args: arg.WriteGetCode(file) self.WriteGetDataSizeCode(func, file) size_arg = args[-2] file.Write(" uint32 size_shm_id = c.%s_shm_id;\n" % size_arg.name) file.Write(" uint32 size_shm_offset = c.%s_shm_offset;\n" % size_arg.name) f... | args = func.GetCmdArgs() id_arg = args[0] bucket_arg = args[1] id_arg.WriteGetCode(file) bucket_arg.WriteGetCode(file) id_arg.WriteValidationCode(file) file.Write(" GLint len = 0;\n") file.Write(" %s(%s, %s, &len);\n" % ( func.GetInfo('get_len_func'), id_arg.name, func.GetInfo('get_len_enum'))) file.Write(" Bucket* ... | def WriteServiceImplementation(self, func, file): """Overrriden from TypeHandler.""" file.Write( "error::Error GLES2DecoderImpl::Handle%s(\n" % func.name) file.Write( " uint32 immediate_data_size, const gles2::%s& c) {\n" % func.name) args = func.GetOriginalArgs() all_but_last_2_args = args[:-2] for arg in all_but_l... | e1ea91c039be302d932f52103de15e4d66c29781 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1ea91c039be302d932f52103de15e4d66c29781/build_gles2_cmd_buffer.py |
" %s %s = GetSharedMemoryAs<%s>(\n" % (dest_arg.type, dest_arg.name, dest_arg.type)) file.Write( " c.%s_shm_id, c.%s_shm_offset, %s);\n" % (dest_arg.name, dest_arg.name, bufsize_arg.name)) for arg in all_but_last_2_args + [dest_arg]: arg.WriteValidationCode(file) func.WriteValidationCode(file) func.WriteHandlerIm... | " %s(%s, len + 1, &len, bucket->GetDataAs<GLchar*>(0, len + 1));\n" % (func.GetGLFunctionName(), id_arg.name)) | def WriteServiceImplementation(self, func, file): """Overrriden from TypeHandler.""" file.Write( "error::Error GLES2DecoderImpl::Handle%s(\n" % func.name) file.Write( " uint32 immediate_data_size, const gles2::%s& c) {\n" % func.name) args = func.GetOriginalArgs() all_but_last_2_args = args[:-2] for arg in all_but_l... | e1ea91c039be302d932f52103de15e4d66c29781 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1ea91c039be302d932f52103de15e4d66c29781/build_gles2_cmd_buffer.py |
def GetNumInvalidValues(self): | def GetNumInvalidValues(self, func): | def GetNumInvalidValues(self): """returns the number of invalid values to be tested.""" return 0 | e1ea91c039be302d932f52103de15e4d66c29781 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1ea91c039be302d932f52103de15e4d66c29781/build_gles2_cmd_buffer.py |
if self.type == 'GLsizei' or self.type == 'GLsizeiptr': file.Write(" if (%s < 0) {\n" % self.name) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return error::kNoError;\n") file.Write(" }\n") | pass def WriteClientSideValidationCode(self, file): """Writes the validation code for an argument.""" pass | def WriteValidationCode(self, file): """Writes the validation code for an argument.""" if self.type == 'GLsizei' or self.type == 'GLsizeiptr': file.Write(" if (%s < 0) {\n" % self.name) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return error::kNoError;\n") file.Write(" }\n") | e1ea91c039be302d932f52103de15e4d66c29781 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1ea91c039be302d932f52103de15e4d66c29781/build_gles2_cmd_buffer.py |
def GetNumInvalidValues(self): | def GetNumInvalidValues(self, func): | def GetNumInvalidValues(self): """overridden from Argument.""" return 1 | e1ea91c039be302d932f52103de15e4d66c29781 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1ea91c039be302d932f52103de15e4d66c29781/build_gles2_cmd_buffer.py |
"""returns an invalid value and expected parse result by index.""" | """overridden from Argument.""" | def GetInvalidArg(self, offset, index): """returns an invalid value and expected parse result by index.""" return ("-1", "kNoError", "GL_INVALID_VALUE") | e1ea91c039be302d932f52103de15e4d66c29781 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1ea91c039be302d932f52103de15e4d66c29781/build_gles2_cmd_buffer.py |
"""Base calss for EnumArgument, IntArgument and BoolArgument""" | """Base class for EnumArgument, IntArgument and BoolArgument""" | def GetInvalidArg(self, offset, index): """returns an invalid value and expected parse result by index.""" return ("-1", "kNoError", "GL_INVALID_VALUE") | e1ea91c039be302d932f52103de15e4d66c29781 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1ea91c039be302d932f52103de15e4d66c29781/build_gles2_cmd_buffer.py |
def GetNumInvalidValues(self): | def GetNumInvalidValues(self, func): | def GetNumInvalidValues(self): """returns the number of invalid values to be tested.""" if 'invalid' in self.enum_info: invalid = self.enum_info['invalid'] return len(invalid) return 0 | e1ea91c039be302d932f52103de15e4d66c29781 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1ea91c039be302d932f52103de15e4d66c29781/build_gles2_cmd_buffer.py |
return (invalid[index], "kNoError", "GL_INVALID_ENUM") return ("---ERROR1---", "kNoError", "GL_INVALID_ENUM") | return (invalid[index], "kNoError", self.gl_error) return ("---ERROR1---", "kNoError", self.gl_error) | def GetInvalidArg(self, offset, index): """returns an invalid value by index.""" if 'invalid' in self.enum_info: invalid = self.enum_info['invalid'] num_invalid = len(invalid) if index >= num_invalid: index = num_invalid - 1 return (invalid[index], "kNoError", "GL_INVALID_ENUM") return ("---ERROR1---", "kNoError", "GL_... | e1ea91c039be302d932f52103de15e4d66c29781 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1ea91c039be302d932f52103de15e4d66c29781/build_gles2_cmd_buffer.py |
def GetNumInvalidValues(self): | def GetNumInvalidValues(self, func): | def GetNumInvalidValues(self): """Overridden from Argument.""" return 2 | e1ea91c039be302d932f52103de15e4d66c29781 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e1ea91c039be302d932f52103de15e4d66c29781/build_gles2_cmd_buffer.py |
if exclude is not None and exclude(name): | head, tail = os.path.split(name) if tail in ('.svn', '.git'): | def add(self, name, arcname=None, recursive=True, exclude=None): if exclude is not None and exclude(name): return tarfile.TarFile.add(self, name, arcname=arcname, recursive=recursive) | dc270379012f31fb73a1c60394ecc8248b494005 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/dc270379012f31fb73a1c60394ecc8248b494005/export_tarball.py |
def ShouldExcludePath(path): head, tail = os.path.split(path) if tail in ('.svn', '.git'): return True if not options.remove_nonessential_files: return False for nonessential_dir in NONESSENTIAL_DIRS: if path.startswith(os.path.join(GetSourceDirectory(), nonessential_dir)): return True return False | def ShouldExcludePath(path): head, tail = os.path.split(path) if tail in ('.svn', '.git'): return True | dc270379012f31fb73a1c60394ecc8248b494005 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/dc270379012f31fb73a1c60394ecc8248b494005/export_tarball.py | |
archive.add(GetSourceDirectory(), arcname=output_basename, exclude=ShouldExcludePath) | archive.add(GetSourceDirectory(), arcname=output_basename) | def ShouldExcludePath(path): head, tail = os.path.split(path) if tail in ('.svn', '.git'): return True | dc270379012f31fb73a1c60394ecc8248b494005 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/dc270379012f31fb73a1c60394ecc8248b494005/export_tarball.py |
self.file.write(line1 + '\n') | nolint = '' if len(line1) > 80: nolint = ' // NOLINT' self.file.write(line1 + nolint + '\n') | def __WriteLine(self, line, ends_with_eol): """Given a signle line, writes it to a file, splitting if it's > 80 chars""" if len(line) >= 80: i = self.__FindSplit(line) if i > 0: line1 = line[0:i + 1] self.file.write(line1 + '\n') match = re.match("( +)", line1) indent = "" if match: indent = match.group(1) splitter = l... | f221119b3693149e42fd45c6ed62ad05af75564a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f221119b3693149e42fd45c6ed62ad05af75564a/build_gles2_cmd_buffer.py |
self.file.write(line) | nolint = '' if len(line) > 80: nolint = ' // NOLINT' self.file.write(line + nolint) | def __WriteLine(self, line, ends_with_eol): """Given a signle line, writes it to a file, splitting if it's > 80 chars""" if len(line) >= 80: i = self.__FindSplit(line) if i > 0: line1 = line[0:i + 1] self.file.write(line1 + '\n') match = re.match("( +)", line1) indent = "" if match: indent = match.group(1) splitter = l... | f221119b3693149e42fd45c6ed62ad05af75564a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f221119b3693149e42fd45c6ed62ad05af75564a/build_gles2_cmd_buffer.py |
subprocess.call(['taskkill.exe', '/PID', pid]) | subprocess.call(['taskkill.exe', '/PID', str(pid)]) | def TerminateSignalHandler(sig, stack): """When killed, try and kill our child processes.""" signal.signal(sig, signal.SIG_DFL) for pid in gChildPIDs: if 'kill' in os.__all__: # POSIX os.kill(pid, sig) else: subprocess.call(['taskkill.exe', '/PID', pid]) sys.exit(0) | edabcd69156d56093d5c167ac95d15713a2ad345 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/edabcd69156d56093d5c167ac95d15713a2ad345/coverage_posix.py |
return self._retcode | return self.retcode() | def kill(self): """Kill our running process if needed. Wait for kill to complete. | edabcd69156d56093d5c167ac95d15713a2ad345 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/edabcd69156d56093d5c167ac95d15713a2ad345/coverage_posix.py |
subprocess.call(['taskkill.exe', '/PID', self._process.pid]) self._retcode = self._process.wait() return self._retcode | subprocess.call(['taskkill.exe', '/PID', str(self._process.pid)]) return self.retcode() | def kill(self): """Kill our running process if needed. Wait for kill to complete. | edabcd69156d56093d5c167ac95d15713a2ad345 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/edabcd69156d56093d5c167ac95d15713a2ad345/coverage_posix.py |
Kill it if needed. """ return self.kill() | Waits for process to die but does NOT kill it explicitly. """ if self._retcode == None: self._retcode = self._process.wait() return self._retcode | def retcode(self): """Return the return value of the subprocess. | edabcd69156d56093d5c167ac95d15713a2ad345 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/edabcd69156d56093d5c167ac95d15713a2ad345/coverage_posix.py |
self.driver = WebDriver.WebDriver(WEBDRIVER_SERVER_URL, "chrome", "ANY"); | self.driver = WebDriver.WebDriver(WEBDRIVER_SERVER_URL, "chrome", "ANY") | def setUp(self): global WEBDRIVER_SERVER_URL global WEBDRIVER_PROCESS WEBDRIVER_PROCESS = subprocess.Popen([WEBDRIVER_EXE, '--port=%d' % WEBDRIVER_PORT]) if WEBDRIVER_PROCESS == None: print "Chromium executable not found. The path used was: " print WEBDRIVER_EXE sys.exit(-1) | bebf64c3339c8ee243bc822c538d0afdffc4a4dc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/bebf64c3339c8ee243bc822c538d0afdffc4a4dc/webdriver_remote_tests.py |
"""Preforms a string search ignoring case""" def assertFind(self, text, search): text = string.lower(text) search = string.lower(search) self.assertNotEqual(-1, string.find(text, search)) | def assertURL(self, url): u = self.driver.get_current_url() self.assertEqual(u, url) | bebf64c3339c8ee243bc822c538d0afdffc4a4dc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/bebf64c3339c8ee243bc822c538d0afdffc4a4dc/webdriver_remote_tests.py | |
self.driver.back(); | self.driver.back() | def testNavigation(self): # Loads two pages into chrome's navigation history. self.navigate(self.NEWS) self.navigate(self.SEARCH) | bebf64c3339c8ee243bc822c538d0afdffc4a4dc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/bebf64c3339c8ee243bc822c538d0afdffc4a4dc/webdriver_remote_tests.py |
self.WaitForInfobarCount(0) | def testNoTranslate(self): """Tests that a page isn't translated if the user declines translate.""" self._NavigateAndWaitForBar(self._GetDefaultSpanishURL()) self.SelectTranslateOption('decline_translation') self.WaitForInfobarCount(0) translate_info = self.GetTranslateInfo() self.assertEqual(self.spanish, translate_in... | 529ad6c9f4949b77cde6d0abeeb1549e8b1b221d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/529ad6c9f4949b77cde6d0abeeb1549e8b1b221d/translate.py | |
platform enough. | platform enough. the function seems simple: "print output of child, kill it if there is no output by timeout. But it was tricky to get this right in a x-platform way (see warnings about deadlock on the python subprocess doc page). | def TerminateSignalHandler(sig, stack): """When killed, try and kill our child processes.""" signal.signal(sig, signal.SIG_DFL) for pid in gChildPIDs: if 'kill' in os.__all__: # POSIX os.kill(pid, sig) else: subprocess.call(['taskkill.exe', '/PID', str(pid)]) sys.exit(0) | 0b67d8394464e33052775d7b89ff3d4a1016aa59 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0b67d8394464e33052775d7b89ff3d4a1016aa59/coverage_posix.py |
LINE = 0 DIED = 1 | PROGRESS = 0 DONE = 1 | def TerminateSignalHandler(sig, stack): """When killed, try and kill our child processes.""" signal.signal(sig, signal.SIG_DFL) for pid in gChildPIDs: if 'kill' in os.__all__: # POSIX os.kill(pid, sig) else: subprocess.call(['taskkill.exe', '/PID', str(pid)]) sys.exit(0) | 0b67d8394464e33052775d7b89ff3d4a1016aa59 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0b67d8394464e33052775d7b89ff3d4a1016aa59/coverage_posix.py |
self._process = subprocess.Popen(self._cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) gChildPIDs.append(self._process.pid) | stdout_file = tempfile.TemporaryFile() | def run(self): self._process = subprocess.Popen(self._cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) gChildPIDs.append(self._process.pid) try: while True: line = self._process.stdout.readline() if not line: # EOF break print line, self._queue.put(RunProgramThread.LINE, True) except IOError: pass # If we get he... | 0b67d8394464e33052775d7b89ff3d4a1016aa59 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0b67d8394464e33052775d7b89ff3d4a1016aa59/coverage_posix.py |
while True: line = self._process.stdout.readline() if not line: break print line, self._queue.put(RunProgramThread.LINE, True) except IOError: pass | self._process = subprocess.Popen(self._cmd, stdin=subprocess.PIPE, stdout=stdout_file, stderr=subprocess.STDOUT) gChildPIDs.append(self._process.pid) try: previous_tell = 0 self._retcode = None while self._retcode is None: self._retcode = self._process.poll() current_tell = stdout_file.tell() if current_tell > pr... | def run(self): self._process = subprocess.Popen(self._cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) gChildPIDs.append(self._process.pid) try: while True: line = self._process.stdout.readline() if not line: # EOF break print line, self._queue.put(RunProgramThread.LINE, True) except IOError: pass # If we get he... | 0b67d8394464e33052775d7b89ff3d4a1016aa59 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0b67d8394464e33052775d7b89ff3d4a1016aa59/coverage_posix.py |
self._queue.put(RunProgramThread.DIED) | self._queue.put(RunProgramThread.DONE) | def run(self): self._process = subprocess.Popen(self._cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) gChildPIDs.append(self._process.pid) try: while True: line = self._process.stdout.readline() if not line: # EOF break print line, self._queue.put(RunProgramThread.LINE, True) except IOError: pass # If we get he... | 0b67d8394464e33052775d7b89ff3d4a1016aa59 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0b67d8394464e33052775d7b89ff3d4a1016aa59/coverage_posix.py |
if x == RunProgramThread.DIED: | if x == RunProgramThread.DONE: | def RunUntilCompletion(self, timeout): """Run thread until completion or timeout (in seconds). | 0b67d8394464e33052775d7b89ff3d4a1016aa59 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0b67d8394464e33052775d7b89ff3d4a1016aa59/coverage_posix.py |
'-m', os.path.join(self._web_socket_tests, 'handler_map.txt'), | def Start(self): if not self._web_socket_tests: logging.info('No need to start %s server.' % self._server_name) return if self.IsRunning(): raise PyWebSocketNotStarted('%s is already running.' % self._server_name) | fec7da233ce09b1bc5d0b1b610c24e7f76eb3cb7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fec7da233ce09b1bc5d0b1b610c24e7f76eb3cb7/websocket_server.py | |
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") | 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.""" 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") | 80f44b4b6ccc8da50c7b9a9923de5fa83b838bfb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/80f44b4b6ccc8da50c7b9a9923de5fa83b838bfb/build_gles2_cmd_buffer.py |
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)): | if func.can_auto_generate and (impl_func == None or impl_func == True): | 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... | 80f44b4b6ccc8da50c7b9a9923de5fa83b838bfb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/80f44b4b6ccc8da50c7b9a9923de5fa83b838bfb/build_gles2_cmd_buffer.py |
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" % (fun... | def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | 80f44b4b6ccc8da50c7b9a9923de5fa83b838bfb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/80f44b4b6ccc8da50c7b9a9923de5fa83b838bfb/build_gles2_cmd_buffer.py | |
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... | 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") | 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);\n" % func.MakeOri... | 80f44b4b6ccc8da50c7b9a9923de5fa83b838bfb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/80f44b4b6ccc8da50c7b9a9923de5fa83b838bfb/build_gles2_cmd_buffer.py |
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 = """ ... | 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; | 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(""))) all_but_last_args = func.GetOriginalArgs()[:... | 80f44b4b6ccc8da50c7b9a9923de5fa83b838bfb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/80f44b4b6ccc8da50c7b9a9923de5fa83b838bfb/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; | 80f44b4b6ccc8da50c7b9a9923de5fa83b838bfb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/80f44b4b6ccc8da50c7b9a9923de5fa83b838bfb/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; | 80f44b4b6ccc8da50c7b9a9923de5fa83b838bfb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/80f44b4b6ccc8da50c7b9a9923de5fa83b838bfb/build_gles2_cmd_buffer.py |
main() | exit(main()) | def main(): cmd = [sys.executable] src_dir=os.path.join(os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(os.path.abspath(sys.argv[0])))))) script_dir=os.path.join(src_dir, "third_party", "WebKit", "WebKitTools", "Scripts") script = os.path.join(script_dir, 'new-run-webkit-tests') cmd.append(script) if '... | 3d6a7ab7f7d280e7876fe892cfe6522702e3c2a6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/3d6a7ab7f7d280e7876fe892cfe6522702e3c2a6/run_webkit_tests.py |
self.nonce = None | self.nonce_time = None | def serve_forever(self): self.stop = False self.nonce = None while not self.stop: self.handle_request() self.socket.close() | 5fd949eabe62eab5418762466dd6beb6d808908e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5fd949eabe62eab5418762466dd6beb6d808908e/testserver.py |
"""This handler tests 'Digest' authentication. It just sends a page with title 'user/pass' if you succeed.""" | """This handler tests 'Digest' authentication. It just sends a page with title 'user/pass' if you succeed. A stale response is sent iff "stale" is present in the request path. """ | def AuthDigestHandler(self): """This handler tests 'Digest' authentication. It just sends a page with title 'user/pass' if you succeed.""" | 5fd949eabe62eab5418762466dd6beb6d808908e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5fd949eabe62eab5418762466dd6beb6d808908e/testserver.py |
nonce_life = 10 stale = False if (not self.server.nonce or (time.time() - self.server.nonce_time > nonce_life)): if self.server.nonce: stale = True self.server.nonce_time = time.time() self.server.nonce = \ _new_md5(time.ctime(self.server.nonce_time) + 'privatekey').hexdigest() nonce = self.server.nonce | stale = 'stale' in self.path nonce = self.GetNonce(force_reset=stale) | def AuthDigestHandler(self): """This handler tests 'Digest' authentication. It just sends a page with title 'user/pass' if you succeed.""" | 5fd949eabe62eab5418762466dd6beb6d808908e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5fd949eabe62eab5418762466dd6beb6d808908e/testserver.py |
'resource_type': func.name[3:-1].lower() | 'resource_type': func.name[3:-1].lower(), 'count_name': func.GetOriginalArgs()[0].name, | def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" code = """%(return_type)s %(name)s(%(typed_args)s) { | 37bbaa22acd3239013124bc95f2dc6c88baf2d0e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/37bbaa22acd3239013124bc95f2dc6c88baf2d0e/build_gles2_cmd_buffer.py |
file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" %s_id_handler_->FreeIds(%s);\n" % (func.name[6:-1].lower(), func.MakeOriginalArgString(""))) file.Write(" helper_->%sImmediate(%s);\n" % (func.name, func.MakeOriginalArgString(""))) file.Write("}\n")... | code = """%(return_type)s %(name)s(%(typed_args)s) { if (%(count_name)s < 0) { SetGLError(GL_INVALID_VALUE, "gl%(name)s: n < 0"); return; } %(resource_type)s_id_handler_->FreeIds(%(args)s); helper_->%(name)sImmediate(%(args)s); } """ file.Write(code % { 'return_type': func.return_type, 'name': func.original_name, 'typ... | 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(" %s_id_handler_->FreeIds(%s);\n... | 37bbaa22acd3239013124bc95f2dc6c88baf2d0e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/37bbaa22acd3239013124bc95f2dc6c88baf2d0e/build_gles2_cmd_buffer.py |
GLsizei num_values = util_.GLGetNumValuesReturned(pname); if (num_values == 0) { SetGLError(GL_INVALID_ENUM, "gl%(func_name)s: invalid enum"); return error::kNoError; } | GLsizei num_values = GetNumValuesReturnedForGLGet(pname, &num_values); | code = """ typedef %(func_name)s::Result Result; | 37bbaa22acd3239013124bc95f2dc6c88baf2d0e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/37bbaa22acd3239013124bc95f2dc6c88baf2d0e/build_gles2_cmd_buffer.py |
json_file.close() | finally: json_file.close() | def parse_json_file(path, encoding="utf-8"): """ Load the specified file and parse it as JSON. Args: path: Path to a file containing JSON-encoded data. encoding: Encoding used in the file. Defaults to utf-8. Returns: A Python object representing the data encoded in the file. Raises: Exception: If the file could not... | 0132ee82dad01d9df0964ce9935f040e4d91b175 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0132ee82dad01d9df0964ce9935f040e4d91b175/directory.py |
O3D_PLUGIN_NAME = 'O3D Plugin' | O3D_PLUGIN_NAME = FLAGS.set_name | def main(argv): try: files = FLAGS(argv) # Parse flags except gflags.FlagsError, e: print '%s.\nUsage: %s [<options>] [<input_file> <output_file>]\n%s' % \ (e, sys.argv[0], FLAGS) sys.exit(1) # Strip off argv[0] files = files[1:] # Get version string from o3d_version.py o3d_version_vars = {} if FLAGS.kill_switch: ex... | f501b1e180bca772d448ae6205e0d93a79ecc387 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f501b1e180bca772d448ae6205e0d93a79ecc387/version_info.py |
O3D_PLUGIN_DESCRIPTION = '%s version:%s' % (O3D_PLUGIN_NAME, | O3D_PLUGIN_DESCRIPTION = '%s version: %s' % (O3D_PLUGIN_NAME, | def main(argv): try: files = FLAGS(argv) # Parse flags except gflags.FlagsError, e: print '%s.\nUsage: %s [<options>] [<input_file> <output_file>]\n%s' % \ (e, sys.argv[0], FLAGS) sys.exit(1) # Strip off argv[0] files = files[1:] # Get version string from o3d_version.py o3d_version_vars = {} if FLAGS.kill_switch: ex... | f501b1e180bca772d448ae6205e0d93a79ecc387 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f501b1e180bca772d448ae6205e0d93a79ecc387/version_info.py |
O3D_PLUGIN_MIME_TYPE = 'application/vnd.o3d.auto' if FLAGS.name: print '%s' % O3D_PLUGIN_NAME sys.exit(0) | O3D_PLUGIN_MIME_TYPE = FLAGS.set_mimetype | def main(argv): try: files = FLAGS(argv) # Parse flags except gflags.FlagsError, e: print '%s.\nUsage: %s [<options>] [<input_file> <output_file>]\n%s' % \ (e, sys.argv[0], FLAGS) sys.exit(1) # Strip off argv[0] files = files[1:] # Get version string from o3d_version.py o3d_version_vars = {} if FLAGS.kill_switch: ex... | f501b1e180bca772d448ae6205e0d93a79ecc387 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f501b1e180bca772d448ae6205e0d93a79ecc387/version_info.py |
sys.exit(0) if FLAGS.mimetype: print '%s' % O3D_PLUGIN_MIME_TYPE | def main(argv): try: files = FLAGS(argv) # Parse flags except gflags.FlagsError, e: print '%s.\nUsage: %s [<options>] [<input_file> <output_file>]\n%s' % \ (e, sys.argv[0], FLAGS) sys.exit(1) # Strip off argv[0] files = files[1:] # Get version string from o3d_version.py o3d_version_vars = {} if FLAGS.kill_switch: ex... | f501b1e180bca772d448ae6205e0d93a79ecc387 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f501b1e180bca772d448ae6205e0d93a79ecc387/version_info.py | |
if not cur_leak_signature: print 'Missing leak signature for the following stack: ' for frame in cur_stack: print ' ' + frame print 'Aborting...' return 3 | def Analyze(self, log_lines, check_sanity=False): """Analyzes the app's output and applies suppressions to the reports. | 7698c4287d88a0652cddd973958ceea78ec0fa17 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7698c4287d88a0652cddd973958ceea78ec0fa17/heapcheck_test.py | |
'third_party', 'WebKit', 'WebKitTools', 'Scripts', 'webkitpy', 'thirdparty', 'pywebsocket') | 'third_party', 'WebKit', 'WebKitTools', '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) | 9c5e6b0f70ceea0c70b1fa4d891f632ed635f80a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/9c5e6b0f70ceea0c70b1fa4d891f632ed635f80a/websocket_server.py |
'third_party', 'WebKit', 'WebKitTools', 'Scripts', 'webkitpy', 'thirdparty', 'pywebsocket', 'mod_pywebsocket', 'standalone.py') | 'third_party', 'WebKit', 'WebKitTools', '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) | 9c5e6b0f70ceea0c70b1fa4d891f632ed635f80a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/9c5e6b0f70ceea0c70b1fa4d891f632ed635f80a/websocket_server.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.""" | 5b712c834b0f706d7c68e57ffa10c929ee7c5a7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5b712c834b0f706d7c68e57ffa10c929ee7c5a7b/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... | 5b712c834b0f706d7c68e57ffa10c929ee7c5a7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5b712c834b0f706d7c68e57ffa10c929ee7c5a7b/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... | 5b712c834b0f706d7c68e57ffa10c929ee7c5a7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5b712c834b0f706d7c68e57ffa10c929ee7c5a7b/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... | 5b712c834b0f706d7c68e57ffa10c929ee7c5a7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5b712c834b0f706d7c68e57ffa10c929ee7c5a7b/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... | 5b712c834b0f706d7c68e57ffa10c929ee7c5a7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5b712c834b0f706d7c68e57ffa10c929ee7c5a7b/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... | 5b712c834b0f706d7c68e57ffa10c929ee7c5a7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5b712c834b0f706d7c68e57ffa10c929ee7c5a7b/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... | 5b712c834b0f706d7c68e57ffa10c929ee7c5a7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5b712c834b0f706d7c68e57ffa10c929ee7c5a7b/testserver.py |
os.mkdir(self._options.results_directory) | path_utils.maybe_make_directory(self._options.results_directory) | def __init__(self, options): self._options = options | 4ea07c2d2aa22ded66491b1bd7ff838aab0a70c5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/4ea07c2d2aa22ded66491b1bd7ff838aab0a70c5/test_output_xml_to_json.py |
"""Download a file from downloads data directory. | """Download a file from downloads data directory, in first tab first window. | def DownloadFileFromDownloadsDataDir(test, file_name): """Download a file from downloads data directory. Args: test: derived from pyauto.PyUITest - base class for UI test cases file_name: name of file to download """ download_dir = os.path.join(os.path.abspath(test.DataDir()), 'downloads') downloaded_pkg = os.path.joi... | 4f5f35c401ade94e518a35c77a029b72f22b9c5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/4f5f35c401ade94e518a35c77a029b72f22b9c5d/test_utils.py |
download_dir = os.path.join(os.path.abspath(test.DataDir()), 'downloads') | file_url = test.GetFileURLForDataPath(os.path.join('downloads', file_name)) | def DownloadFileFromDownloadsDataDir(test, file_name): """Download a file from downloads data directory. Args: test: derived from pyauto.PyUITest - base class for UI test cases file_name: name of file to download """ download_dir = os.path.join(os.path.abspath(test.DataDir()), 'downloads') downloaded_pkg = os.path.joi... | 4f5f35c401ade94e518a35c77a029b72f22b9c5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/4f5f35c401ade94e518a35c77a029b72f22b9c5d/test_utils.py |
A notification can be canceled even if it has not been shown yet. | This function should NOT be called until |WaitForNotificationCount| has been used to verify the notification is showing. This function cannot be used to cancel a notification that is in the display queue. | def _CancelNotification(self, notification_id, tab_index=0, windex=0): """Cancels a notification with the given id. | 435c54d0bfc12ea06eae2143c91812f1ae4112b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/435c54d0bfc12ea06eae2143c91812f1ae4112b7/notifications.py |
self._CallJavascriptFunc( | msg = self._CallJavascriptFunc( | def _CancelNotification(self, notification_id, tab_index=0, windex=0): """Cancels a notification with the given id. | 435c54d0bfc12ea06eae2143c91812f1ae4112b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/435c54d0bfc12ea06eae2143c91812f1ae4112b7/notifications.py |
self.assertEquals(len(self.GetActiveNotifications()), 1) | self.assertEquals(1, len(self.GetActiveNotifications())) | def testCreateSimpleNotification(self): """Creates a simple notification.""" self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) self._CreateSimpleNotification('no_such_file.png', 'My Title', 'My Body') self.assertEquals(len(self.GetActiveNotifications()), 1) notification = self.GetActiveNotifications()[0] h... | 435c54d0bfc12ea06eae2143c91812f1ae4112b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/435c54d0bfc12ea06eae2143c91812f1ae4112b7/notifications.py |
self.assertEquals(len(self.GetActiveNotifications()), 1) | self.assertEquals(1, len(self.GetActiveNotifications())) | def testCreateHTMLNotification(self): """Creates an HTML notification using a fake url.""" self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) self._CreateHTMLNotification(self.NO_SUCH_URL) self.assertEquals(len(self.GetActiveNotifications()), 1) notification = self.GetActiveNotifications()[0] self.assertEqu... | 435c54d0bfc12ea06eae2143c91812f1ae4112b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/435c54d0bfc12ea06eae2143c91812f1ae4112b7/notifications.py |
self.assertEquals(len(self.GetActiveNotifications()), 0) | self.assertFalse(self.GetActiveNotifications()) | def testCloseNotification(self): """Creates a notification and closes it.""" self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) self._CreateHTMLNotification(self.NO_SUCH_URL) self.CloseNotification(0) self.assertEquals(len(self.GetActiveNotifications()), 0) | 435c54d0bfc12ea06eae2143c91812f1ae4112b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/435c54d0bfc12ea06eae2143c91812f1ae4112b7/notifications.py |
self.assertEquals(len(self.GetActiveNotifications()), 0) | self.assertFalse(self.GetActiveNotifications()) | def testCancelNotification(self): """Creates a notification and cancels it in the origin page.""" self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) note_id = self._CreateHTMLNotification(self.NO_SUCH_URL) self.assertNotEquals(-1, note_id) self._CancelNotification(note_id) self.assertEquals(len(self.GetActi... | 435c54d0bfc12ea06eae2143c91812f1ae4112b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/435c54d0bfc12ea06eae2143c91812f1ae4112b7/notifications.py |
self.assertEquals(len(self.GetActiveNotifications()), 0) | self.assertFalse(self.GetActiveNotifications()) | def testPermissionInfobarAppears(self): """Requests notification privileges and verifies the infobar appears.""" self.NavigateToURL(self.TEST_PAGE_URL) self._RequestPermission() self.assertTrue(self.WaitForInfobarCount(1)) self.assertEquals(len(self.GetActiveNotifications()), 0) self._VerifyInfobar('') # file:/// orig... | 435c54d0bfc12ea06eae2143c91812f1ae4112b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/435c54d0bfc12ea06eae2143c91812f1ae4112b7/notifications.py |
self.assertEquals(len(self.GetActiveNotifications()), 0) | self.assertFalse(self.GetActiveNotifications()) | def testAllowOnPermissionInfobar(self): """Tries to create a notification and clicks allow on the infobar.""" self.NavigateToURL(self.TEST_PAGE_URL) # This notification should not be shown because we don't have permission. self._CreateHTMLNotification(self.NO_SUCH_URL) self.assertEquals(len(self.GetActiveNotifications(... | 435c54d0bfc12ea06eae2143c91812f1ae4112b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/435c54d0bfc12ea06eae2143c91812f1ae4112b7/notifications.py |
ssl_client_auth, ssl_client_cas): | ssl_client_auth, ssl_client_cas, ssl_bulk_ciphers): | def __init__(self, server_address, request_hander_class, cert_path, ssl_client_auth, ssl_client_cas): 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) self.ssl_cli... | 9b0dc7da8207eb16eb77a5e76830fb0dd099e78f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/9b0dc7da8207eb16eb77a5e76830fb0dd099e78f/testserver.py |
options.ssl_client_auth, options.ssl_client_ca) | options.ssl_client_auth, options.ssl_client_ca, options.ssl_bulk_cipher) | 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... | 9b0dc7da8207eb16eb77a5e76830fb0dd099e78f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/9b0dc7da8207eb16eb77a5e76830fb0dd099e78f/testserver.py |
'should indicate that it supports the CA contained ' 'in the specified certificate file') | 'should include the CA named in the subject of ' 'the DER-encoded certificate contained in the ' 'specified file. This option may appear multiple ' 'times, indicating multiple CA names should be ' 'sent in the request.') option_parser.add_option('', '--ssl-bulk-cipher', action='append', help='Specify the bulk encryptio... | 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... | 9b0dc7da8207eb16eb77a5e76830fb0dd099e78f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/9b0dc7da8207eb16eb77a5e76830fb0dd099e78f/testserver.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.