rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
third_party_dirs = FindThirdPartyDirs() ScanThirdPartyDirs(third_party_dirs)
command = 'help' if len(sys.argv) > 1: command = sys.argv[1] if command == 'scan': if not ScanThirdPartyDirs(): sys.exit(1) elif command == 'credits': if not GenerateCredits(): sys.exit(1) else: print __doc__ sys.exit(1)
def FindThirdPartyDirs(): """Find all third_party directories underneath the current directory.""" third_party_dirs = [] for path, dirs, files in os.walk('.'): path = path[len('./'):] # Pretty up the path. if path in PRUNE_PATHS: dirs[:] = [] continue # Prune out directories we want to skip. # (Note that we loop ove...
8283b10cafab170f6dfd7f266163aefc223892fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8283b10cafab170f6dfd7f266163aefc223892fe/licenses.py
func.AddCmdArg(Argument('data_size', 'uint32'))
func.AddCmdArg(DataSizeArgument('data_size'))
def InitFunction(self, func): """Add or adjust anything type specific for this function.""" if func.GetInfo('needs_size'): func.AddCmdArg(Argument('data_size', 'uint32'))
a115074299ce0ef525addadc3040aeb6715c121a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a115074299ce0ef525addadc3040aeb6715c121a/build_gles2_cmd_buffer.py
EXPECT_EQ(0, result->size);%(gl_error_test)s
EXPECT_EQ(0u, result->size);%(gl_error_test)s
typedef %(name)s::Result Result;
a115074299ce0ef525addadc3040aeb6715c121a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a115074299ce0ef525addadc3040aeb6715c121a/build_gles2_cmd_buffer.py
class GLcharHandler(TypeHandler):
class GLcharHandler(CustomHandler):
def WriteImmediateFormatTest(self, func, file): """Overrriden from TypeHandler.""" file.Write("TEST(GLES2FormatTest, %s) {\n" % func.name) file.Write(" const int kSomeBaseValueToTestWith = 51;\n") file.Write(" static %s data[] = {\n" % func.info.data_type) for v in range(0, func.info.count * 2): file.Write(" stati...
a115074299ce0ef525addadc3040aeb6715c121a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a115074299ce0ef525addadc3040aeb6715c121a/build_gles2_cmd_buffer.py
TypeHandler.__init__(self) def InitFunction(self, func): """Overrriden from TypeHandler.""" func.AddCmdArg(Argument('data_size', 'uint32')) def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" file.Write("// TODO(gman): %s\n\n" % func.name) def WriteImmediateServiceUnitTest(self, func, file...
CustomHandler.__init__(self)
def __init__(self): TypeHandler.__init__(self)
a115074299ce0ef525addadc3040aeb6715c121a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a115074299ce0ef525addadc3040aeb6715c121a/build_gles2_cmd_buffer.py
class GetGLcharHandler(GLcharHandler): """Handler for glGetAttibLoc, glGetUniformLoc.""" def __init__(self): GLcharHandler.__init__(self) def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" file.Write("// TODO(gman): %s\n\n" % func.name) def WriteImmediateServiceUnitTest(self, func, file)...
def WriteImmediateFormatTest(self, func, file): """Overrriden from TypeHandler.""" init_code = [] check_code = [] all_but_last_arg = func.GetCmdArgs()[:-1] value = 11 for arg in all_but_last_arg: init_code.append(" static_cast<%s>(%d)," % (arg.type, value)) value += 1 value = 11 for arg in all_but_last_arg: check_...
a115074299ce0ef525addadc3040aeb6715c121a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a115074299ce0ef525addadc3040aeb6715c121a/build_gles2_cmd_buffer.py
self.type_handler.InitFunction(self)
def __init__(self, original_name, name, info, return_type, original_args, args_for_cmds, cmd_args, init_args, num_pointer_args): self.name = name self.original_name = original_name self.info = info self.type_handler = info.type_handler self.return_type = return_type self.original_args = original_args self.num_pointer_a...
a115074299ce0ef525addadc3040aeb6715c121a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a115074299ce0ef525addadc3040aeb6715c121a/build_gles2_cmd_buffer.py
'GetGLchar': GetGLcharHandler(),
def __init__(self, verbose): self.original_functions = [] self.functions = [] self.verbose = verbose self.errors = 0 self._function_info = {} self._empty_type_handler = TypeHandler() self._empty_function_info = FunctionInfo({}, self._empty_type_handler)
a115074299ce0ef525addadc3040aeb6715c121a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a115074299ce0ef525addadc3040aeb6715c121a/build_gles2_cmd_buffer.py
("OP(%s)" % func.name, _CMD_ID_TABLE[func.name]))
("OP(%s)" % by_id[id].name, id))
def WriteCommandIds(self, filename): """Writes the command buffer format""" file = CHeaderWriter(filename) 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 */ \\\n" % ("OP(...
a115074299ce0ef525addadc3040aeb6715c121a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a115074299ce0ef525addadc3040aeb6715c121a/build_gles2_cmd_buffer.py
if self._options.indirect: return self.GetAnalyzeResultsIndirect()
def Analyze(self, check_sanity=False): if self._options.indirect: return self.GetAnalyzeResultsIndirect() filenames = glob.glob(self.TMP_DIR + "/tsan.*") use_gdb = common.IsMac() analyzer = tsan_analyze.TsanAnalyze(self._source_dir, filenames, use_gdb=use_gdb) ret = analyzer.Report(check_sanity) if ret != 0: logging.in...
d889d58ad749f0c07c6b9646986202071639fd5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/d889d58ad749f0c07c6b9646986202071639fd5f/valgrind_test.py
def AddBucketFunction(self, generator, func): """Adds a bucket version of a function.""" # Generate an immediate command if there is only 1 pointer arg. bucket = func.GetInfo('bucket') # can be True, False or None if bucket: generator.AddFunction(BucketFunction(func))
4393968a3cd68a637ea9c9ae73d23638606d2353 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/4393968a3cd68a637ea9c9ae73d23638606d2353/build_gles2_cmd_buffer.py
'http://a.nonexisting.domain.blah', 'ftp://this.should.not.exist/file',
self.GetFileURLForPath('another_non-existing_path'),
def testInvalidURLNoHistory(self): """Invalid URLs should not go in history.""" assert not self.GetHistoryInfo().History(), 'Expecting clean history.' urls = [ self.GetFileURLForPath('some_non-existing_path'), 'http://a.nonexisting.domain.blah', 'ftp://this.should.not.exist/file', ] for url in urls: self.NavigateToURL(...
a0dd450b1e383dee3300d132cb2432232f00653e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a0dd450b1e383dee3300d132cb2432232f00653e/history.py
self.NavigateToURL(url)
if not url.startswith('file://'): logging.warn('Using %s. Might depend on how dns failures are handled' 'on the network' % url) self.NavigateToURL(url)
def testInvalidURLNoHistory(self): """Invalid URLs should not go in history.""" assert not self.GetHistoryInfo().History(), 'Expecting clean history.' urls = [ self.GetFileURLForPath('some_non-existing_path'), 'http://a.nonexisting.domain.blah', 'ftp://this.should.not.exist/file', ] for url in urls: self.NavigateToURL(...
a0dd450b1e383dee3300d132cb2432232f00653e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a0dd450b1e383dee3300d132cb2432232f00653e/history.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...
b83ea2a0a15a069524f1617d88f328c54529c14b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b83ea2a0a15a069524f1617d88f328c54529c14b/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...
b83ea2a0a15a069524f1617d88f328c54529c14b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b83ea2a0a15a069524f1617d88f328c54529c14b/testserver.py
"Cond", "Free", "Leak", "Overlap", "Param",
"Cond", "Free", "Jump", "Leak", "Overlap", "Param",
def ReadSuppressions(lines, supp_descriptor): """Given a list of lines, returns a list of suppressions. Args: lines: a list of lines containing suppressions. supp_descriptor: should typically be a filename. Used only when parsing errors happen. """ result = [] cur_descr = '' cur_type = '' cur_stack = [] in_suppression...
25c7877befa5e81a6ba7f8fceedccf9988d3ba96 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/25c7877befa5e81a6ba7f8fceedccf9988d3ba96/suppressions.py
(shortname, extension) = os.path.splitext(file_name)
(shortname, extension) = os.path.splitext(file_name.split("?")[0])
def GetMIMETypeFromName(self, file_name): """Returns the mime type for the specified file_name. So far it only looks at the file extension."""
d9befdf2078e156ccaa25643a15aad1325ac2e3a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/d9befdf2078e156ccaa25643a15aad1325ac2e3a/testserver.py
elif options.path: output.write(path, os.path.join(options.path, os.path.basename(path)))
def Main(): """Zip input arguments to Zip output archive.""" (options, args) = ParseCommandLine() # Test that all the input files exist before we blow the output archive away # only to fail part way. for path in args: if path == _DEBUG_ONLY_FILE_SEPARATOR: continue if not os.path.exists(path): raise Exception('Input f...
2d0b55bbc66b3860ffac1a55854d4552da30e98b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/2d0b55bbc66b3860ffac1a55854d4552da30e98b/zipfiles.py
output.write(path)
dest_path = path if options.path: dest_path = os.path.join(options.path, os.path.basename(path)) extension = os.path.splitext(path)[1] if extension: extension = extension[1:] if extension in ignore_extensions: output.write(path, dest_path) else: contents = version.subst_file(path, subst_values) output.writestr(dest_p...
def Main(): """Zip input arguments to Zip output archive.""" (options, args) = ParseCommandLine() # Test that all the input files exist before we blow the output archive away # only to fail part way. for path in args: if path == _DEBUG_ONLY_FILE_SEPARATOR: continue if not os.path.exists(path): raise Exception('Input f...
2d0b55bbc66b3860ffac1a55854d4552da30e98b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/2d0b55bbc66b3860ffac1a55854d4552da30e98b/zipfiles.py
if results_json[self.VERSION_KEY] == 2:
if self.VERSION_KEY in results_json and results_json[self.VERSION_KEY] == 2:
def _ConvertJSONToCurrentVersion(self, results_json): """If the JSON does not match the current version, converts it to the current version and adds in the new version number. """ if (self.VERSION_KEY in results_json and results_json[self.VERSION_KEY] == self.VERSION): return
af5dfbb14dd352e4bdb14f440fb14248ffedf377 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/af5dfbb14dd352e4bdb14f440fb14248ffedf377/json_results_generator.py
if not IsLinux():
if not common.IsLinux():
def Create(self, tool_name): if tool_name == "memcheck": return Memcheck() if tool_name == "memcheck_wine": return Memcheck() if tool_name == "tsan": if not IsLinux(): logging.info("WARNING: ThreadSanitizer may be unstable on Mac.") logging.info("See http://code.google.com/p/data-race-test/wiki/" "ThreadSanitizerOnMacO...
e44a685c4744f126f56e229be0513e3b35923fef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e44a685c4744f126f56e229be0513e3b35923fef/valgrind_test.py
return source_paths
return sorted(source_paths)
def _parse_source_files(self): """ Returns a list of paths to source files present in the extenion.
1ba20e8dfe884a6947b0174dfd3fde84c19f319b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/1ba20e8dfe884a6947b0174dfd3fde84c19f319b/directory.py
_remove_expected_call_re = re.compile(r' EXPECT_CALL.*?;\n', re.S)
def Close(self): self.Write("#endif // %s\n\n" % self.guard) CWriter.Close(self)
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
if func.GetInfo('expection') == False: test = self._remove_expected_call_re.sub('', test)
def WriteValidUnitTest(self, func, file, test, extra = {}): """Writes a valid unit test.""" if func.GetInfo('expection') == False: test = self._remove_expected_call_re.sub('', test) name = func.name arg_strings = [] count = 0 for arg in func.GetOriginalArgs(): arg_strings.append(arg.GetValidArg(count, 0)) count += 1 gl...
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
num_invalid_values = arg.GetNumInvalidValues(func)
num_invalid_values = arg.GetNumInvalidValues()
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(func) for value_index in range(0, num_invalid_values): arg_strings = [] parse_result = "kNoError" gl_error = None count = 0 for ar...
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
def WriteGLES2ImplementationDeclaration(self, func, file):
def WriteGLES2ImplementationHeader(self, func, file):
def WriteGLES2ImplementationDeclaration(self, func, file): """Writes the GLES2 Implemention declaration.""" file.Write("%s %s(%s);\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write("\n")
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
file.Write("%s %s(%s);\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write("\n") def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention."""
def WriteGLES2ImplementationDeclaration(self, func, file): """Writes the GLES2 Implemention declaration.""" file.Write("%s %s(%s);\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write("\n")
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
for arg in func.GetOriginalArgs(): arg.WriteClientSideValidationCode(file)
def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention.""" impl_func = func.GetInfo('impl_func') if func.can_auto_generate and (impl_func == None or impl_func == True): file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) for arg in fu...
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
self.WriteGLES2ImplementationDeclaration(func, file)
file.Write("%s %s(%s);\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write("\n")
def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention.""" impl_func = func.GetInfo('impl_func') if func.can_auto_generate and (impl_func == None or impl_func == True): file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) for arg in fu...
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
if func.GetInfo('result') == None: func.AddInfo('result', ['uint32'])
def InitFunction(self, func): """Overrriden from TypeHandler.""" func.AddCmdArg(Argument("result_shm_id", 'uint32')) func.AddCmdArg(Argument("result_shm_offset", 'uint32')) if func.GetInfo('result') == None: func.AddInfo('result', ['uint32'])
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
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...
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...
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" 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" ...
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
def InitFunction(self, func): """Overrriden from TypeHandler.""" cmd_args = func.GetCmdArgs() func.ClearCmdArgs() func.AddCmdArg(cmd_args[0]) func.AddCmdArg(Argument('bucket_id', 'uint32'))
def InitFunction(self, func): """Overrriden from TypeHandler.""" # remove all but the first cmd args. cmd_args = func.GetCmdArgs() func.ClearCmdArgs() func.AddCmdArg(cmd_args[0]) # add on a bucket id. func.AddCmdArg(Argument('bucket_id', 'uint32'))
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
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 !...
file.Write("// TODO(gman): Implement this\n") TypeHandler.WriteGLES2ImplementationHeader(self, func, file)
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" code = """%(return_type)s %(func_name)s(%(args)s) {
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
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...
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)
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
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* ...
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...
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.GetCmdArgs() id_arg = args[0] bucket_arg = args[1] id_arg.WriteGetCode...
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
" %s(%s, len + 1, &len, bucket->GetDataAs<GLchar*>(0, len + 1));\n" % (func.GetGLFunctionName(), id_arg.name))
" %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...
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.GetCmdArgs() id_arg = args[0] bucket_arg = args[1] id_arg.WriteGetCode...
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
def GetNumInvalidValues(self, func):
def GetNumInvalidValues(self):
def GetNumInvalidValues(self, func): """returns the number of invalid values to be tested.""" return 0
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
pass def WriteClientSideValidationCode(self, file): """Writes the validation code for an argument.""" pass
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")
def WriteValidationCode(self, file): """Writes the validation code for an argument.""" pass
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
"""class for GLsizei and GLsizeiptr."""
def GetImmediateVersion(self): """Gets the immediate version of this argument.""" return self
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
def GetNumInvalidValues(self, func):
def GetNumInvalidValues(self):
def GetNumInvalidValues(self, func): """overridden from Argument.""" if func.is_immediate: return 0 return 1
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
if func.is_immediate: return 0
def GetNumInvalidValues(self, func): """overridden from Argument.""" if func.is_immediate: return 0 return 1
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
"""overridden from Argument."""
"""returns an invalid value and expected parse result by index."""
def GetInvalidArg(self, offset, index): """overridden from Argument.""" return ("-1", "kNoError", "GL_INVALID_VALUE")
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
def WriteValidationCode(self, file): """overridden from Argument.""" file.Write(" if (%s < 0) {\n" % self.name) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return error::kNoError;\n") file.Write(" }\n") def WriteClientSideValidationCode(self, file): """overridden from Argument.""" file.Write(" ...
def WriteValidationCode(self, file): """overridden from Argument.""" file.Write(" if (%s < 0) {\n" % self.name) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return error::kNoError;\n") file.Write(" }\n")
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
"""Base class for EnumArgument, IntArgument and BoolArgument"""
"""Base calss for EnumArgument, IntArgument and BoolArgument"""
def WriteClientSideValidationCode(self, file): """overridden from Argument.""" file.Write(" if (%s < 0) {\n" % self.name) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return;\n") file.Write(" }\n")
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
def GetNumInvalidValues(self, func):
def GetNumInvalidValues(self):
def GetNumInvalidValues(self, func): """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
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
return (invalid[index], "kNoError", self.gl_error) return ("---ERROR1---", "kNoError", self.gl_error)
return (invalid[index], "kNoError", "GL_INVALID_ENUM") return ("---ERROR1---", "kNoError", "GL_INVALID_ENUM")
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", self.gl_error) return ("---ERROR1---", "kNoError", self.gl_...
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
def GetNumInvalidValues(self, func):
def GetNumInvalidValues(self):
def GetNumInvalidValues(self, func): """Overridden from Argument.""" return 2
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
self.is_immediate = False
def __init__(self, original_name, name, info, return_type, original_args, args_for_cmds, cmd_args, init_args, num_pointer_args): self.name = name self.original_name = original_name self.info = info self.type_handler = info.type_handler self.return_type = return_type self.original_args = original_args self.num_pointer_a...
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
def AddInfo(self, name, value): """Adds an info.""" setattr(self.info, name, value)
def GetInfo(self, name): """Returns a value from the function info for this function.""" if hasattr(self.info, name): return getattr(self.info, name) return None
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
def ClearCmdArgs(self): """Clears the command args for this function.""" self.cmd_args = []
def GetCmdArgs(self): """Gets the command args for this function.""" return self.cmd_args
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
self.is_immediate = True
def __init__(self, func): new_args = [] for arg in func.GetOriginalArgs(): new_arg = arg.GetImmediateVersion() if new_arg: new_args.append(new_arg)
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
BaseTool.__init__(self)
super(ValgrindTool, self).__init__()
def __init__(self): BaseTool.__init__(self) self.RegisterOptionParserHook(ValgrindTool.ExtendOptionParser)
b2a6a37f3cf39160da0a6a1da57eb4cfc4967ae8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b2a6a37f3cf39160da0a6a1da57eb4cfc4967ae8/valgrind_test.py
ValgrindTool.__init__(self)
super(Memcheck, self).__init__()
def __init__(self): ValgrindTool.__init__(self) self.RegisterOptionParserHook(Memcheck.ExtendOptionParser)
b2a6a37f3cf39160da0a6a1da57eb4cfc4967ae8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b2a6a37f3cf39160da0a6a1da57eb4cfc4967ae8/valgrind_test.py
def __init__(self): BaseTool.__init__(self)
def __init__(self): BaseTool.__init__(self)
b2a6a37f3cf39160da0a6a1da57eb4cfc4967ae8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b2a6a37f3cf39160da0a6a1da57eb4cfc4967ae8/valgrind_test.py
def __init__(self): ValgrindTool.__init__(self) ThreadSanitizerBase.__init__(self)
def __init__(self): ValgrindTool.__init__(self) ThreadSanitizerBase.__init__(self)
b2a6a37f3cf39160da0a6a1da57eb4cfc4967ae8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b2a6a37f3cf39160da0a6a1da57eb4cfc4967ae8/valgrind_test.py
PinTool.__init__(self) ThreadSanitizerBase.__init__(self)
super(ThreadSanitizerWindows, self).__init__()
def __init__(self): PinTool.__init__(self) ThreadSanitizerBase.__init__(self) self.RegisterOptionParserHook(ThreadSanitizerWindows.ExtendOptionParser)
b2a6a37f3cf39160da0a6a1da57eb4cfc4967ae8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b2a6a37f3cf39160da0a6a1da57eb4cfc4967ae8/valgrind_test.py
BaseTool.__init__(self)
super(DrMemory, self).__init__()
def __init__(self): BaseTool.__init__(self) self.RegisterOptionParserHook(DrMemory.ExtendOptionParser)
b2a6a37f3cf39160da0a6a1da57eb4cfc4967ae8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b2a6a37f3cf39160da0a6a1da57eb4cfc4967ae8/valgrind_test.py
proc += ['--race-verifier=' + self.TMP_DIR + '/race.log']
proc += ['--race-verifier=' + self.TMP_DIR + '/race.log', '--race-verifier-sleep-ms=%d' % int(self._options.race_verifier_sleep_ms)]
def ToolSpecificFlags(self): proc = super(ThreadSanitizerRV2Mixin, self).ToolSpecificFlags() proc += ['--race-verifier=' + self.TMP_DIR + '/race.log'] return proc
b2a6a37f3cf39160da0a6a1da57eb4cfc4967ae8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b2a6a37f3cf39160da0a6a1da57eb4cfc4967ae8/valgrind_test.py
(error.__hash__() & 0xffffffffffffffff)
(error.__hash__() & 0xffffffffffffffff))
def Report(self, files, check_sanity=False): '''Reads in a set of files and prints Memcheck report.
2463803c4016439b49882fc7e3416de6a1bbac0f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/2463803c4016439b49882fc7e3416de6a1bbac0f/memcheck_analyze.py
if self.attrs['use_name_for_id'] == 'true':
if (self.attrs['use_name_for_id'] == 'true' and self.SatisfiesOutputCondition()):
def EndParsing(self): super(type(self), self).EndParsing()
df2c3c3e306e513fd62fa1a1effb83985fe4ee5c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/df2c3c3e306e513fd62fa1a1effb83985fe4ee5c/message.py
'cygwin': 'win',
} platform_flags = { 'darwin': '-DSWIGMAC', 'linux2': '-DSWIGLINUX', 'win32': '-DSWIGWIN',
def main(): swig_dir = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), os.pardir, os.pardir, 'third_party', 'swig')) lib_dir = os.path.join(swig_dir, "Lib") os.putenv("SWIG_LIB", lib_dir) dir_map = { 'darwin': 'mac', 'linux2': 'linux', 'win32': 'win', 'cygwin': 'win', } swig_bin = os.path.join(swig_dir, dir...
97212efe51af21d7381e25b0367bc28b4c216bab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/97212efe51af21d7381e25b0367bc28b4c216bab/swig.py
os.execv(swig_bin, [swig_bin] + sys.argv[1:])
args = [swig_bin, platform_flags[sys.platform]] + sys.argv[1:] args = [x.replace('/', os.sep) for x in args] print "Executing", args sys.exit(subprocess.call(args))
def main(): swig_dir = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), os.pardir, os.pardir, 'third_party', 'swig')) lib_dir = os.path.join(swig_dir, "Lib") os.putenv("SWIG_LIB", lib_dir) dir_map = { 'darwin': 'mac', 'linux2': 'linux', 'win32': 'win', 'cygwin': 'win', } swig_bin = os.path.join(swig_dir, dir...
97212efe51af21d7381e25b0367bc28b4c216bab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/97212efe51af21d7381e25b0367bc28b4c216bab/swig.py
search_term = split_url.path partial_url = self._GetOmniboxMatchesFor(search_term, windex=windex)
partial_url = self._GetOmniboxMatchesFor(split_url.scheme, windex=windex)
def _CheckBookmarkResultForVariousInputs(self, url, title, windex=0): """Check if we get the Bookmark for complete and partial inputs.""" # Check if the complete URL would get the bookmark url_matches = self._GetOmniboxMatchesFor(url, windex=windex) self._VerifyHasBookmarkResult(url_matches) # Check if the complete tit...
8a2772fbda73a1f82b7e24a89b2bda35439e0316 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/8a2772fbda73a1f82b7e24a89b2bda35439e0316/omnibox.py
logging.debug('Starting %s server.' % self._server_name)
logging.info('Starting %s server on %d.' % ( self._server_name, self._port)) logging.debug('cmdline: %s' % ' '.join(start_cmd))
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)
22e6a57f6f220435f7d1610e05dc2768b0a4a495 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/22e6a57f6f220435f7d1610e05dc2768b0a4a495/websocket_server.py
logging.debug('Shutting down %s server %d.' % (self._server_name, pid))
logging.info('Shutting down %s server %d.' % (self._server_name, pid))
def Stop(self, force=False): if not force and not self.IsRunning(): return
22e6a57f6f220435f7d1610e05dc2768b0a4a495 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/22e6a57f6f220435f7d1610e05dc2768b0a4a495/websocket_server.py
logging.info('Using handler_map_file: %s' % handler_map_file)
logging.debug('Using handler_map_file: %s' % handler_map_file)
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)
e4109d2ab6d5441cc5bde539241ef0af8c757c58 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e4109d2ab6d5441cc5bde539241ef0af8c757c58/websocket_server.py
logging.info('Starting %s server on %d.' % (
logging.debug('Starting %s server on %d.' % (
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)
e4109d2ab6d5441cc5bde539241ef0af8c757c58 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e4109d2ab6d5441cc5bde539241ef0af8c757c58/websocket_server.py
logging.info('Shutting down %s server %d.' % (self._server_name, pid))
logging.debug('Shutting down %s server %d.' % (self._server_name, pid))
def stop(self, force=False): if not force and not self.is_running(): return
e4109d2ab6d5441cc5bde539241ef0af8c757c58 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e4109d2ab6d5441cc5bde539241ef0af8c757c58/websocket_server.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) {
2fcb6ce152ade33030c30dba7deaf9e639ee2aff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/2fcb6ce152ade33030c30dba7deaf9e639ee2aff/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...
2fcb6ce152ade33030c30dba7deaf9e639ee2aff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/2fcb6ce152ade33030c30dba7deaf9e639ee2aff/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;
2fcb6ce152ade33030c30dba7deaf9e639ee2aff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/2fcb6ce152ade33030c30dba7deaf9e639ee2aff/build_gles2_cmd_buffer.py
gl_arg_strings.append("result->GetData()")
if func.GetInfo('gl_test_func') == 'glGetIntegerv': gl_arg_strings.append("_") else: gl_arg_strings.append("result->GetData()")
typedef %(name)s::Result Result;
2fcb6ce152ade33030c30dba7deaf9e639ee2aff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/2fcb6ce152ade33030c30dba7deaf9e639ee2aff/build_gles2_cmd_buffer.py
(arg_string, parse_result) = arg.GetInvalidArg(count, value_index)
(arg_string, parse_result, gl_error) = arg.GetInvalidArg( count, value_index)
def WriteInvalidUnitTest(self, func, file, test, extra = {}): """Writes a invalid unit test.""" arg_index = 0 for arg in func.GetOriginalArgs(): num_invalid_values = arg.GetNumInvalidValues() for value_index in range(0, num_invalid_values): arg_strings = [] parse_result = "kNoError" count = 0 for arg in func.GetOrigina...
f451d00ddca4eb2ccab5024f40dfe34ce5145e95 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f451d00ddca4eb2ccab5024f40dfe34ce5145e95/build_gles2_cmd_buffer.py
EXPECT_EQ(error::%(parse_result)s, ExecuteCmd(cmd));
EXPECT_EQ(error::%(parse_result)s, ExecuteCmd(cmd));%(gl_error_test)s
def WriteServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
f451d00ddca4eb2ccab5024f40dfe34ce5145e95 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f451d00ddca4eb2ccab5024f40dfe34ce5145e95/build_gles2_cmd_buffer.py
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));%(gl_error_test)s
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
f451d00ddca4eb2ccab5024f40dfe34ce5145e95 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f451d00ddca4eb2ccab5024f40dfe34ce5145e95/build_gles2_cmd_buffer.py
ExecuteImmediateCmd(cmd, sizeof(temp)));
ExecuteImmediateCmd(cmd, sizeof(temp)));%(gl_error_test)s
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
f451d00ddca4eb2ccab5024f40dfe34ce5145e95 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f451d00ddca4eb2ccab5024f40dfe34ce5145e95/build_gles2_cmd_buffer.py
ExecuteImmediateCmd(cmd, sizeof(temp)));
ExecuteImmediateCmd(cmd, sizeof(temp)));%(gl_error_test)s
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" valid_test = """
f451d00ddca4eb2ccab5024f40dfe34ce5145e95 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f451d00ddca4eb2ccab5024f40dfe34ce5145e95/build_gles2_cmd_buffer.py
EXPECT_EQ(error::%(parse_result)s, ExecuteCmd(cmd));
EXPECT_EQ(error::%(parse_result)s, ExecuteCmd(cmd));%(gl_error_test)s
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
f451d00ddca4eb2ccab5024f40dfe34ce5145e95 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f451d00ddca4eb2ccab5024f40dfe34ce5145e95/build_gles2_cmd_buffer.py
return ("---ERROR0---", "---ERROR2---")
return ("---ERROR0---", "---ERROR2---", None)
def GetInvalidArg(self, offset, index): """returns an invalid value and expected parse result by index.""" return ("---ERROR0---", "---ERROR2---")
f451d00ddca4eb2ccab5024f40dfe34ce5145e95 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f451d00ddca4eb2ccab5024f40dfe34ce5145e95/build_gles2_cmd_buffer.py
pass
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")
def WriteValidationCode(self, file): """Writes the validation code for an argument.""" pass
f451d00ddca4eb2ccab5024f40dfe34ce5145e95 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f451d00ddca4eb2ccab5024f40dfe34ce5145e95/build_gles2_cmd_buffer.py
return (invalid[index], "kNoError") return ("---ERROR1---", "kNoError")
return (invalid[index], "kNoError", "GL_INVALID_ENUM") return ("---ERROR1---", "kNoError", "GL_INVALID_ENUM")
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") return ("---ERROR1---", "kNoError")
f451d00ddca4eb2ccab5024f40dfe34ce5145e95 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f451d00ddca4eb2ccab5024f40dfe34ce5145e95/build_gles2_cmd_buffer.py
return ("kInvalidSharedMemoryId, 0", "kOutOfBounds")
return ("kInvalidSharedMemoryId, 0", "kOutOfBounds", None)
def GetInvalidArg(self, offset, index): """Overridden from Argument.""" if index == 0: return ("kInvalidSharedMemoryId, 0", "kOutOfBounds") else: return ("shared_memory_id_, kInvalidSharedMemoryOffset", "kOutOfBounds")
f451d00ddca4eb2ccab5024f40dfe34ce5145e95 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f451d00ddca4eb2ccab5024f40dfe34ce5145e95/build_gles2_cmd_buffer.py
"kOutOfBounds")
"kOutOfBounds", None)
def GetInvalidArg(self, offset, index): """Overridden from Argument.""" if index == 0: return ("kInvalidSharedMemoryId, 0", "kOutOfBounds") else: return ("shared_memory_id_, kInvalidSharedMemoryOffset", "kOutOfBounds")
f451d00ddca4eb2ccab5024f40dfe34ce5145e95 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f451d00ddca4eb2ccab5024f40dfe34ce5145e95/build_gles2_cmd_buffer.py
return os.path.join(sub_path, 'dangerous.dmg')
return os.path.join(sub_path, 'invalid-dummy.dmg')
def _GetDangerousDownload(self): """Returns the file url for a dangerous download for this OS.""" sub_path = os.path.join(self.DataDir(), 'downloads', 'dangerous') if self.IsMac(): return os.path.join(sub_path, 'dangerous.dmg') return os.path.join(sub_path, 'dangerous.exe')
1ca57ffcd3fc85c8a1d62edc0c949e466a2c05a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/1ca57ffcd3fc85c8a1d62edc0c949e466a2c05a3/downloads.py
for current_name in MATRIX_UNIFORM_NAMES: if lower_name == current_name.lower(): return current_name return lower_name
return MATRIX_UNIFORM_NAMES_MAPPING.get(lower_name, lower_name)
def correct_semantic_case(name): lower_name = name.lower() for current_name in MATRIX_UNIFORM_NAMES: if lower_name == current_name.lower(): return current_name return lower_name
ee1bd28ecfe38ff53511fe5f7beb1470629c7e22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ee1bd28ecfe38ff53511fe5f7beb1470629c7e22/convert.py
test_prefixes = ["FLAKY", "FAILS"]
test_prefixes = ["FLAKY", "FAILS", "MAYBE"]
def _ReadGtestFilterFile(self, name, cmd): '''Read a file which is a list of tests to filter out with --gtest_filter and append the command-line option to cmd. ''' filters = [] for directory in self._data_dirs: gtest_filter_files = [ os.path.join(directory, name + ".gtest.txt"), os.path.join(directory, name + ".gtest-%...
0d935cec88688f0ac2431c921e454112578152d2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0d935cec88688f0ac2431c921e454112578152d2/chrome_tests.py
result = unittest.TextTestRunner(verbosity=verbosity).run(pyauto_suite)
result = PyAutoTextTestRuner(verbosity=verbosity).run(pyauto_suite)
def _Run(self): """Run the tests.""" if self._options.wait_for_debugger: raw_input('Attach debugger to process %s and hit <enter> ' % os.getpid())
71b6d8c77b5e0d548c64bc7b0bfaa8c574ba3b44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/71b6d8c77b5e0d548c64bc7b0bfaa8c574ba3b44/pyauto.py
for i in range(0, 5):
for i in range(5):
def find_o3d_root(): path = os.path.abspath(sys.path[0]) for i in range(0, 5): path = os.path.dirname(path) if (os.path.isdir(os.path.join(path, 'o3d')) and os.path.isdir(os.path.join(path, 'third_party'))): return path return ''
b4063f4f2c6fc90bbda47a2fb5e91c437341938f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b4063f4f2c6fc90bbda47a2fb5e91c437341938f/convert.py
paths = [ '/usr/bin/cgc', 'C:/Program Files/NVIDIA Corporation/Cg/bin/cgc.exe', 'C:/Program Files (x86)/NVIDIA Corporation/Cg/bin/cgc.exe' ]
paths = ['/usr/bin/cgc', 'C:/Program Files/NVIDIA Corporation/Cg/bin/cgc.exe', 'C:/Program Files (x86)/NVIDIA Corporation/Cg/bin/cgc.exe']
def default_cgc(): paths = [ '/usr/bin/cgc', 'C:/Program Files/NVIDIA Corporation/Cg/bin/cgc.exe', 'C:/Program Files (x86)/NVIDIA Corporation/Cg/bin/cgc.exe' ] for path in paths: if os.path.exists(path): return path script_path = os.path.abspath(sys.path[0]) # Try again looking in the current working directory to match...
b4063f4f2c6fc90bbda47a2fb5e91c437341938f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b4063f4f2c6fc90bbda47a2fb5e91c437341938f/convert.py
cur_dir_paths = [ os.path.join(script_path, 'cgc'), os.path.join(script_path, 'cgc.exe') ]
cur_dir_paths = [os.path.join(script_path, 'cgc'), os.path.join(script_path, 'cgc.exe')]
def default_cgc(): paths = [ '/usr/bin/cgc', 'C:/Program Files/NVIDIA Corporation/Cg/bin/cgc.exe', 'C:/Program Files (x86)/NVIDIA Corporation/Cg/bin/cgc.exe' ] for path in paths: if os.path.exists(path): return path script_path = os.path.abspath(sys.path[0]) # Try again looking in the current working directory to match...
b4063f4f2c6fc90bbda47a2fb5e91c437341938f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b4063f4f2c6fc90bbda47a2fb5e91c437341938f/convert.py
exes = [ os.path.join(cg_root, 'linux', 'bin', 'cgc'), os.path.join(cg_root, 'linux', 'bin64', 'cgc'), os.path.join(cg_root, 'mac', 'bin', 'cgc'), os.path.join(cg_root, 'win', 'bin', 'cgc.exe') ] for exe in exes:
exe_paths = ['linux/bin/cgc', 'linux/bin64/cgc', 'mac/bin/cgc', 'win/bin/cgc.exe'] for exe_path in exe_paths:
def default_cgc(): paths = [ '/usr/bin/cgc', 'C:/Program Files/NVIDIA Corporation/Cg/bin/cgc.exe', 'C:/Program Files (x86)/NVIDIA Corporation/Cg/bin/cgc.exe' ] for path in paths: if os.path.exists(path): return path script_path = os.path.abspath(sys.path[0]) # Try again looking in the current working directory to match...
b4063f4f2c6fc90bbda47a2fb5e91c437341938f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b4063f4f2c6fc90bbda47a2fb5e91c437341938f/convert.py
subprocess.call([exe, '-v'], stdout=open(os.devnull, 'w'), stderr=open(os.devnull, 'w')) return exe
exe = os.path.join(cg_root, exe_path) return_code = subprocess.call([exe, '-v'], stdout=open(os.devnull, 'w'), stderr=open(os.devnull, 'w')) if return_code == 0 or return_code == 1: return exe
def default_cgc(): paths = [ '/usr/bin/cgc', 'C:/Program Files/NVIDIA Corporation/Cg/bin/cgc.exe', 'C:/Program Files (x86)/NVIDIA Corporation/Cg/bin/cgc.exe' ] for path in paths: if os.path.exists(path): return path script_path = os.path.abspath(sys.path[0]) # Try again looking in the current working directory to match...
b4063f4f2c6fc90bbda47a2fb5e91c437341938f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b4063f4f2c6fc90bbda47a2fb5e91c437341938f/convert.py
def check_cgc(CGC): if not os.path.exists(CGC): print >>sys.stderr, CGC+' is not found, use --cgc option to specify its'
def check_cgc(cgc_path): if not os.path.exists(cgc_path): print >>sys.stderr, (cgc_path + ' is not found, use --cgc option to specify its')
def check_cgc(CGC): if not os.path.exists(CGC): print >>sys.stderr, CGC+' is not found, use --cgc option to specify its' print >>sys.stderr, 'location. You may need to install nvidia cg toolkit.' sys.exit(1)
b4063f4f2c6fc90bbda47a2fb5e91c437341938f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b4063f4f2c6fc90bbda47a2fb5e91c437341938f/convert.py
def cg_to_glsl(cg_shader, CGC):
def cg_to_glsl(cg_shader, cgc_path):
def cg_to_glsl(cg_shader, CGC): cg_shader = cg_rename_attributes(cg_shader) vertex_entry = re.search(r'#o3d\s+VertexShaderEntryPoint\s+(\w+)', cg_shader).group(1) p = subprocess.Popen([CGC]+('-profile glslv -entry %s' % vertex_entry).split(' '), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) gl...
b4063f4f2c6fc90bbda47a2fb5e91c437341938f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b4063f4f2c6fc90bbda47a2fb5e91c437341938f/convert.py
p = subprocess.Popen([CGC]+('-profile glslv -entry %s' %
p = subprocess.Popen([cgc_path]+('-profile glslv -entry %s' %
def cg_to_glsl(cg_shader, CGC): cg_shader = cg_rename_attributes(cg_shader) vertex_entry = re.search(r'#o3d\s+VertexShaderEntryPoint\s+(\w+)', cg_shader).group(1) p = subprocess.Popen([CGC]+('-profile glslv -entry %s' % vertex_entry).split(' '), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) gl...
b4063f4f2c6fc90bbda47a2fb5e91c437341938f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b4063f4f2c6fc90bbda47a2fb5e91c437341938f/convert.py
p = subprocess.Popen([CGC]+('-profile glslf -entry %s' %
p = subprocess.Popen([cgc_path]+('-profile glslf -entry %s' %
def cg_to_glsl(cg_shader, CGC): cg_shader = cg_rename_attributes(cg_shader) vertex_entry = re.search(r'#o3d\s+VertexShaderEntryPoint\s+(\w+)', cg_shader).group(1) p = subprocess.Popen([CGC]+('-profile glslv -entry %s' % vertex_entry).split(' '), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) gl...
b4063f4f2c6fc90bbda47a2fb5e91c437341938f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b4063f4f2c6fc90bbda47a2fb5e91c437341938f/convert.py
def main(cg_shader, CGC):
def main(cg_shader, cgc_path):
def main(cg_shader, CGC): matrixloadorder = get_matrixloadorder(cg_shader) glsl_vertex, glsl_fragment, log = cg_to_glsl(cg_shader, CGC) print log print fix_glsl(glsl_vertex) print print '// #o3d SplitMarker' print get_matrixloadorder(cg_shader).strip() print print fix_glsl(glsl_fragment)
b4063f4f2c6fc90bbda47a2fb5e91c437341938f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b4063f4f2c6fc90bbda47a2fb5e91c437341938f/convert.py
glsl_vertex, glsl_fragment, log = cg_to_glsl(cg_shader, CGC)
glsl_vertex, glsl_fragment, log = cg_to_glsl(cg_shader, cgc_path)
def main(cg_shader, CGC): matrixloadorder = get_matrixloadorder(cg_shader) glsl_vertex, glsl_fragment, log = cg_to_glsl(cg_shader, CGC) print log print fix_glsl(glsl_vertex) print print '// #o3d SplitMarker' print get_matrixloadorder(cg_shader).strip() print print fix_glsl(glsl_fragment)
b4063f4f2c6fc90bbda47a2fb5e91c437341938f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b4063f4f2c6fc90bbda47a2fb5e91c437341938f/convert.py
CGC = default_cgc()
cgc_path = default_cgc()
def main(cg_shader, CGC): matrixloadorder = get_matrixloadorder(cg_shader) glsl_vertex, glsl_fragment, log = cg_to_glsl(cg_shader, CGC) print log print fix_glsl(glsl_vertex) print print '// #o3d SplitMarker' print get_matrixloadorder(cg_shader).strip() print print fix_glsl(glsl_fragment)
b4063f4f2c6fc90bbda47a2fb5e91c437341938f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b4063f4f2c6fc90bbda47a2fb5e91c437341938f/convert.py
cmdline_parser.add_option('--cgc', dest='CGC', default=CGC,
cmdline_parser.add_option('--cgc', dest='cgc_path', default=cgc_path,
def main(cg_shader, CGC): matrixloadorder = get_matrixloadorder(cg_shader) glsl_vertex, glsl_fragment, log = cg_to_glsl(cg_shader, CGC) print log print fix_glsl(glsl_vertex) print print '// #o3d SplitMarker' print get_matrixloadorder(cg_shader).strip() print print fix_glsl(glsl_fragment)
b4063f4f2c6fc90bbda47a2fb5e91c437341938f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b4063f4f2c6fc90bbda47a2fb5e91c437341938f/convert.py