bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
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) | 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) | 476,100 |
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) | 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) | 476,101 |
def __init__(self): self.site='UNDEFINED' self.times=[] | def __init__(self): self.site='UNDEFINED' self.times=[] | 476,102 |
def percentile(N, percent, key=lambda x:x): """ Find the percentile of a list of values. @parameter N - is a list of values. Note N MUST BE already sorted. @parameter percent - a float value from 0.0 to 1.0. @parameter key - optional key function to compute value from each element of N. @return - the percentile of th... | def percentile(N, percent, key=lambda x:x): """ Find the percentile of a list of values. class desktopui_PageCyclerTests(test.test): version = 1 results = {} @return - the percentile of the values """ if not N: return None k = (len(N)-1) * percent f = math.floor(k) c = math.ceil(k) if f == c: return key(N[int(k)]) d0... | 476,103 |
def percentile(N, percent, key=lambda x:x): """ Find the percentile of a list of values. @parameter N - is a list of values. Note N MUST BE already sorted. @parameter percent - a float value from 0.0 to 1.0. @parameter key - optional key function to compute value from each element of N. @return - the percentile of th... | def percentile(N, percent, key=lambda x:x): """ Find the percentile of a list of values. @parameter N - is a list of values. Note N MUST BE already sorted. @parameter percent - a float value from 0.0 to 1.0. @parameter key - optional key function to compute value from each element of N. def run_page_cycler(self, gtes... | 476,104 |
def mean(numbers): assert(len(numbers) != 0), 'list should not be empty!' return sum(numbers)/len(numbers) | def mean(numbers): assert(len(numbers) != 0), 'list should not be empty!' return sum(numbers)/len(numbers) | 476,105 |
def WriteGetCode(self, file): """Overridden from Argument.""" code = """ %(type)s %(name)s = c.%(name)s; | def WriteGetCode(self, file): """Overridden from Argument.""" code = """ %(type)s %(name)s = c.%(name)s; | 476,106 |
def GetInvalidArg(self, offset, index): """returns an invalid value by index.""" if self.resource_type == "Texture": return ("client_buffer_id_", "kNoError", "GL_INVALID_OPERATION") return ("client_texture_id_", "kNoError", "GL_INVALID_OPERATION") | defGetInvalidArg(self,offset,index):"""returnsaninvalidvaluebyindex."""ifself.resource_type=="Texture":return("client_buffer_id_","kNoError","GL_INVALID_OPERATION")return("client_texture_id_","kNoError","GL_INVALID_OPERATION") | 476,107 |
def _ParseArgs(self): parser = optparse.OptionParser() parser.add_option( '-d', '--outdir', type='string', default=None, help='Directory in which to setup. This is typically the directory ' 'where the binaries would go when compiled from source.') parser.add_option( '-p', '--platform', type='string', default=pyauto_uti... | def _ParseArgs(self): parser = optparse.OptionParser() parser.add_option( '-d', '--outdir', type='string', default=None, help='Directory in which to setup. This is typically the directory ' 'where the binaries would go when compiled from source.') parser.add_option( '-p', '--platform', type='string', default=pyauto_uti... | 476,108 |
def _ParseArgs(self): parser = optparse.OptionParser() parser.add_option( '-d', '--outdir', type='string', default=None, help='Directory in which to setup. This is typically the directory ' 'where the binaries would go when compiled from source.') parser.add_option( '-p', '--platform', type='string', default=pyauto_uti... | def _ParseArgs(self): parser = optparse.OptionParser() parser.add_option( '-d', '--outdir', type='string', default=None, help='Directory in which to setup. This is typically the directory ' 'where the binaries would go when compiled from source.') parser.add_option( '-p', '--platform', type='string', default=pyauto_uti... | 476,109 |
def Run(self): self._ParseArgs() if not os.path.isdir(self._outdir): os.makedirs(self._outdir) | def Run(self): self._ParseArgs() if not os.path.isdir(self._outdir): os.makedirs(self._outdir) | 476,110 |
def testPerfExpectations(self): perf_data = LoadData() | def testPerfExpectations(self): perf_data = LoadData() | 476,111 |
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | 476,112 |
def ParseReportFile(self, filename): self.cur_fd_ = open(filename, 'r') | def ParseReportFile(self, filename): self.cur_fd_ = open(filename, 'r') | 476,113 |
def AddComputedActions(actions): """Add computed actions to the actions list. Arguments: actions: set of actions to add to. """ # Actions for back_forward_menu_model.cc. for dir in ['BackMenu_', 'ForwardMenu_']: actions.add(dir + 'ShowFullHistory') actions.add(dir + 'Popup') for i in range(1, 20): actions.add(dir + '... | def AddComputedActions(actions): """Add computed actions to the actions list. Arguments: actions: set of actions to add to. """ # Actions for back_forward_menu_model.cc. for dir in ('BackMenu_', 'ForwardMenu_'): actions.add(dir + 'ShowFullHistory') actions.add(dir + 'Popup') for i in range(1, 20): actions.add(dir + '... | 476,114 |
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... | 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... | 476,115 |
def run(self): """Delegate main work to a helper method and watch for uncaught exceptions.""" self._start_time = time.time() self._num_tests = 0 try: logging.debug('thread %s starting' % (self.getName())) self._Run(test_runner=None, result_summary=None) logging.debug('thread %s done (%d tests)' % (self.getName(), self.... | def run(self): """Delegate main work to a helper method and watch for uncaught exceptions.""" self._start_time = time.time() self._num_tests = 0 try: logging.debug('%s starting' % (self.getName())) self._Run(test_runner=None, result_summary=None) logging.debug('thread %s done (%d tests)' % (self.getName(), self.GetNumT... | 476,116 |
def run(self): """Delegate main work to a helper method and watch for uncaught exceptions.""" self._start_time = time.time() self._num_tests = 0 try: logging.debug('thread %s starting' % (self.getName())) self._Run(test_runner=None, result_summary=None) logging.debug('thread %s done (%d tests)' % (self.getName(), self.... | def run(self): """Delegate main work to a helper method and watch for uncaught exceptions.""" self._start_time = time.time() self._num_tests = 0 try: logging.debug('thread %s starting' % (self.getName())) self._Run(test_runner=None, result_summary=None) logging.debug('%s done (%d tests)' % (self.getName(), self.GetNumT... | 476,117 |
def run(self): """Delegate main work to a helper method and watch for uncaught exceptions.""" self._start_time = time.time() self._num_tests = 0 try: logging.debug('thread %s starting' % (self.getName())) self._Run(test_runner=None, result_summary=None) logging.debug('thread %s done (%d tests)' % (self.getName(), self.... | def run(self): """Delegate main work to a helper method and watch for uncaught exceptions.""" self._start_time = time.time() self._num_tests = 0 try: logging.debug('thread %s starting' % (self.getName())) self._Run(test_runner=None, result_summary=None) logging.debug('thread %s done (%d tests)' % (self.getName(), self.... | 476,118 |
def _Run(self, test_runner, result_summary): """Main work entry point of the thread. Basically we pull urls from the filename queue and run the tests until we run out of urls. | def _Run(self, test_runner, result_summary): """Main work entry point of the thread. Basically we pull urls from the filename queue and run the tests until we run out of urls. | 476,119 |
def _Run(self, test_runner, result_summary): """Main work entry point of the thread. Basically we pull urls from the filename queue and run the tests until we run out of urls. | def _Run(self, test_runner, result_summary): """Main work entry point of the thread. Basically we pull urls from the filename queue and run the tests until we run out of urls. | 476,120 |
def ExtractModuleName(infile_path): """Infers the module name from the input file path. The input filename is supposed to be in the form "ModuleName.sigs". This function splits the filename from the extention on that basename of the path and returns that as the module name. Args: infile_path: String holding the path ... | def ExtractModuleName(infile_path): """Infers the module name from the input file path. The input filename is supposed to be in the form "ModuleName.sigs". This function splits the filename from the extention on that basename of the path and returns that as the module name. Args: infile_path: String holding the path ... | 476,121 |
def RewritePath(path, sysroot): """Rewrites a path by prefixing it with the sysroot if it is absolute.""" if os.path.isabs(path) and not path.startswith(sysroot): path = path.lstrip('/') return os.path.join(sysroot, path) else: return path | def RewritePath(path, opts): """Rewrites a path by stripping the prefix and prepending the sysroot.""" sysroot = opts.sysroot prefix = opts.strip_prefix if os.path.isabs(path) and not path.startswith(sysroot): path = path.lstrip('/') return os.path.join(sysroot, path) else: return path | 476,122 |
def RewriteLine(line, sysroot): """Rewrites all the paths in recognized options.""" args = line.split() count = len(args) i = 0 while i < count: for prefix in REWRITE_PREFIX: # The option can be either in the form "-I /path/to/dir" or # "-I/path/to/dir" so handle both. if args[i] == prefix: i += 1 try: args[i] = Rewrit... | def RewriteLine(line, opts): """Rewrites all the paths in recognized options.""" args = line.split() count = len(args) i = 0 while i < count: for prefix in REWRITE_PREFIX: # The option can be either in the form "-I /path/to/dir" or # "-I/path/to/dir" so handle both. if args[i] == prefix: i += 1 try: args[i] = RewritePa... | 476,123 |
def RewriteLine(line, sysroot): """Rewrites all the paths in recognized options.""" args = line.split() count = len(args) i = 0 while i < count: for prefix in REWRITE_PREFIX: # The option can be either in the form "-I /path/to/dir" or # "-I/path/to/dir" so handle both. if args[i] == prefix: i += 1 try: args[i] = Rewrit... | def RewriteLine(line, sysroot): """Rewrites all the paths in recognized options.""" args = line.split() count = len(args) i = 0 while i < count: for prefix in REWRITE_PREFIX: # The option can be either in the form "-I /path/to/dir" or # "-I/path/to/dir" so handle both. if args[i] == prefix: i += 1 try: args[i] = Rewrit... | 476,124 |
def RewriteLine(line, sysroot): """Rewrites all the paths in recognized options.""" args = line.split() count = len(args) i = 0 while i < count: for prefix in REWRITE_PREFIX: # The option can be either in the form "-I /path/to/dir" or # "-I/path/to/dir" so handle both. if args[i] == prefix: i += 1 try: args[i] = Rewrit... | def RewriteLine(line, sysroot): """Rewrites all the paths in recognized options.""" args = line.split() count = len(args) i = 0 while i < count: for prefix in REWRITE_PREFIX: # The option can be either in the form "-I /path/to/dir" or # "-I/path/to/dir" so handle both. if args[i] == prefix: i += 1 try: args[i] = Rewrit... | 476,125 |
def main(argv): try: sysroot = argv[1] except IndexError: sys.stderr.write('usage: %s /path/to/sysroot\n' % argv[0]) return 1 for line in sys.stdin.readlines(): line = RewriteLine(line.strip(), sysroot) print line return 0 | def main(argv): parser = optparse.OptionParser() parser.add_option('-s', '--sysroot', default='/', help='sysroot to prepend') parser.add_option('-p', '--strip-prefix', default='', help='prefix to strip') opts, args = parser.parse_args(argv[1:]) for line in sys.stdin.readlines(): line = RewriteLine(line.strip(), sysroo... | 476,126 |
def main(argv): try: sysroot = argv[1] except IndexError: sys.stderr.write('usage: %s /path/to/sysroot\n' % argv[0]) return 1 for line in sys.stdin.readlines(): line = RewriteLine(line.strip(), sysroot) print line return 0 | def main(argv): try: sysroot = argv[1] except IndexError: sys.stderr.write('usage: %s /path/to/sysroot\n' % argv[0]) return 1 for line in sys.stdin.readlines(): line = RewriteLine(line.strip(), opts) print line return 0 | 476,127 |
def _CommonChecks(input_api, output_api): results = [] # What does this code do? # It loads the default black list (e.g. third_party, experimental, etc) and # add our black list (breakpad, skia and v8 are still not following # google style and are not really living this repository). # See presubmit_support.py InputApi.... | def _CommonChecks(input_api, output_api): results = [] # What does this code do? # It loads the default black list (e.g. third_party, experimental, etc) and # add our black list (breakpad, skia and v8 are still not following # google style and are not really living this repository). # See presubmit_support.py InputApi.... | 476,128 |
def _CommonChecks(input_api, output_api): results = [] # What does this code do? # It loads the default black list (e.g. third_party, experimental, etc) and # add our black list (breakpad, skia and v8 are still not following # google style and are not really living this repository). # See presubmit_support.py InputApi.... | def _CommonChecks(input_api, output_api): results = [] # What does this code do? # It loads the default black list (e.g. third_party, experimental, etc) and # add our black list (breakpad, skia and v8 are still not following # google style and are not really living this repository). # See presubmit_support.py InputApi.... | 476,129 |
def _CommonChecks(input_api, output_api): results = [] # What does this code do? # It loads the default black list (e.g. third_party, experimental, etc) and # add our black list (breakpad, skia and v8 are still not following # google style and are not really living this repository). # See presubmit_support.py InputApi.... | def _CommonChecks(input_api, output_api): results = [] # What does this code do? # It loads the default black list (e.g. third_party, experimental, etc) and # add our black list (breakpad, skia and v8 are still not following # google style and are not really living this repository). # See presubmit_support.py InputApi.... | 476,130 |
def _CommonChecks(input_api, output_api): results = [] # What does this code do? # It loads the default black list (e.g. third_party, experimental, etc) and # add our black list (breakpad, skia and v8 are still not following # google style and are not really living this repository). # See presubmit_support.py InputApi.... | def _CommonChecks(input_api, output_api): results = [] # What does this code do? # It loads the default black list (e.g. third_party, experimental, etc) and # add our black list (breakpad, skia and v8 are still not following # google style and are not really living this repository). # See presubmit_support.py InputApi.... | 476,131 |
def _CommonChecks(input_api, output_api): results = [] # What does this code do? # It loads the default black list (e.g. third_party, experimental, etc) and # add our black list (breakpad, skia and v8 are still not following # google style and are not really living this repository). # See presubmit_support.py InputApi.... | def _CommonChecks(input_api, output_api): results = [] # What does this code do? # It loads the default black list (e.g. third_party, experimental, etc) and # add our black list (breakpad, skia and v8 are still not following # google style and are not really living this repository). # See presubmit_support.py InputApi.... | 476,132 |
def CreateBrowserWrapper(self, command, logfiles): """The program being run invokes Python or something else that can't stand to be valgrinded, and also invokes the Chrome browser. Set an environment variable to tell the program to prefix the Chrome commandline with a magic wrapper. Build the magic wrapper here. """ ... | def CreateBrowserWrapper(self, command, logfiles): """The program being run invokes Python or something else that can't stand to be valgrinded, and also invokes the Chrome browser. Set an environment variable to tell the program to prefix the Chrome commandline with a magic wrapper. Build the magic wrapper here. """ ... | 476,133 |
def CreateBrowserWrapper(self, command, logfiles): """The program being run invokes Python or something else that can't stand to be valgrinded, and also invokes the Chrome browser. Set an environment variable to tell the program to prefix the Chrome commandline with a magic wrapper. Build the magic wrapper here. """ ... | def CreateBrowserWrapper(self, command, logfiles): """The program being run invokes Python or something else that can't stand to be valgrinded, and also invokes the Chrome browser. Set an environment variable to tell the program to prefix the Chrome commandline with a magic wrapper. Build the magic wrapper here. """ ... | 476,134 |
def __init__(self, methodName='runTest'): pyautolib.PyUITestSuite.__init__(self, sys.argv) # Figure out path to chromium binaries browser_dir = os.path.normpath(os.path.dirname(pyautolib.__file__)) os.environ['PATH'] = browser_dir + os.pathsep + os.environ['PATH'] self.Initialize(pyautolib.FilePath(browser_dir)) unitte... | def __init__(self, methodName='runTest', extra_chrome_flags=None): """Initialize PyUITest. When redefining __init__ in a derived class, make sure that: o you make a call this __init__ o __init__ takes methodName as a arg. this is mandated by unittest module Args: methodName: the default method name. Internal use by u... | 476,135 |
def PrepareForTestWine(self): """Set up the Wine environment. | def PrepareForTestWine(self): """Set up the Wine environment. | 476,136 |
def _parse_api_calls(self, api_methods): """ Returns a list of Chrome extension API calls the sample makes. | def _parse_api_calls(self, api_methods): """ Returns a list of Chrome extension API calls the sample makes. | 476,137 |
def _parse_api_calls(self, api_methods): """ Returns a list of Chrome extension API calls the sample makes. | def _parse_api_calls(self, api_methods): """ Returns a list of Chrome extension API calls the sample makes. | 476,138 |
def main(): if not os.path.exists('third_party/WebKit/.git'): print "ERROR: third_party/WebKit appears to not be under git control." print "See http://code.google.com/p/chromium/wiki/UsingWebKitGit for" print "setup instructions." return webkit_rev = GetWebKitRev() print 'Desired revision: r%s.' % webkit_rev os.chdir(... | def main(): if not os.path.exists('third_party/WebKit/.git'): if os.path.exists('third_party/WebKit'): print "ERROR: third_party/WebKit appears to not be under git control." else: print "ERROR: third_party/WebKit could not be found." print "Did you run this script from the right directory?" print "See http://code.goog... | 476,139 |
def testPDFRunner(self): """Navigate to pdf files and verify that browser doesn't crash""" # bail out if not a branded build properties = self.GetBrowserInfo()['properties'] if properties['branding'] != 'Google Chrome': return pdf_files_path = os.path.join(self.DataDir(), 'plugin', 'pdf') pdf_files = glob.glob(os.path.... | def testPDFRunner(self): """Navigate to pdf files and verify that browser doesn't crash""" # bail out if not a branded build properties = self.GetBrowserInfo()['properties'] if properties['branding'] != 'Google Chrome': return pdf_files_path = os.path.join(self.DataDir(), 'pyauto_private', 'pdf') pdf_files = glob.glob(... | 476,140 |
def __init__(self, options, args, test): # The known list of tests. # Recognise the original abbreviations as well as full executable names. self._test_list = { "base": self.TestBase, "base_unittests": self.TestBase, "browser": self.TestBrowser, "browser_tests": self.TestBrowser, "googleurl": self.TestG... | def __init__(self, options, args, test): # The known list of tests. # Recognise the original abbreviations as well as full executable names. self._test_list = { "base": self.TestBase, "base_unittests": self.TestBase, "browser": self.TestBrowser, "browser_tests": self.TestBrowser, "googleurl": self.TestG... | 476,141 |
def SetupHtmlDirectory(html_directory, clean_html_directory): """Setup the directory to store html results. All html related files are stored in the "rebaseline_html" subdirectory. Args: html_directory: parent directory that stores the rebaselining results. If None, a temp directory is created. clean_html_directory: ... | def SetupHtmlDirectory(html_directory): """Setup the directory to store html results. All html related files are stored in the "rebaseline_html" subdirectory. Args: html_directory: parent directory that stores the rebaselining results. If None, a temp directory is created. clean_html_directory: if True, all existing ... | 476,142 |
def SetupHtmlDirectory(html_directory, clean_html_directory): """Setup the directory to store html results. All html related files are stored in the "rebaseline_html" subdirectory. Args: html_directory: parent directory that stores the rebaselining results. If None, a temp directory is created. clean_html_directory: ... | def SetupHtmlDirectory(html_directory, clean_html_directory): """Setup the directory to store html results. All html related files are stored in the "rebaseline_html" subdirectory. Args: html_directory: parent directory that stores the rebaselining results. If None, a temp directory is created. Returns: the director... | 476,143 |
def SetupHtmlDirectory(html_directory, clean_html_directory): """Setup the directory to store html results. All html related files are stored in the "rebaseline_html" subdirectory. Args: html_directory: parent directory that stores the rebaselining results. If None, a temp directory is created. clean_html_directory: ... | def SetupHtmlDirectory(html_directory, clean_html_directory): """Setup the directory to store html results. All html related files are stored in the "rebaseline_html" subdirectory. Args: html_directory: parent directory that stores the rebaselining results. If None, a temp directory is created. clean_html_directory: ... | 476,144 |
def _GetArchiveUrl(self): """Generate the url to download latest layout test archive. | def _GetArchiveUrl(self): """Generate the url to download latest layout test archive. | 476,145 |
def _ExtractAndAddNewBaselines(self, archive_file): """Extract new baselines from archive and add them to SVN repository. | def _ExtractAndAddNewBaselines(self, archive_file): """Extract new baselines from archive and add them to SVN repository. | 476,146 |
def _CreateHtmlBaselineFiles(self, baseline_fullpath): """Create baseline files (old, new and diff) in html directory. | def _CreateHtmlBaselineFiles(self, baseline_fullpath): """Create baseline files (old, new and diff) in html directory. | 476,147 |
def __init__(self, options, platforms, rebaselining_tests): self._html_directory = options.html_directory self._browser_path = options.browser_path self._platforms = platforms self._rebaselining_tests = rebaselining_tests self._html_file = os.path.join(options.html_directory, 'rebaseline.html') | def __init__(self, options, platforms, rebaselining_tests): self._html_directory = options.html_directory self._platforms = platforms self._rebaselining_tests = rebaselining_tests self._html_file = os.path.join(options.html_directory, 'rebaseline.html') | 476,148 |
def ShowHtml(self): """Launch the rebaselining html in brwoser.""" | def ShowHtml(self): """Launch the rebaselining html in brwoser.""" | 476,149 |
def main(): """Main function to produce new baselines.""" option_parser = optparse.OptionParser() option_parser.add_option('-v', '--verbose', action='store_true', default=False, help='include debug-level logging.') option_parser.add_option('-p', '--platforms', default='mac,win,win-xp,win-vista,linux', help=('Comma de... | def main(): """Main function to produce new baselines.""" option_parser = optparse.OptionParser() option_parser.add_option('-v', '--verbose', action='store_true', default=False, help='include debug-level logging.') option_parser.add_option('-p', '--platforms', default='mac,win,win-xp,win-vista,linux', help=('Comma de... | 476,150 |
def main(): """Main function to produce new baselines.""" option_parser = optparse.OptionParser() option_parser.add_option('-v', '--verbose', action='store_true', default=False, help='include debug-level logging.') option_parser.add_option('-p', '--platforms', default='mac,win,win-xp,win-vista,linux', help=('Comma de... | def main(): """Main function to produce new baselines.""" option_parser = optparse.OptionParser() option_parser.add_option('-v', '--verbose', action='store_true', default=False, help='include debug-level logging.') option_parser.add_option('-p', '--platforms', default='mac,win,win-xp,win-vista,linux', help=('Comma de... | 476,151 |
def main(): """Main function to produce new baselines.""" option_parser = optparse.OptionParser() option_parser.add_option('-v', '--verbose', action='store_true', default=False, help='include debug-level logging.') option_parser.add_option('-p', '--platforms', default='mac,win,win-xp,win-vista,linux', help=('Comma de... | def main(): """Main function to produce new baselines.""" option_parser = optparse.OptionParser() option_parser.add_option('-v', '--verbose', action='store_true', default=False, help='include debug-level logging.') option_parser.add_option('-p', '--platforms', default='mac,win,win-xp,win-vista,linux', help=('Comma de... | 476,152 |
def main(): """Main function to produce new baselines.""" option_parser = optparse.OptionParser() option_parser.add_option('-v', '--verbose', action='store_true', default=False, help='include debug-level logging.') option_parser.add_option('-p', '--platforms', default='mac,win,win-xp,win-vista,linux', help=('Comma de... | def main(): """Main function to produce new baselines.""" option_parser = optparse.OptionParser() option_parser.add_option('-v', '--verbose', action='store_true', default=False, help='include debug-level logging.') option_parser.add_option('-p', '--platforms', default='mac,win,win-xp,win-vista,linux', help=('Comma de... | 476,153 |
def main(): """Main function to produce new baselines.""" option_parser = optparse.OptionParser() option_parser.add_option('-v', '--verbose', action='store_true', default=False, help='include debug-level logging.') option_parser.add_option('-p', '--platforms', default='mac,win,win-xp,win-vista,linux', help=('Comma de... | def main(): """Main function to produce new baselines.""" option_parser = optparse.OptionParser() option_parser.add_option('-v', '--verbose', action='store_true', default=False, help='include debug-level logging.') option_parser.add_option('-p', '--platforms', default='mac,win,win-xp,win-vista,linux', help=('Comma de... | 476,154 |
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... | 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' or name == 'BufferSubData': file.Write(" uint32 data_size = size;\n") elif name == 'BufferSubData': fi... | 476,155 |
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... | 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 == 'CompressedTexImage2D' or name == 'Compressed... | 476,156 |
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... | 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... | 476,157 |
def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" file.Write(" uint32 data_size = n * sizeof(GLuint);\n") | def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" file.Write(" uint32 data_size = n * sizeof(GLuint);\n") | 476,158 |
def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" file.Write(" uint32 data_size = n * sizeof(GLuint);\n") | def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" file.Write(" uint32 data_size = n * sizeof(GLuint);\n") | 476,159 |
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() | 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() | 476,160 |
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)) | 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)) | 476,161 |
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)) | 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)) | 476,162 |
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" code = """%(return_type)s %(func_name)s(%(args)s) { | def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" code = """%(return_type)s %(func_name)s(%(args)s) { | 476,163 |
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" code = """%(return_type)s %(func_name)s(%(args)s) { | def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" code = """%(return_type)s %(func_name)s(%(args)s) { | 476,164 |
def CreateAnalyzer(self): use_gdb = common.IsMac() return tsan_analyze.TsanAnalyzer(self._source_dir) | def CreateAnalyzer(self): use_gdb = common.IsMac() return tsan_analyze.TsanAnalyzer(self._source_dir) | 476,165 |
def __del__(self): # python unittest module is setup such that the suite gets deleted before # the test cases, which is odd because our test cases depend on # initializtions like exitmanager, autorelease pool provided by the # suite. Forcibly delete the test cases before the suite. del self._tests pyautolib.PyUITestSui... | def __del__(self): # python unittest module is setup such that the suite gets deleted before # the test cases, which is odd because our test cases depend on # initializtions like exitmanager, autorelease pool provided by the # suite. Forcibly delete the test cases before the suite. del self._tests pyautolib.PyUITestSui... | 476,166 |
def _Run(self): """Run the tests.""" if self._options.wait_for_debugger: raw_input('Attach debugger to process %s and hit <enter> ' % os.getpid()) | def _Run(self): """Run the tests.""" if self._options.wait_for_debugger: raw_input('Attach debugger to process %s and hit <enter> ' % os.getpid()) | 476,167 |
def __init__(self, filename): self.filename = filename self.file = open(filename, "w") | def __init__(self, filename): self.filename = filename self.file = open(filename, "w") | 476,168 |
def __init__(self, source_dir, files, show_all_leaks=False, use_gdb=False): '''Reads in a set of files. | def __init__(self, source_dir, files, show_all_leaks=False, use_gdb=False): '''Reads in a set of files. | 476,169 |
def __init__(self, source_dir, files, show_all_leaks=False, use_gdb=False): '''Reads in a set of files. | def __init__(self, source_dir, files, show_all_leaks=False, use_gdb=False): '''Reads in a set of files. | 476,170 |
def _CommonChecks(input_api, output_api): results = [] # What does this code do? # It loads the default black list (e.g. third_party, experimental, etc) and # add our black list (breakpad, skia and v8 are still not following # google style and are not really living this repository). # See presubmit_support.py InputApi.... | def _CommonChecks(input_api, output_api): results = [] # What does this code do? # It loads the default black list (e.g. third_party, experimental, etc) and # add our black list (breakpad, skia and v8 are still not following # google style and are not really living this repository). # See presubmit_support.py InputApi.... | 476,171 |
def _CommonChecks(input_api, output_api): results = [] # What does this code do? # It loads the default black list (e.g. third_party, experimental, etc) and # add our black list (breakpad, skia and v8 are still not following # google style and are not really living this repository). # See presubmit_support.py InputApi.... | def _CommonChecks(input_api, output_api): results = [] # What does this code do? # It loads the default black list (e.g. third_party, experimental, etc) and # add our black list (breakpad, skia and v8 are still not following # google style and are not really living this repository). # See presubmit_support.py InputApi.... | 476,172 |
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... | 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... | 476,173 |
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... | 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... | 476,174 |
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | 476,175 |
def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention.""" impl_func = func.GetInfo('impl_func') impl_decl = func.GetInfo('impl_decl') if (func.can_auto_generate and (impl_func == None or impl_func == True) and (impl_decl == None or impl_decl == True)): file.Write("%s %s(%s) {\n" % (func... | def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention.""" impl_func = func.GetInfo('impl_func') impl_decl = func.GetInfo('impl_decl') if (func.can_auto_generate and (impl_func == None or impl_func == True) and (impl_decl == None or impl_decl == True)): file.Write("%s %s(%s) {\n" % (func... | 476,176 |
def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention.""" impl_func = func.GetInfo('impl_func') impl_decl = func.GetInfo('impl_decl') if (func.can_auto_generate and (impl_func == None or impl_func == True) and (impl_decl == None or impl_decl == True)): file.Write("%s %s(%s) {\n" % (func... | def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention.""" impl_func = func.GetInfo('impl_func') impl_decl = func.GetInfo('impl_decl') if (func.can_auto_generate and (impl_func == None or impl_func == True) and (impl_decl == None or impl_decl == True)): file.Write("%s %s(%s) {\n" % (func... | 476,177 |
def WriteHandlerImplementation (self, func, file): """Overrriden from TypeHandler.""" file.Write(" if (!GenGLObjects<GL%sHelper>(n, %s)) {\n" " return error::kInvalidArguments;\n" " }\n" % (func.name, func.GetLastOriginalArg().name)) | def WriteHandlerImplementation (self, func, file): """Overrriden from TypeHandler.""" file.Write(" if (!%sHelper(n, %s)) {\n" " return error::kInvalidArguments;\n" " }\n" % (func.name, func.GetLastOriginalArg().name)) | 476,178 |
def WriteImmediateHandlerImplementation(self, func, file): """Overrriden from TypeHandler.""" file.Write(" if (!GenGLObjects<GL%sHelper>(n, %s)) {\n" " return error::kInvalidArguments;\n" " }\n" % (func.original_name, func.GetLastOriginalArg().name)) | def WriteImmediateHandlerImplementation(self, func, file): """Overrriden from TypeHandler.""" file.Write(" if (!%sHelper(n, %s)) {\n" " return error::kInvalidArguments;\n" " }\n" % (func.original_name, func.GetLastOriginalArg().name)) | 476,179 |
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" MakeIds(%s);\n" % func.MakeOriginalArgString("")) file.Write(" helper_->%sImmediate(%s);\n" % (func.name, func... | def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" MakeIds(%s);\n" % func.MakeOriginalArgString("")) file.Write(" helper_->%sImmediate(%s);\n" % (func.name, func... | 476,180 |
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | 476,181 |
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | 476,182 |
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | 476,183 |
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | 476,184 |
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | 476,185 |
def WriteHandlerImplementation (self, func, file): """Overrriden from TypeHandler.""" file.Write(" uint32 client_id = c.client_id;\n") file.Write(" %sHelper(%s);\n" % (func.name, func.MakeCmdArgString(""))) | def WriteHandlerImplementation (self, func, file): """Overrriden from TypeHandler.""" file.Write(" uint32 client_id = c.client_id;\n") file.Write(" if (!%sHelper(%s)) {\n" % (func.name, func.MakeCmdArgString(""))) | 476,186 |
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" GLuint client_id;\n") file.Write(" MakeIds(1, &client_id);\n") file.Write(" helper_->%s(%s);\n" % (func.name,... | def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" GLuint client_id;\n") file.Write(" MakeIds(&program_and_shader_id_allocator_, 1, &client_id);\n") file.Write("... | 476,187 |
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | 476,188 |
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | 476,189 |
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | 476,190 |
def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | 476,191 |
def WriteHandlerImplementation (self, func, file): """Overrriden from TypeHandler.""" file.Write(" DeleteGLObjects<GL%sHelper>(n, %s);\n" % (func.name, func.GetLastOriginalArg().name)) | def WriteHandlerImplementation (self, func, file): """Overrriden from TypeHandler.""" file.Write(" %sHelper(n, %s);\n" % (func.name, func.GetLastOriginalArg().name)) | 476,192 |
def WriteImmediateHandlerImplementation (self, func, file): """Overrriden from TypeHandler.""" file.Write(" DeleteGLObjects<GL%sHelper>(n, %s);\n" % (func.original_name, func.GetLastOriginalArg().name)) | def WriteImmediateHandlerImplementation (self, func, file): """Overrriden from TypeHandler.""" file.Write(" %sHelper(n, %s);\n" % (func.original_name, func.GetLastOriginalArg().name)) | 476,193 |
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" FreeIds(%s);\n" % func.MakeOri... | def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" FreeIds(&%s_id_allocator_, %s)... | 476,194 |
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... | 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... | 476,195 |
def WriteGetCode(self, file): """Overridden from Argument.""" file.Write(" %s %s;\n" % (self.type, self.name)) file.Write(" if (!id_manager()->GetServiceId(c.%s, &%s)) {\n" % (self.name, self.name)) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return error::kNoError;\n") file.Write(" }\n") | def WriteGetCode(self, file): """Overridden from Argument.""" file.Write(" %s %s;\n" % (self.type, self.name)) file.Write(" if (!id_manager()->GetServiceId(c.%s, &%s)) {\n" % (self.name, self.name)) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return error::kNoError;\n") file.Write(" }\n") | 476,196 |
def GetNumInvalidValues(self, func): """returns the number of invalid values to be tested.""" return 1 | def GetNumInvalidValues(self, func): """returns the number of invalid values to be tested.""" return 1 | 476,197 |
def WriteGetCode(self, file): """Overridden from Argument.""" file.Write(" %s %s = c.%s;\n" % (self.type, self.name, self.name)) file.Write(" if (%s != 0 && !id_manager()->GetServiceId(%s, &%s)) {\n" % (self.name, self.name, self.name)) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return error::k... | def WriteGetCode(self, file): """Overridden from Argument.""" file.Write(" %s %s = c.%s;\n" % (self.type, self.name, self.name)) file.Write(" if (%s != 0 && !id_manager()->GetServiceId(%s, &%s)) {\n" % (self.name, self.name, self.name)) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return error::k... | 476,198 |
def GetInvalidArg(self, offset, index): """returns an invalid value by index.""" if self.resource_type == "Texture": return ("client_buffer_id_", "kNoError", "GL_INVALID_OPERATION") return ("client_texture_id_", "kNoError", "GL_INVALID_OPERATION") | def GetInvalidArg(self, offset, index): """returns an invalid value by index.""" if self.resource_type == "Texture": return ("client_buffer_id_", "kNoError", "GL_INVALID_OPERATION") return ("client_texture_id_", "kNoError", "GL_INVALID_OPERATION") | 476,199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.