def processResults(self, moose_dir, retcode, options, output): RunApp.testFileOutput(self, moose_dir, retcode, 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, retcode, options, output): (reason, output) = RunApp.processResults(self, moose_dir, retcode, options, output) # Skip specs = self.specs if reason != '' or specs['skip_checks']: return (reason, output) # Don't Run VTKDiff on Scaled Tests if options.scaling and specs['scale_refine']: return (reason, 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) reason = 'MISSING GOLD FILE' 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(): reason = 'VTKDIFF' break # Return to the test harness return (reason, output)
def processResults(self, moose_dir, retcode, options, output): (reason, output) = RunApp.processResults(self, moose_dir, retcode, options, output) # Skip specs = self.specs if reason != '' or specs['skip_checks']: return (reason, output) # Don't Run VTKDiff on Scaled Tests if options.scaling and specs['scale_refine']: return (reason, 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) reason = 'MISSING GOLD FILE' 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(): reason = 'VTKDIFF' break # Return to the test harness return (reason, output)
def processResults(self, moose_dir, retcode, options, output): (reason, output) = RunApp.processResults(self, moose_dir, retcode, options, output) # Skip specs = self.specs if reason != '' or specs['skip_checks']: return (reason, output) # Don't Run VTKDiff on Scaled Tests if options.scaling and specs['scale_refine']: return (reason, 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) reason = 'MISSING GOLD FILE' break # Perform diff else: output = 'Running XMLDiffer.py' 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) differ = XMLDiffer(gold, test, abs_zero=specs['abs_zero'], rel_tol=specs['rel_err']) if differ.fail(): reason = 'VTKDIFF' output += differ.message() break # Return to the test harness return (reason, output)
def processResults(self, moose_dir, retcode, options, output): (reason, output) = RunApp.processResults(self, moose_dir, retcode, options, output) # Skip specs = self.specs if reason != '' or specs['skip_checks']: return (reason, output) # Don't Run VTKDiff on Scaled Tests if options.scaling and specs['scale_refine']: return (reason, 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) reason = 'MISSING GOLD FILE' break # Perform diff else: output = 'Running XMLDiffer.py' 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) differ = XMLDiffer(gold, test, abs_zero=specs['abs_zero'], rel_tol=specs['rel_err']) if differ.fail(): reason = 'VTKDIFF' output += differ.message() break # Return to the test harness return (reason, output)