def processResults(self, moose_dir, options, output): reason = '' specs = self.specs if self.hasRedirectedOutput(options): redirected_output = util.getOutputFromFiles(self, options) output += redirected_output # Expected errors and assertions might do a lot of things including crash so we # will handle them seperately if specs.isValid('expect_err'): if not util.checkOutputForPattern(output, specs['expect_err']): reason = 'NO EXPECTED ERR' elif specs.isValid('expect_assert'): if options.method == 'dbg': # Only check asserts in debug mode if not util.checkOutputForPattern(output, specs['expect_assert']): reason = 'NO EXPECTED ASSERT' if reason == '': RunApp.testFileOutput(self, moose_dir, options, output) if reason != '': self.setStatus(reason, self.bucket_fail) else: self.setStatus(self.success_message, self.bucket_success) return output
def processResults(self, moose_dir, options, output): reason = '' specs = self.specs if self.hasRedirectedOutput(options): redirected_output = util.getOutputFromFiles(self, options) output += redirected_output # Expected errors and assertions might do a lot of things including crash so we # will handle them seperately if specs.isValid('expect_err'): if not util.checkOutputForPattern(output, specs['expect_err']): reason = 'EXPECTED ERROR MISSING' elif specs.isValid('expect_assert'): if options.method in [ 'dbg', 'devel' ]: # Only check asserts in debug and devel modes if not util.checkOutputForPattern(output, specs['expect_assert']): reason = 'EXPECTED ASSERT MISSING' # If we've set a reason right here, we should report the pattern that we were unable to match. if reason != '': output += "#" * 80 + "\n\nUnable to match the following pattern against the program's output:\n\n" + specs[ 'expect_err'] + "\n" if reason == '': RunApp.testFileOutput(self, moose_dir, options, output) if reason != '': self.setStatus(self.fail, reason) return output
def processResults(self, moose_dir, options, output): reason = '' specs = self.specs if self.hasRedirectedOutput(options): redirected_output = util.getOutputFromFiles(self, options) output += redirected_output # Expected errors and assertions might do a lot of things including crash so we # will handle them seperately if specs.isValid('expect_err'): if not util.checkOutputForPattern(output, specs['expect_err']): reason = 'EXPECTED ERROR MISSING' elif specs.isValid('expect_assert'): if options.method in ['dbg', 'devel']: # Only check asserts in debug and devel modes if not util.checkOutputForPattern(output, specs['expect_assert']): reason = 'EXPECTED ASSERT MISSING' # If we've set a reason right here, we should report the pattern that we were unable to match. if reason != '': output += "#"*80 + "\n\nUnable to match the following pattern against the program's output:\n\n" + specs['expect_err'] + "\n" if reason == '': RunApp.testFileOutput(self, moose_dir, options, output) if reason != '': self.setStatus(reason, self.bucket_fail) else: self.setStatus(self.success_message, self.bucket_success) return output
def processResults(self, moose_dir, options, output): reason = '' specs = self.specs if self.hasRedirectedOutput(options): redirected_output = util.getOutputFromFiles(self, options) output += redirected_output # Expected errors and assertions might do a lot of things including crash so we # will handle them seperately if specs.isValid('expect_err'): if not util.checkOutputForPattern(output, specs['expect_err']): reason = 'NO EXPECTED ERR' elif specs.isValid('expect_assert'): if options.method == 'dbg': # Only check asserts in debug mode if not util.checkOutputForPattern(output, specs['expect_assert']): reason = 'NO EXPECTED ASSERT' if reason == '': RunApp.testFileOutput(self, moose_dir, options, output) if reason != '': self.setStatus(reason, self.bucket_fail) else: self.setStatus(self.success_message, self.bucket_success) return output
def processResults(self, moose_dir, options, output): RunApp.testFileOutput(self, moose_dir, options, output) # Skip specs = self.specs if self.getStatus() == self.bucket_fail or specs['skip_checks']: return output # Don't Run VTKDiff on Scaled Tests if options.scaling and specs['scale_refine']: return output # Loop over every file for file in specs['vtkdiff']: # Error if gold file does not exist if not os.path.exists( os.path.join(specs['test_dir'], specs['gold_dir'], file)): output += "File Not Found: " + os.path.join( specs['test_dir'], specs['gold_dir'], file) self.setStatus('MISSING GOLD FILE', self.bucket_fail) break # Perform diff else: for file in self.specs['vtkdiff']: gold = os.path.join(specs['test_dir'], specs['gold_dir'], file) test = os.path.join(specs['test_dir'], file) # We always ignore the header_type attribute, since it was # introduced in VTK 7 and doesn't seem to be important as # far as Paraview is concerned. specs['ignored_attributes'].append('header_type') differ = XMLDiffer( gold, test, abs_zero=specs['abs_zero'], rel_tol=specs['rel_err'], ignored_attributes=specs['ignored_attributes']) # Print the results of the VTKDiff whether it passed or failed. output += differ.message() + '\n' if differ.fail(): self.setStatus('VTKDIFF', self.bucket_skip) break # If status is still pending, then it is a passing test if self.getStatus() == self.bucket_pending: self.setStatus(self.success_message, self.bucket_success) return output
def processResults(self, moose_dir, options, output): RunApp.testFileOutput(self, moose_dir, options, output) # Skip specs = self.specs if self.getStatus() == self.bucket_fail or specs['skip_checks']: return output # Don't Run VTKDiff on Scaled Tests if options.scaling and specs['scale_refine']: return output # Loop over every file for file in specs['vtkdiff']: # Error if gold file does not exist if not os.path.exists(os.path.join(specs['test_dir'], specs['gold_dir'], file)): output += "File Not Found: " + os.path.join(specs['test_dir'], specs['gold_dir'], file) self.setStatus('MISSING GOLD FILE', self.bucket_fail) break # Perform diff else: for file in self.specs['vtkdiff']: gold = os.path.join(specs['test_dir'], specs['gold_dir'], file) test = os.path.join(specs['test_dir'], file) # We always ignore the header_type attribute, since it was # introduced in VTK 7 and doesn't seem to be important as # far as Paraview is concerned. specs['ignored_attributes'].append('header_type') differ = XMLDiffer(gold, test, abs_zero=specs['abs_zero'], rel_tol=specs['rel_err'], ignored_attributes=specs['ignored_attributes']) # Print the results of the VTKDiff whether it passed or failed. output += differ.message() + '\n' if differ.fail(): self.addCaveats('VTKDIFF') self.setStatus(self.bucket_skip.status, self.bucket_skip) break # If status is still pending, then it is a passing test if self.getStatus() == self.bucket_pending: self.setStatus(self.success_message, self.bucket_success) return output
def processResults(self, moose_dir, options, output): return RunApp.testFileOutput(self, moose_dir, options, output)