rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
def MakeGuard(self, filename): """Creates a header guard id.""" base = os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))) hpath = os.path.abspath(filename)[len(base) + 1:] return self._non_alnum_re.sub('_', hpath).upper()
def WriteNamespaceClose(self, file): """Writes the code to close the namespace.""" file.Write("} // namespace gles2\n") file.Write("} // namespace gpu\n") file.Write("\n")
20d6af8de9f49c5a4b9a5d098840a1523ad90cb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/20d6af8de9f49c5a4b9a5d098840a1523ad90cb6/build_gles2_cmd_buffer.py
file = CWriter(filename) self.WriteHeader(file)
file = CHeaderWriter(filename)
def WriteCommandIds(self, filename): """Writes the command buffer format""" file = CWriter(filename) self.WriteHeader(file) file.Write("#define GLES2_COMMAND_LIST(OP) \\\n") for func in self.functions: if not func.name in _CMD_ID_TABLE: self.Error("Command %s not in _CMD_ID_TABLE" % func.name) file.Write(" %-60s /* %d...
20d6af8de9f49c5a4b9a5d098840a1523ad90cb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/20d6af8de9f49c5a4b9a5d098840a1523ad90cb6/build_gles2_cmd_buffer.py
file = CWriter(filename) self.WriteHeader(file)
file = CHeaderWriter(filename)
def WriteFormat(self, filename): """Writes the command buffer format""" file = CWriter(filename) self.WriteHeader(file)
20d6af8de9f49c5a4b9a5d098840a1523ad90cb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/20d6af8de9f49c5a4b9a5d098840a1523ad90cb6/build_gles2_cmd_buffer.py
def WriteFormat(self, filename): """Writes the command buffer format""" file = CWriter(filename) self.WriteHeader(file)
20d6af8de9f49c5a4b9a5d098840a1523ad90cb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/20d6af8de9f49c5a4b9a5d098840a1523ad90cb6/build_gles2_cmd_buffer.py
file = CWriter(filename) self.WriteHeader(file) file.Write("// This file contains unit tests for gles2 commmands\n") file.Write("// It is included by gles2_cmd_format_test.cc\n") file.Write("\n")
file = CHeaderWriter( filename, "// This file contains unit tests for gles2 commmands\n" "// It is included by gles2_cmd_format_test.cc\n" "\n")
def WriteFormatTest(self, filename): """Writes the command buffer format test.""" file = CWriter(filename) self.WriteHeader(file) file.Write("// This file contains unit tests for gles2 commmands\n") file.Write("// It is included by gles2_cmd_format_test.cc\n") file.Write("\n")
20d6af8de9f49c5a4b9a5d098840a1523ad90cb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/20d6af8de9f49c5a4b9a5d098840a1523ad90cb6/build_gles2_cmd_buffer.py
file = CWriter(filename) file.Write("// This file contains unit tests for gles2 commmand ids\n") file.Write("\n")
file = CHeaderWriter( filename, "// This file contains unit tests for gles2 commmand ids\n")
def WriteCommandIdTest(self, filename): """Writes the command id test.""" file = CWriter(filename) file.Write("// This file contains unit tests for gles2 commmand ids\n") file.Write("\n")
20d6af8de9f49c5a4b9a5d098840a1523ad90cb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/20d6af8de9f49c5a4b9a5d098840a1523ad90cb6/build_gles2_cmd_buffer.py
file = CWriter(filename)
file = CHeaderWriter(filename)
def WriteCmdHelperHeader(self, filename): """Writes the gles2 command helper.""" file = CWriter(filename)
20d6af8de9f49c5a4b9a5d098840a1523ad90cb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/20d6af8de9f49c5a4b9a5d098840a1523ad90cb6/build_gles2_cmd_buffer.py
file = CWriter(filename) self.WriteHeader(file) file.Write("// It is included by gles2_cmd_decoder.cc\n") file.Write("\n")
file = CHeaderWriter( filename, "// It is included by gles2_cmd_decoder.cc\n")
def WriteServiceImplementation(self, filename): """Writes the service decorder implementation.""" file = CWriter(filename) self.WriteHeader(file) file.Write("// It is included by gles2_cmd_decoder.cc\n") file.Write("\n")
20d6af8de9f49c5a4b9a5d098840a1523ad90cb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/20d6af8de9f49c5a4b9a5d098840a1523ad90cb6/build_gles2_cmd_buffer.py
file = CWriter(filename) self.WriteHeader(file) file.Write("\n") file.Write("// These functions emluate GLES2 over command buffers.\n") file.Write("\n") file.Write("\n")
file = CHeaderWriter( filename, "// These functions emluate GLES2 over command buffers.\n")
def WriteGLES2CLibImplementation(self, filename): """Writes the GLES2 c lib implementation.""" file = CWriter(filename) self.WriteHeader(file) file.Write("\n") file.Write("// These functions emluate GLES2 over command buffers.\n") file.Write("\n") file.Write("\n")
20d6af8de9f49c5a4b9a5d098840a1523ad90cb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/20d6af8de9f49c5a4b9a5d098840a1523ad90cb6/build_gles2_cmd_buffer.py
file = CWriter(filename) self.WriteHeader(file) file.Write( "// This file is included by gles2_implementation.h to declare the\n") file.Write("// GL api functions.\n")
file = CHeaderWriter( filename, "// This file is included by gles2_implementation.h to declare the\n" "// GL api functions.\n")
def WriteGLES2ImplementationHeader(self, filename): """Writes the GLES2 helper header.""" file = CWriter(filename) self.WriteHeader(file) file.Write( "// This file is included by gles2_implementation.h to declare the\n") file.Write("// GL api functions.\n") for func in self.original_functions: func.WriteGLES2Implementa...
20d6af8de9f49c5a4b9a5d098840a1523ad90cb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/20d6af8de9f49c5a4b9a5d098840a1523ad90cb6/build_gles2_cmd_buffer.py
file = CWriter(filename) self.WriteLicense(file) file.Write("\n") file.Write("// A class to emluate GLES2 over command buffers.\n") file.Write("\n")
file = CHeaderWriter( filename, "// A class to emluate GLES2 over command buffers.\n")
def WriteGLES2ImplementationImpl(self, filename): """Writes the gles2 helper implementation.""" file = CWriter(filename) self.WriteLicense(file) file.Write("\n") file.Write("// A class to emluate GLES2 over command buffers.\n") file.Write("\n") file.Write( "#include \"gpu/command_buffer/client/gles2_implementation.h\"\...
20d6af8de9f49c5a4b9a5d098840a1523ad90cb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/20d6af8de9f49c5a4b9a5d098840a1523ad90cb6/build_gles2_cmd_buffer.py
file.Write("\n")
def WriteGLES2ImplementationImpl(self, filename): """Writes the gles2 helper implementation.""" file = CWriter(filename) self.WriteLicense(file) file.Write("\n") file.Write("// A class to emluate GLES2 over command buffers.\n") file.Write("\n") file.Write( "#include \"gpu/command_buffer/client/gles2_implementation.h\"\...
20d6af8de9f49c5a4b9a5d098840a1523ad90cb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/20d6af8de9f49c5a4b9a5d098840a1523ad90cb6/build_gles2_cmd_buffer.py
file = CWriter(filename) self.WriteHeader(file) file.Write("\n")
file = CHeaderWriter(filename)
def WriteServiceUtilsHeader(self, filename): """Writes the gles2 auto generated utility header.""" file = CWriter(filename) self.WriteHeader(file) file.Write("\n") for enum in _ENUM_LISTS: file.Write("bool ValidateGLenum%s(GLenum value);\n" % enum) file.Write("\n") file.Close()
20d6af8de9f49c5a4b9a5d098840a1523ad90cb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/20d6af8de9f49c5a4b9a5d098840a1523ad90cb6/build_gles2_cmd_buffer.py
file.Write("bool ValidateGLenum%s(GLenum value);\n" % enum)
file.Write("bool Validate%s%s(GLenum value);\n" % (_ENUM_LISTS[enum]['type'], enum))
def WriteServiceUtilsHeader(self, filename): """Writes the gles2 auto generated utility header.""" file = CWriter(filename) self.WriteHeader(file) file.Write("\n") for enum in _ENUM_LISTS: file.Write("bool ValidateGLenum%s(GLenum value);\n" % enum) file.Write("\n") file.Close()
20d6af8de9f49c5a4b9a5d098840a1523ad90cb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/20d6af8de9f49c5a4b9a5d098840a1523ad90cb6/build_gles2_cmd_buffer.py
file = CWriter(filename) self.WriteHeader(file) file.Write("\n")
file = CHeaderWriter(filename)
def WriteServiceUtilsImplementation(self, filename): """Writes the gles2 auto generated utility implementation.""" file = CWriter(filename) self.WriteHeader(file) file.Write("\n") for enum in _ENUM_LISTS: file.Write("bool ValidateGLenum%s(GLenum value) {\n" % enum) file.Write(" switch (value) {\n") for value in _ENUM_...
20d6af8de9f49c5a4b9a5d098840a1523ad90cb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/20d6af8de9f49c5a4b9a5d098840a1523ad90cb6/build_gles2_cmd_buffer.py
file.Write("bool ValidateGLenum%s(GLenum value) {\n" % enum)
file.Write("bool Validate%s%s(GLenum value) {\n" % (_ENUM_LISTS[enum]['type'], enum))
def WriteServiceUtilsImplementation(self, filename): """Writes the gles2 auto generated utility implementation.""" file = CWriter(filename) self.WriteHeader(file) file.Write("\n") for enum in _ENUM_LISTS: file.Write("bool ValidateGLenum%s(GLenum value) {\n" % enum) file.Write(" switch (value) {\n") for value in _ENUM_...
20d6af8de9f49c5a4b9a5d098840a1523ad90cb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/20d6af8de9f49c5a4b9a5d098840a1523ad90cb6/build_gles2_cmd_buffer.py
for value in _ENUM_LISTS[enum]:
for value in _ENUM_LISTS[enum]['valid']:
def WriteServiceUtilsImplementation(self, filename): """Writes the gles2 auto generated utility implementation.""" file = CWriter(filename) self.WriteHeader(file) file.Write("\n") for enum in _ENUM_LISTS: file.Write("bool ValidateGLenum%s(GLenum value) {\n" % enum) file.Write(" switch (value) {\n") for value in _ENUM_...
20d6af8de9f49c5a4b9a5d098840a1523ad90cb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/20d6af8de9f49c5a4b9a5d098840a1523ad90cb6/build_gles2_cmd_buffer.py
def fix_glsl_body(body, input_mapping): # Change uniform names back to original. for match in re.findall(r'(?m)^uniform (?:\w+) (\w+)', body): body = re.sub(r'\b%s\b' % match, input_mapping[match], body) # Change attribute names back to original. for match in re.findall(r'(?m)^attribute (?:\w+) (\w+)', body): attr_nam...
5bc7c0df9dd608a5f5fba706b6e1455b01c7b371 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5bc7c0df9dd608a5f5fba706b6e1455b01c7b371/convert.py
body = re.sub(r'\bgl_MultiTexCoord%d\b' % n, 'texcoord%d' % n, body) attributes.append('attribute vec4 texcoord%d;' % n)
body = re.sub(r'\bgl_MultiTexCoord%d\b' % n, 'texCoord%d' % n, body) attributes.append('attribute vec4 texCoord%d;' % n)
def fix_glsl_body(body, input_mapping): # Change uniform names back to original. for match in re.findall(r'(?m)^uniform (?:\w+) (\w+)', body): body = re.sub(r'\b%s\b' % match, input_mapping[match], body) # Change attribute names back to original. for match in re.findall(r'(?m)^attribute (?:\w+) (\w+)', body): attr_nam...
5bc7c0df9dd608a5f5fba706b6e1455b01c7b371 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5bc7c0df9dd608a5f5fba706b6e1455b01c7b371/convert.py
def RenderPage(name, test_shell): """ Calls test_shell --layout-tests .../generator.html?<name> and writes the result to .../docs/<name>.html """ if not name: raise Exception("RenderPage called with empty name") generator_url = "file:" + urllib.pathname2url(_generator_html) + "?" + name input_file = _base_dir + "/" + ...
8b9587d42ad15f4c9f9fe725fde213e8d474ddaa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8b9587d42ad15f4c9f9fe725fde213e8d474ddaa/build.py
result = result[content_start:content_end + len(_expected_output_postamble)] + "\n"
postamble_length = len(_expected_output_postamble) result = result[content_start:content_end + postamble_length] + "\n"
def RenderPage(name, test_shell): """ Calls test_shell --layout-tests .../generator.html?<name> and writes the result to .../docs/<name>.html """ if not name: raise Exception("RenderPage called with empty name") generator_url = "file:" + urllib.pathname2url(_generator_html) + "?" + name input_file = _base_dir + "/" + ...
8b9587d42ad15f4c9f9fe725fde213e8d474ddaa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8b9587d42ad15f4c9f9fe725fde213e8d474ddaa/build.py
os.path.exists(downloaded_pkg) and os.remove(downloaded_pkg)
self._ClearLocalDownloadState(downloaded_pkg)
def testZip(self): """Download a zip and verify that it downloaded correctly. Also verify that the download shelf showed up. """ test_dir = os.path.join(os.path.abspath(self.DataDir()), 'downloads') file_path = os.path.join(test_dir, 'a_zip_file.zip') file_url = self.GetFileURLForPath(file_path) downloaded_pkg = os.pat...
b5612e1d043bb450479eccd2c082d6e2f4422522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b5612e1d043bb450479eccd2c082d6e2f4422522/downloads.py
os.path.exists(downloaded_pkg) and os.remove(downloaded_pkg)
self._ClearLocalDownloadState(downloaded_pkg)
def testZipInIncognito(self): """Download and verify a zip in incognito window.""" test_dir = os.path.join(os.path.abspath(self.DataDir()), 'downloads') file_path = os.path.join(test_dir, 'a_zip_file.zip') file_url = self.GetFileURLForPath(file_path) downloaded_pkg = os.path.join(self.GetDownloadDirectory().value(), 'a...
b5612e1d043bb450479eccd2c082d6e2f4422522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b5612e1d043bb450479eccd2c082d6e2f4422522/downloads.py
os.path.exists(downloaded_pkg) and os.remove(downloaded_pkg)
self._ClearLocalDownloadState(downloaded_pkg)
def testSaveDangerousFile(self): """Verify that we can download and save a dangerous file.""" file_path = self._GetDangerousDownload() file_url = self.GetFileURLForPath(file_path) downloaded_pkg = os.path.join(self.GetDownloadDirectory().value(), os.path.basename(file_path)) os.path.exists(downloaded_pkg) and os.remove...
b5612e1d043bb450479eccd2c082d6e2f4422522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b5612e1d043bb450479eccd2c082d6e2f4422522/downloads.py
os.path.exists(downloaded_pkg) and os.remove(downloaded_pkg)
self._ClearLocalDownloadState(downloaded_pkg)
def testDeclineDangerousDownload(self): """Verify that we can decline dangerous downloads""" file_path = self._GetDangerousDownload() file_url = self.GetFileURLForPath(file_path) downloaded_pkg = os.path.join(self.GetDownloadDirectory().value(), os.path.basename(file_path)) os.path.exists(downloaded_pkg) and os.remove(...
b5612e1d043bb450479eccd2c082d6e2f4422522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b5612e1d043bb450479eccd2c082d6e2f4422522/downloads.py
os.path.exists(downloaded_pkg) and os.remove(downloaded_pkg)
self._ClearLocalDownloadState(downloaded_pkg)
def testRemoveDownload(self): """Verify that we can remove a download.""" test_dir = os.path.join(os.path.abspath(self.DataDir()), 'downloads') file_path = os.path.join(test_dir, 'a_zip_file.zip') file_url = self.GetFileURLForPath(file_path) downloaded_pkg = os.path.join(self.GetDownloadDirectory().value(), 'a_zip_file...
b5612e1d043bb450479eccd2c082d6e2f4422522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b5612e1d043bb450479eccd2c082d6e2f4422522/downloads.py
os.path.exists(downloaded_pkg) and os.remove(downloaded_pkg)
self._ClearLocalDownloadState(downloaded_pkg)
def testBigZip(self): """Verify that we can download a 1GB file.
b5612e1d043bb450479eccd2c082d6e2f4422522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b5612e1d043bb450479eccd2c082d6e2f4422522/downloads.py
os.path.exists(expected_filename) and os.remove(expected_filename)
self._ClearLocalDownloadState(expected_filename)
def testFileRenaming(self): """Test file renaming when downloading a already-existing filename.""" test_dir = os.path.join(os.path.abspath(self.DataDir()), 'downloads') file_url = 'file://%s' % os.path.join(test_dir, 'a_zip_file.zip') download_dir = self.GetDownloadDirectory().value()
b5612e1d043bb450479eccd2c082d6e2f4422522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b5612e1d043bb450479eccd2c082d6e2f4422522/downloads.py
os.path.exists(downloaded_file) and os.remove(downloaded_file)
self._ClearLocalDownloadState(downloaded_file)
def _CreateFile(name): """Create and fill the given file with some junk.""" fp = open(name, 'w') # name could be unicode print >>fp, 'This is a junk file named %s. ' % repr(name) * 100 fp.close()
b5612e1d043bb450479eccd2c082d6e2f4422522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b5612e1d043bb450479eccd2c082d6e2f4422522/downloads.py
os.path.exists(downloaded_pkg) and os.remove(downloaded_pkg)
self._ClearLocalDownloadState(downloaded_pkg)
def testNoUnsafeDownloadsOnRestart(self): """Verify that unsafe file should not show up on session restart.""" file_path = self._GetDangerousDownload() file_url = self.GetFileURLForPath(file_path) downloaded_pkg = os.path.join(self.GetDownloadDirectory().value(), os.path.basename(file_path)) os.path.exists(downloaded_p...
b5612e1d043bb450479eccd2c082d6e2f4422522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b5612e1d043bb450479eccd2c082d6e2f4422522/downloads.py
os.path.exists(downloaded_pkg) and os.remove(downloaded_pkg)
self._ClearLocalDownloadState(downloaded_pkg)
def testPauseAndResume(self): """Verify that pause and resume work while downloading a file.
b5612e1d043bb450479eccd2c082d6e2f4422522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b5612e1d043bb450479eccd2c082d6e2f4422522/downloads.py
os.path.exists(downloaded_pkg) and os.remove(downloaded_pkg)
self._ClearLocalDownloadState(downloaded_pkg)
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(),...
b5612e1d043bb450479eccd2c082d6e2f4422522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b5612e1d043bb450479eccd2c082d6e2f4422522/downloads.py
os.path.exists(downloaded_pkg) and os.remove(downloaded_pkg)
self._ClearLocalDownloadState(downloaded_pkg)
def testDownloadsPersistence(self): """Verify that download history persists on session restart.""" test_dir = os.path.join(os.path.abspath(self.DataDir()), 'downloads') file_url = self.GetFileURLForPath(os.path.join(test_dir, 'a_zip_file.zip')) downloaded_pkg = os.path.join(self.GetDownloadDirectory().value(), 'a_zip_...
b5612e1d043bb450479eccd2c082d6e2f4422522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b5612e1d043bb450479eccd2c082d6e2f4422522/downloads.py
os.path.exists(downloaded_pkg) and os.remove(downloaded_pkg)
self._ClearLocalDownloadState(downloaded_pkg)
def testDownloadTheme(self): """Verify downloading and saving a theme file installs the theme.""" test_dir = os.path.join(os.path.abspath(self.DataDir()), 'extensions') file_url = self.GetFileURLForPath(os.path.join(test_dir, 'theme.crx')) downloaded_pkg = os.path.join(self.GetDownloadDirectory().value(), 'theme.crx') ...
b5612e1d043bb450479eccd2c082d6e2f4422522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b5612e1d043bb450479eccd2c082d6e2f4422522/downloads.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...
c8175ebacc4ab1518f518b9358fe9999f35bca7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/c8175ebacc4ab1518f518b9358fe9999f35bca7a/version_info.py
raise Exception("RenderPage called with empty name");
raise Exception("RenderPage called with empty name")
def RenderPage(name, test_shell): """ Calls test_shell --layout-tests .../generator.html?<name> and writes the result to .../docs/<name>.html """ if not name: raise Exception("RenderPage called with empty name"); generator_url = "file:" + urllib.pathname2url(_generator_html) + "?" + name input_file = _base_dir + "/" +...
747e1347b0e946512c0d150a9c27409c981ad637 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/747e1347b0e946512c0d150a9c27409c981ad637/build.py
original = None;
original = None
def RenderPage(name, test_shell): """ Calls test_shell --layout-tests .../generator.html?<name> and writes the result to .../docs/<name>.html """ if not name: raise Exception("RenderPage called with empty name"); generator_url = "file:" + urllib.pathname2url(_generator_html) + "?" + name input_file = _base_dir + "/" +...
747e1347b0e946512c0d150a9c27409c981ad637 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/747e1347b0e946512c0d150a9c27409c981ad637/build.py
open(input_file, 'wb').write(result);
open(input_file, 'wb').write(result)
def RenderPage(name, test_shell): """ Calls test_shell --layout-tests .../generator.html?<name> and writes the result to .../docs/<name>.html """ if not name: raise Exception("RenderPage called with empty name"); generator_url = "file:" + urllib.pathname2url(_generator_html) + "?" + name input_file = _base_dir + "/" +...
747e1347b0e946512c0d150a9c27409c981ad637 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/747e1347b0e946512c0d150a9c27409c981ad637/build.py
return set(os.path.splitext(file)[0] for file in static_files if file.endswith(".html"))
return set(os.path.splitext(file_name)[0] for file_name in static_files if file_name.endswith(".html"))
def GetStaticFileNames(): static_files = os.listdir(_static_dir) return set(os.path.splitext(file)[0] for file in static_files if file.endswith(".html"))
747e1347b0e946512c0d150a9c27409c981ad637 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/747e1347b0e946512c0d150a9c27409c981ad637/build.py
"Please run the build.bat script.");
"Please run the build.bat script.")
def main(): # Prevent windows from using cygwin python. if (sys.platform == "cygwin"): raise Exception("Building docs not supported for cygwin python.\n" "Please run the build.bat script."); parser = OptionParser() parser.add_option("--test-shell-path", dest="test_shell_path") (options, args) = parser.parse_args() if...
747e1347b0e946512c0d150a9c27409c981ad637 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/747e1347b0e946512c0d150a9c27409c981ad637/build.py
print f;
print f
def main(): # Prevent windows from using cygwin python. if (sys.platform == "cygwin"): raise Exception("Building docs not supported for cygwin python.\n" "Please run the build.bat script."); parser = OptionParser() parser.add_option("--test-shell-path", dest="test_shell_path") (options, args) = parser.parse_args() if...
747e1347b0e946512c0d150a9c27409c981ad637 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/747e1347b0e946512c0d150a9c27409c981ad637/build.py
time.sleep(1); debug_log = os.path.normpath(_build_dir + "/" + "debug.log");
time.sleep(1) debug_log = os.path.normpath(_build_dir + "/" + "debug.log")
def main(): # Prevent windows from using cygwin python. if (sys.platform == "cygwin"): raise Exception("Building docs not supported for cygwin python.\n" "Please run the build.bat script."); parser = OptionParser() parser.add_option("--test-shell-path", dest="test_shell_path") (options, args) = parser.parse_args() if...
747e1347b0e946512c0d150a9c27409c981ad637 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/747e1347b0e946512c0d150a9c27409c981ad637/build.py
return 0;
return os.EX_OK
def main(): # Prevent windows from using cygwin python. if (sys.platform == "cygwin"): raise Exception("Building docs not supported for cygwin python.\n" "Please run the build.bat script."); parser = OptionParser() parser.add_option("--test-shell-path", dest="test_shell_path") (options, args) = parser.parse_args() if...
747e1347b0e946512c0d150a9c27409c981ad637 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/747e1347b0e946512c0d150a9c27409c981ad637/build.py
symbol_file = 'chrome.breakpad.ia64'
symbol_file = 'chrome.breakpad.x64'
def main_linux(options, args): # minidump_stackwalk is part of Google Breakpad. You may need to checkout # the code and build your own copy. http://google-breakpad.googlecode.com/ LINUX_PROCESSOR = 'minidump_stackwalk' processor_bin = None if options.processor_dir: bin = os.path.join(os.path.expanduser(options.processo...
23d25ac9cec199beaa4a114e3a523b52f314e254 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/23d25ac9cec199beaa4a114e3a523b52f314e254/process_dumps_linux.py
if 'regress' in perf_data[key]: if 'improve' not in perf_data[key]: bad_keys.append(key) if (not isinstance(perf_data[key]['regress'], int) and not isinstance(perf_data[key]['regress'], float)): bad_keys.append(key) if (not isinstance(perf_data[key]['improve'], int) and not isinstance(perf_data[key]['improve'], float...
if 'delta' not in perf_data[key] or 'var' not in perf_data[key]: bad_keys.append(key) if (not isinstance(perf_data[key]['delta'], int) and not isinstance(perf_data[key]['delta'], float)): bad_keys.append(key) if (not isinstance(perf_data[key]['var'], int) and not isinstance(perf_data[key]['var'], float)): bad_keys.appe...
def testPerfExpectations(self): perf_data = LoadData()
97ffcd5e9694a4ce90b87c2119bc06825b11e960 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/97ffcd5e9694a4ce90b87c2119bc06825b11e960/perf_expectations_unittest.py
self.races = []
self.reports = []
def __init__(self, source_dir, files): '''Reads in a set of files.
3c013d85adbf98cad2aa5710b44488856eb85686 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/3c013d85adbf98cad2aa5710b44488856eb85686/drmemory_analyze.py
self.races.append(tmp)
self.reports.append(tmp) elif self.line_.startswith("ASSERT FAILURE"): self.reports.append(self.line_.strip())
def ParseReportFile(self, filename): self.cur_fd_ = open(filename, 'r')
3c013d85adbf98cad2aa5710b44488856eb85686 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/3c013d85adbf98cad2aa5710b44488856eb85686/drmemory_analyze.py
if len(self.races) > 0: logging.error("Found %i error reports" % len(self.races)) for report_list in self.races:
if len(self.reports) > 0: logging.error("Found %i error reports" % len(self.reports)) for report_list in self.reports:
def Report(self, check_sanity): sys.stdout.flush() #TODO(timurrrr): support positive tests / check_sanity==True
3c013d85adbf98cad2aa5710b44488856eb85686 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/3c013d85adbf98cad2aa5710b44488856eb85686/drmemory_analyze.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, valgrind_test_args=None, cmd_args=None): cmd = self._DefaultCommand(module, name, valgrind_test_args) self._ReadGtestFilterFile(name, cmd) if cmd_args: cmd.extend(["--"]) cmd.extend(cmd_args)
e26681857433768acbc503462bf0681719df0260 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e26681857433768acbc503462bf0681719df0260/chrome_tests.py
if path.startswith('ie\\') or path.startswith('common\\'):
if (ie_paths_re.match(path)):
def CheckUnittestsRan(input_api, output_api, committing): '''Checks that the unittests success file is newer than any modified file''' # But only if there were IE files modified, since we only have unit tests # for CEEE IE. files = [] for f in input_api.AffectedFiles(include_deletes = False): path = f.LocalPath() if pa...
4f8bdff2472dccf3c5e18aa88769cb907fbe1b71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/4f8bdff2472dccf3c5e18aa88769cb907fbe1b71/ceee_presubmit.py
overide_config_name = 'chromium.sync-branch' override_branch_name = RunGit(['config', '--get', overide_config_name])
override_branch_name = GetOverrideShortBranchName()
def GetGClientBranchName(): """Returns the name of the magic branch that lets us know that DEPS is managing the update cycle.""" # Is there an override branch specified? overide_config_name = 'chromium.sync-branch' override_branch_name = RunGit(['config', '--get', overide_config_name]) if not override_branch_name: retu...
2fc2546019208ea2784e6215856dd6cec50dfa4d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/2fc2546019208ea2784e6215856dd6cec50dfa4d/sync-webkit-git.py
subprocess.check_call(['git', 'fetch'], shell=(os.name == 'nt'))
subprocess.check_call(['git', 'fetch', GetRemote()], shell=(os.name == 'nt'))
def UpdateGClientBranch(webkit_rev, magic_gclient_branch): """Update the magic gclient branch to point at |webkit_rev|. Returns: true if the branch didn't need changes.""" target = FindSVNRev(webkit_rev) if not target: print "r%s not available; fetching." % webkit_rev subprocess.check_call(['git', 'fetch'], shell=(os....
2fc2546019208ea2784e6215856dd6cec50dfa4d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/2fc2546019208ea2784e6215856dd6cec50dfa4d/sync-webkit-git.py
output += "Suppression (error hash=
output += "Suppression (error hash=
def __str__(self): ''' Pretty print the type and backtrace(s) of this specific error, including suppression (which is just a mangled backtrace).''' output = "" if (self._commandline): output += self._commandline + "\n"
6839697d91ea795df5471a1e0c3328dd14172e00 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/6839697d91ea795df5471a1e0c3328dd14172e00/memcheck_analyze.py
cur_report_errors.add("This error was already printed " "in some other test, see 'hash=
cur_report_errors.add("This error was already printed in " "some other test, see 'hash=
def Report(self, files, check_sanity=False): '''Reads in a set of files and prints Memcheck report.
6839697d91ea795df5471a1e0c3328dd14172e00 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/6839697d91ea795df5471a1e0c3328dd14172e00/memcheck_analyze.py
crx_file = os.path.join(self.DataDir(), 'extensions', 'theme.crx')
crx_file = os.path.abspath( os.path.join(self.DataDir(), 'extensions', 'theme.crx'))
def testSetTheme(self): """Verify theme install.""" self.assertFalse(self.GetThemeInfo()) # Verify there's no theme at startup crx_file = os.path.join(self.DataDir(), 'extensions', 'theme.crx') self.assertTrue(self.SetTheme(pyauto.FilePath(crx_file))) theme = self.GetThemeInfo() self.assertEqual('camo theme', theme['n...
a8f954dd8c406aeb4323c7c1a70a7ef87f1e5efa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a8f954dd8c406aeb4323c7c1a70a7ef87f1e5efa/themes.py
crx_file = os.path.join(self.DataDir(), 'extensions', 'theme.crx')
crx_file = os.path.abspath( os.path.join(self.DataDir(), 'extensions', 'theme.crx'))
def testThemeReset(self): """Verify theme reset.""" crx_file = os.path.join(self.DataDir(), 'extensions', 'theme.crx') self.assertTrue(self.SetTheme(pyauto.FilePath(crx_file))) self.assertTrue(self.ResetToDefaultTheme()) self.assertFalse(self.GetThemeInfo())
a8f954dd8c406aeb4323c7c1a70a7ef87f1e5efa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a8f954dd8c406aeb4323c7c1a70a7ef87f1e5efa/themes.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...
a5eba71687a62fcb4b39f5733a699dba889f0b71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a5eba71687a62fcb4b39f5733a699dba889f0b71/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...
a5eba71687a62fcb4b39f5733a699dba889f0b71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a5eba71687a62fcb4b39f5733a699dba889f0b71/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...
a5eba71687a62fcb4b39f5733a699dba889f0b71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a5eba71687a62fcb4b39f5733a699dba889f0b71/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...
a5eba71687a62fcb4b39f5733a699dba889f0b71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a5eba71687a62fcb4b39f5733a699dba889f0b71/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)
a5eba71687a62fcb4b39f5733a699dba889f0b71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a5eba71687a62fcb4b39f5733a699dba889f0b71/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)
a5eba71687a62fcb4b39f5733a699dba889f0b71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a5eba71687a62fcb4b39f5733a699dba889f0b71/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...
a5eba71687a62fcb4b39f5733a699dba889f0b71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a5eba71687a62fcb4b39f5733a699dba889f0b71/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...
a5eba71687a62fcb4b39f5733a699dba889f0b71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a5eba71687a62fcb4b39f5733a699dba889f0b71/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
a5eba71687a62fcb4b39f5733a699dba889f0b71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a5eba71687a62fcb4b39f5733a699dba889f0b71/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")
a5eba71687a62fcb4b39f5733a699dba889f0b71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a5eba71687a62fcb4b39f5733a699dba889f0b71/build_gles2_cmd_buffer.py
def GetNumInvalidValues(self):
def GetNumInvalidValues(self, func):
def GetNumInvalidValues(self): """overridden from Argument.""" return 1
a5eba71687a62fcb4b39f5733a699dba889f0b71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a5eba71687a62fcb4b39f5733a699dba889f0b71/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")
a5eba71687a62fcb4b39f5733a699dba889f0b71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a5eba71687a62fcb4b39f5733a699dba889f0b71/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")
a5eba71687a62fcb4b39f5733a699dba889f0b71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a5eba71687a62fcb4b39f5733a699dba889f0b71/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
a5eba71687a62fcb4b39f5733a699dba889f0b71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a5eba71687a62fcb4b39f5733a699dba889f0b71/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_...
a5eba71687a62fcb4b39f5733a699dba889f0b71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a5eba71687a62fcb4b39f5733a699dba889f0b71/build_gles2_cmd_buffer.py
def GetNumInvalidValues(self):
def GetNumInvalidValues(self, func):
def GetNumInvalidValues(self): """Overridden from Argument.""" return 2
a5eba71687a62fcb4b39f5733a699dba889f0b71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a5eba71687a62fcb4b39f5733a699dba889f0b71/build_gles2_cmd_buffer.py
_NAME_RE = re.compile('[A-Za-z0-9_]+')
_NAME_RE = re.compile('^[A-Za-z0-9_]+$')
def ToTclibMessage(self): msg = grit.extern.tclib.Message( 'utf-8', id=self.id, meaning=self.meaning) self.FillTclibBaseMessage(msg) return msg
ff27fe969340f7ab35292dcbaa55ee562c3f6903 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ff27fe969340f7ab35292dcbaa55ee562c3f6903/tclib.py
output_file.write(" '../o3d_assets/samples/%s',\n" % asset['path'])
if webgl_mode: output_file.write(" '../o3d_assets/samples/%s.fake_webgl_input.txt',\n" % asset['path']) else: output_file.write(" '../o3d_assets/samples/%s',\n" % asset['path'])
def write_action(asset, webgl_mode): filename = posixpath.splitext(posixpath.basename(asset['path']))[0] filename = filename.replace('.','_') filename = filename.replace('-','_') filename = filename.lower() name = "convert_" + filename if webgl_mode: name = name + "_webgl" output = asset['path'].replace('convert_', '')...
51cf61ff968587decf4da988cafbff403b2ef34b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/51cf61ff968587decf4da988cafbff403b2ef34b/samples_gen.py
write_action(asset, False);
write_action(asset, False)
def write_action(asset, webgl_mode): filename = posixpath.splitext(posixpath.basename(asset['path']))[0] filename = filename.replace('.','_') filename = filename.replace('-','_') filename = filename.lower() name = "convert_" + filename if webgl_mode: name = name + "_webgl" output = asset['path'].replace('convert_', '')...
51cf61ff968587decf4da988cafbff403b2ef34b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/51cf61ff968587decf4da988cafbff403b2ef34b/samples_gen.py
write_action(asset, True); output_file.write(" ],\n")
write_action(asset, True) output_file.write(""" ], }, { 'target_name': 'copy_samples', 'type': 'none', 'dependencies': [ 'convert_samples', ], 'copies': [\n""")
def write_action(asset, webgl_mode): filename = posixpath.splitext(posixpath.basename(asset['path']))[0] filename = filename.replace('.','_') filename = filename.replace('-','_') filename = filename.lower() name = "convert_" + filename if webgl_mode: name = name + "_webgl" output = asset['path'].replace('convert_', '')...
51cf61ff968587decf4da988cafbff403b2ef34b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/51cf61ff968587decf4da988cafbff403b2ef34b/samples_gen.py
output_file.write(" 'copies': [\n")
def write_action(asset, webgl_mode): filename = posixpath.splitext(posixpath.basename(asset['path']))[0] filename = filename.replace('.','_') filename = filename.replace('-','_') filename = filename.lower() name = "convert_" + filename if webgl_mode: name = name + "_webgl" output = asset['path'].replace('convert_', '')...
51cf61ff968587decf4da988cafbff403b2ef34b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/51cf61ff968587decf4da988cafbff403b2ef34b/samples_gen.py
"--ui-test-action-max-timeout=180000",
"--ui-test-action-max-timeout=280000",
def TestUI(self): return self.SimpleTest("chrome", "ui_tests", valgrind_test_args=[ "--timeout=180000", "--trace_children", "--indirect"], cmd_args=[ "--ui-test-timeout=240000", "--ui-test-action-timeout=120000", "--ui-test-action-max-timeout=180000", "--ui-test-sleep-timeout=120000", "--ui-test-terminate-timeout=12000...
b93f87a5b876ef9a5a08906d7f79772ed08de1bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b93f87a5b876ef9a5a08906d7f79772ed08de1bb/chrome_tests.py
def __init__(self, solution, projects, tests): self._projects = projects self._tests = tests self._saved_autohides = None self._solution = win32com.client.GetObject(solution) self._dte = self._GetDte(self._solution)
f88982b8c53b8b5b6e0a2bf8165f4eb217dca08d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f88982b8c53b8b5b6e0a2bf8165f4eb217dca08d/smoke_test.py
except pythoncom.com_error, e: print 'Exception from solution.DTE "%s", retrying: ' % str(e) time.sleep(2.0)
except pythoncom.com_error: logging.exception('Exception getting DTE, retrying') time.sleep(10.0)
def _GetDte(self, solution): '''Sometimes invoking solution.DTE will fail with an exception during Visual Studio initialization. To work around this, we try a couple of times with an intervening sleep to give VS time to settle.''' # Attempt ten times under a try block. for i in range(0, 10): try: return solution.DTE ex...
f88982b8c53b8b5b6e0a2bf8165f4eb217dca08d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f88982b8c53b8b5b6e0a2bf8165f4eb217dca08d/smoke_test.py
print 'Building project "%s" in "%s" configuration' % (project, config)
logging.info('Building project "%s" in "%s" configuration', project, config)
def BuildConfig(self, config): '''Builds all projects for a given config.
f88982b8c53b8b5b6e0a2bf8165f4eb217dca08d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f88982b8c53b8b5b6e0a2bf8165f4eb217dca08d/smoke_test.py
runner = TestRunner(_CHROME_SOLUTION, _PROJECTS_TO_BUILD, _TESTS_TO_RUN)
parser = GetOptionParser() (options, args) = parser.parse_args() if args: parser.error('This script takes no arguments') solution = options.solution if not os.path.exists(solution): solution = os.path.join(os.path.dirname(_CHROME_SOLUTION), solution) solution = solution + '.sln' solution = os.path.abspath(solutio...
def Main(): if not ctypes.windll.shell32.IsUserAnAdmin(): print ("Please run the smoke tests in an admin prompt " "(or AppVerifier won't work).") return 1 runner = TestRunner(_CHROME_SOLUTION, _PROJECTS_TO_BUILD, _TESTS_TO_RUN) failures = 0 for config in _CONFIGURATIONS: failures += runner.BuildConfig(config) if fai...
f88982b8c53b8b5b6e0a2bf8165f4eb217dca08d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f88982b8c53b8b5b6e0a2bf8165f4eb217dca08d/smoke_test.py
if name == 'BufferData':
if name == 'BufferData' or name == 'BufferSubData':
def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" # TODO(gman): Move this data to _FUNCTION_INFO? name = func.name if name.endswith("Immediate"): name = name[0:-9] if name == 'BufferData': file.Write(" uint32 data_size = size;\n") elif name == 'BufferSubData': file.Write(" uint32 data_siz...
1f35d386075e8cecf4b328e98191a11effa0fd1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/1f35d386075e8cecf4b328e98191a11effa0fd1a/build_gles2_cmd_buffer.py
elif name == 'BufferSubData': file.Write(" uint32 data_size = size;\n") elif name == 'CompressedTexImage2D':
elif (name == 'CompressedTexImage2D' or name == 'CompressedTexSubImage2D'):
def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" # TODO(gman): Move this data to _FUNCTION_INFO? name = func.name if name.endswith("Immediate"): name = name[0:-9] if name == 'BufferData': file.Write(" uint32 data_size = size;\n") elif name == 'BufferSubData': file.Write(" uint32 data_siz...
1f35d386075e8cecf4b328e98191a11effa0fd1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/1f35d386075e8cecf4b328e98191a11effa0fd1a/build_gles2_cmd_buffer.py
elif name == 'CompressedTexSubImage2D': file.Write(" uint32 data_size = imageSize;\n") elif name == 'TexImage2D': file.Write(" uint32 data_size = GLES2Util::ComputeImageDataSize(\n") file.Write(" width, height, format, type, unpack_alignment_);\n") elif name == 'TexSubImage2D': file.Write(" uint32 data_size = G...
elif name == 'TexImage2D' or name == 'TexSubImage2D': code = """ uint32 data_size; if (!GLES2Util::ComputeImageDataSize( width, height, format, type, unpack_alignment_, &data_size)) { return error::kOutOfBounds; } """ file.Write(code)
def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" # TODO(gman): Move this data to _FUNCTION_INFO? name = func.name if name.endswith("Immediate"): name = name[0:-9] if name == 'BufferData': file.Write(" uint32 data_size = size;\n") elif name == 'BufferSubData': file.Write(" uint32 data_siz...
1f35d386075e8cecf4b328e98191a11effa0fd1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/1f35d386075e8cecf4b328e98191a11effa0fd1a/build_gles2_cmd_buffer.py
file.Write(" uint32 data_size = n * sizeof(GLuint);\n")
code = """ uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { return error::kOutOfBounds; } """ file.Write(code)
def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" file.Write(" uint32 data_size = n * sizeof(GLuint);\n")
1f35d386075e8cecf4b328e98191a11effa0fd1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/1f35d386075e8cecf4b328e98191a11effa0fd1a/build_gles2_cmd_buffer.py
file.Write(" uint32 data_size = n * sizeof(GLuint);\n")
code = """ uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { return error::kOutOfBounds; } """ file.Write(code)
def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" file.Write(" uint32 data_size = n * sizeof(GLuint);\n")
1f35d386075e8cecf4b328e98191a11effa0fd1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/1f35d386075e8cecf4b328e98191a11effa0fd1a/build_gles2_cmd_buffer.py
file.Write(" %s params;\n" % last_arg.type) file.Write(" GLsizei num_values = util_.GLGetNumValuesReturned(pname);\n") file.Write(" uint32 params_size = num_values * sizeof(*params);\n") file.Write(" params = GetSharedMemoryAs<%s>(\n" % last_arg.type) file.Write(" c.params_shm_id, c.params_shm_offset, params_s...
code = """ %(last_arg_type)s params; GLsizei num_values = util_.GLGetNumValuesReturned(pname); uint32 params_size; if (!SafeMultiplyUint32(num_values, sizeof(*params), &params_size)) { return error::kOutOfBounds; } params = GetSharedMemoryAs<%(last_arg_type)s>( c.params_shm_id, c.params_shm_offset, params_size); """ fi...
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) last_arg = func.GetLastOriginalArg()
1f35d386075e8cecf4b328e98191a11effa0fd1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/1f35d386075e8cecf4b328e98191a11effa0fd1a/build_gles2_cmd_buffer.py
file.Write(" uint32 data_size = ComputeImmediateDataSize(" "immediate_data_size, 1, sizeof(%s), %d);\n" % (func.info.data_type, func.info.count))
code = """ uint32 data_size; if (!ComputeDataSize(1, sizeof(%s), %d, &data_size)) { return error::kOutOfBounds; } """ file.Write(code % (func.info.data_type, func.info.count)) if func.is_immediate: file.Write(" if (data_size > immediate_data_size) {\n") file.Write(" return error::kOutOfBounds;\n") file.Write(" }\...
def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" file.Write(" uint32 data_size = ComputeImmediateDataSize(" "immediate_data_size, 1, sizeof(%s), %d);\n" % (func.info.data_type, func.info.count))
1f35d386075e8cecf4b328e98191a11effa0fd1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/1f35d386075e8cecf4b328e98191a11effa0fd1a/build_gles2_cmd_buffer.py
file.Write(" uint32 data_size = ComputeImmediateDataSize(" "immediate_data_size, 1, sizeof(%s), %d);\n" % (func.info.data_type, func.info.count))
code = """ uint32 data_size; if (!ComputeDataSize(1, sizeof(%s), %d, &data_size)) { return error::kOutOfBounds; } """ file.Write(code % (func.info.data_type, func.info.count)) if func.is_immediate: file.Write(" if (data_size > immediate_data_size) {\n") file.Write(" return error::kOutOfBounds;\n") file.Write(" }\...
def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" file.Write(" uint32 data_size = ComputeImmediateDataSize(" "immediate_data_size, 1, sizeof(%s), %d);\n" % (func.info.data_type, func.info.count))
1f35d386075e8cecf4b328e98191a11effa0fd1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/1f35d386075e8cecf4b328e98191a11effa0fd1a/build_gles2_cmd_buffer.py
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 != NULL) { *%(length_name)s = max_size;
if (bufsize > 0) { 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 != NULL) { *%(length_name)s = max_size; } memcpy(%(dest_name)s, str.c_str(), max_size); %(dest_name)s[max_size] = '\\0';
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" code = """%(return_type)s %(func_name)s(%(args)s) {
1f35d386075e8cecf4b328e98191a11effa0fd1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/1f35d386075e8cecf4b328e98191a11effa0fd1a/build_gles2_cmd_buffer.py
memcpy(%(dest_name)s, str.c_str(), max_size); %(dest_name)s[max_size] = '\\0';
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" code = """%(return_type)s %(func_name)s(%(args)s) {
1f35d386075e8cecf4b328e98191a11effa0fd1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/1f35d386075e8cecf4b328e98191a11effa0fd1a/build_gles2_cmd_buffer.py
self.DownloadAndWaitForStart(file_url) self.WaitForAllDownloadsToComplete() unzip_file_name = os.path.join(self.GetDownloadDirectory().value(), 'a_file.txt')
file_url2 = self.GetFileURLForDataPath(os.path.join('zip', 'test.zip')) unzip_path = os.path.join(self.GetDownloadDirectory().value(), 'test', 'foo') os.path.exists(downloaded_pkg) and os.remove(downloaded_pkg) os.path.exists(unzip_path) and pyauto_utils.RemovePath(unzip_path) self.DownloadAndWaitForStart(file_url2) se...
def testAlwaysOpenFileType(self): """Verify "Always Open Files of this Type" download option
397f4abe32055ca0ed405c500388524c05c9fd8d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/397f4abe32055ca0ed405c500388524c05c9fd8d/downloads.py
self.assertTrue(self.WaitUntil(lambda: os.path.exists(unzip_file_name)),
self.assertTrue(self.WaitUntil(lambda: os.path.exists(unzip_path)),
def testAlwaysOpenFileType(self): """Verify "Always Open Files of this Type" download option
397f4abe32055ca0ed405c500388524c05c9fd8d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/397f4abe32055ca0ed405c500388524c05c9fd8d/downloads.py
os.path.exists(unzip_file_name) and os.remove(unzip_file_name)
os.path.exists(unzip_path) and pyauto_utils.RemovePath(unzip_path)
def testAlwaysOpenFileType(self): """Verify "Always Open Files of this Type" download option
397f4abe32055ca0ed405c500388524c05c9fd8d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/397f4abe32055ca0ed405c500388524c05c9fd8d/downloads.py
time.sleep(1) downloads = self.GetDownloadsInfo().Downloads() percentage = downloads[0]['PercentComplete'] self.assertTrue(percentage > old_percentage, 'Download percentage value is not increasing')
def _PercentInc(): percent = self.GetDownloadsInfo().Downloads()[0]['PercentComplete'] return old_percentage == 100 or percent > old_percentage, self.assertTrue(self.WaitUntil(_PercentInc), msg='Download percentage value is not increasing')
def testDownloadPercentage(self): """Verify that during downloading, % values increases, and once download is over, % value is 100""" file_path = self._MakeFile(2**24) file_url = self.GetFileURLForPath(file_path) downloaded_pkg = os.path.join(self.GetDownloadDirectory().value(), os.path.basename(file_path)) os.path.exi...
397f4abe32055ca0ed405c500388524c05c9fd8d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/397f4abe32055ca0ed405c500388524c05c9fd8d/downloads.py
license_path = os.path.join(path, filename)
if filename.startswith('/'): license_path = os.path.join(os.getcwd(), filename[1:]) else: license_path = os.path.join(path, filename)
def ParseDir(path): """Examine a third_party/foo component and extract its metadata.""" # Parse metadata fields out of README.chromium. # We examine "LICENSE" for the license file by default. metadata = { "License File": "LICENSE", # Relative path to license text. "Name": None, # Short name (for header ...
8283b10cafab170f6dfd7f266163aefc223892fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8283b10cafab170f6dfd7f266163aefc223892fe/licenses.py
metadata["License File"] = filename
metadata["License File"] = license_path
def ParseDir(path): """Examine a third_party/foo component and extract its metadata.""" # Parse metadata fields out of README.chromium. # We examine "LICENSE" for the license file by default. metadata = { "License File": "LICENSE", # Relative path to license text. "Name": None, # Short name (for header ...
8283b10cafab170f6dfd7f266163aefc223892fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8283b10cafab170f6dfd7f266163aefc223892fe/licenses.py
def ScanThirdPartyDirs(third_party_dirs):
def FindThirdPartyDirs(): """Find all third_party directories underneath the current directory.""" third_party_dirs = [] for path, dirs, files in os.walk('.'): path = path[len('./'):] if path in PRUNE_PATHS: dirs[:] = [] continue for skip in PRUNE_DIRS: if skip in dirs: dirs.remove(skip) if os.path.basename(path)...
def ScanThirdPartyDirs(third_party_dirs): """Scan a list of directories and report on any problems we find.""" errors = [] for path in sorted(third_party_dirs): try: metadata = ParseDir(path) except LicenseError, e: errors.append((path, e.args[0])) continue for path, error in sorted(errors): print path + ": " + error ...
8283b10cafab170f6dfd7f266163aefc223892fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8283b10cafab170f6dfd7f266163aefc223892fe/licenses.py
def FindThirdPartyDirs(): """Find all third_party directories underneath the current directory.""" third_party_dirs = [] for path, dirs, files in os.walk('.'): path = path[len('./'):] if path in PRUNE_PATHS: dirs[:] = [] continue for skip in PRUNE_DIRS: if skip in dirs: dirs.remove(skip) if os.path.basename(path...
return len(errors) == 0 def GenerateCredits(): """Generate about:credits, dumping the result to stdout.""" 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 = te...
def ScanThirdPartyDirs(third_party_dirs): """Scan a list of directories and report on any problems we find.""" errors = [] for path in sorted(third_party_dirs): try: metadata = ParseDir(path) except LicenseError, e: errors.append((path, e.args[0])) continue for path, error in sorted(errors): print path + ": " + error ...
8283b10cafab170f6dfd7f266163aefc223892fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8283b10cafab170f6dfd7f266163aefc223892fe/licenses.py