~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/lib/sqlbench/sqlbench_test_execution.py

  • Committer: Mark Atwood
  • Date: 2011-06-19 04:17:51 UTC
  • mfrom: (2338.3.1 drizzle)
  • Revision ID: me@mark.atwood.name-20110619041751-hwkgdphvjvfjql9n
mergeĀ lp:~patrick-crews/drizzle/bug798968_crashme

Show diffs side-by-side

added added

removed removed

Lines of Context:
254
254
        self.current_test_exec_time = execution_time
255
255
 
256
256
    def process_crashme_output(self):
257
 
        infile_name = self.current_test_output.split('\n')[3].split(':')[1].strip()
258
 
        inf= open(infile_name, "r")
259
 
        inlines= inf.readlines()
260
 
        error_flag= False
261
 
        in_error_section = False
262
 
        # crash-me is quite chatty and we don't normally want to sift
263
 
        # through ALL of that stuff.  We do allow seeing it via --verbose
264
 
        if not self.verbose:
265
 
            self.current_test_output = ''
266
 
        for inline in inlines:
267
 
            if in_error_section and not inline.strip().startswith('#'):
268
 
                in_error_section = False
269
 
            if '=error' in inline:
270
 
                error_flag= True
271
 
                in_error_section= True
272
 
            if in_error_section:
273
 
                self.current_test_output += inline
274
 
        inf.close()                
275
 
        if self.current_test_retcode == 0 and not error_flag:
276
 
            return 'pass'
277
 
        else:
278
 
            return 'fail'
 
257
        if self.current_test_retcode == 0:
 
258
            infile_name = self.current_test_output.split('\n')[3].split(':')[1].strip()
 
259
            inf= open(infile_name, "r")
 
260
            inlines= inf.readlines()
 
261
            error_flag= False
 
262
            in_error_section = False
 
263
            # crash-me is quite chatty and we don't normally want to sift
 
264
            # through ALL of that stuff.  We do allow seeing it via --verbose
 
265
            if not self.verbose:
 
266
                self.current_test_output = ''
 
267
            for inline in inlines:
 
268
                if in_error_section and not inline.strip().startswith('#'):
 
269
                    in_error_section = False
 
270
                if '=error' in inline:
 
271
                    error_flag= True
 
272
                    in_error_section= True
 
273
                if in_error_section:
 
274
                    self.current_test_output += inline
 
275
            inf.close()                
 
276
            if not error_flag:
 
277
                return 'pass'
 
278
        
 
279
        return 'fail'
279
280
 
280
281