当前位置: 首页>>代码示例>>Python>>正文


Python RunApp.processResults方法代码示例

本文整理汇总了Python中RunApp.RunApp.processResults方法的典型用法代码示例。如果您正苦于以下问题:Python RunApp.processResults方法的具体用法?Python RunApp.processResults怎么用?Python RunApp.processResults使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RunApp.RunApp的用法示例。


在下文中一共展示了RunApp.processResults方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: processResults

# 需要导入模块: from RunApp import RunApp [as 别名]
# 或者: from RunApp.RunApp import processResults [as 别名]
  def processResults(self, moose_dir, retcode, options, output):
    (reason, output) = RunApp.processResults(self, moose_dir, retcode, options, output)

    if reason != '' or self.specs['skip_checks']:
      return (reason, output)

    # Don't Run Exodiff on Scaled Tests
    if options.scaling and self.specs['scale_refine']:
      return (reason, output)

    # Make sure that all of the Exodiff files are actually available
    for file in self.specs['exodiff']:
      if not os.path.exists(os.path.join(self.specs['test_dir'], self.specs['gold_dir'], file)):
        output += "File Not Found: " + os.path.join(self.specs['test_dir'], self.specs['gold_dir'], file)
        reason = 'MISSING GOLD FILE'
        break

    if reason == '':
      # Retrieve the commands
      commands = self.processResultsCommand(moose_dir, options)

      for command in commands:
        exo_output = runCommand(command)

        output += 'Running exodiff: ' + command + '\n' + exo_output + ' ' + ' '.join(self.specs['exodiff_opts'])

        if ('different' in exo_output or 'ERROR' in exo_output) and not "Files are the same" in exo_output:
          reason = 'EXODIFF'
          break

    return (reason, output)
开发者ID:JasonTurner56,项目名称:ARL,代码行数:33,代码来源:Exodiff.py

示例2: processResults

# 需要导入模块: from RunApp import RunApp [as 别名]
# 或者: from RunApp.RunApp import processResults [as 别名]
  def processResults(self, moose_dir, retcode, options, output):
    (reason, output) = RunApp.processResults(self, moose_dir, retcode, options, output)

    specs = self.specs
    if reason != '' or specs['skip_checks']:
      return (reason, output)

    if reason == '':
     # if still no errors, check other files (just for existence)
     for file in self.specs['check_files']:
       if not os.path.isfile(os.path.join(self.specs['test_dir'], file)):
         reason = 'MISSING FILES'
         break
     for file in self.specs['check_not_exists']:
       if os.path.isfile(os.path.join(self.specs['test_dir'], file)):
         reason = 'UNEXPECTED FILES'
         break

     # if still no errors, check that all the files contain the file_expect_out expression
     if reason == '':
       if self.specs.isValid('file_expect_out'):
         for file in self.specs['check_files']:
           fid = open(os.path.join(self.specs['test_dir'], file), 'r')
           contents = fid.read()
           fid.close()
           if not self.checkOutputForPattern(contents, self.specs['file_expect_out']):
             reason = 'NO EXPECTED OUT IN FILE'
             break

    return (reason, output)
开发者ID:Jieun2,项目名称:moose,代码行数:32,代码来源:CheckFiles.py

示例3: processResults

# 需要导入模块: from RunApp import RunApp [as 别名]
# 或者: from RunApp.RunApp import processResults [as 别名]
  def processResults(self, moose_dir, retcode, options, output):
    (reason, output) = RunApp.processResults(self, moose_dir, retcode, options, output)

    if reason != '' or self.specs['skip_checks']:
      return (reason, output)

    # Don't Run Exodiff on Scaled Tests
    if options.scaling and self.specs['scale_refine']:
      return (reason, output)

    # Make sure that all of the Exodiff files are actually available
    for file in self.specs['txtdiff']:
      if not os.path.exists(os.path.join(self.specs['test_dir'], self.specs['gold_dir'], file)):
        output += "File Not Found: " + os.path.join(self.specs['test_dir'], self.specs['gold_dir'], file)
        reason = 'MISSING GOLD FILE'
        break

    # Run the txtdiff
    if reason == '':
      output += 'Running txtdiff'
      with open(os.path.join(self.specs['test_dir'], file), 'r') as f:
        first_line = f.readline()
      with open(os.path.join(self.specs['test_dir'], self.specs['gold_dir'], file), 'r') as f:
        first_line_gold = f.readline()
      if first_line != first_line_gold:
        reason = 'TXTDIFF'

    return (reason, output)
开发者ID:brianmoose,项目名称:redback,代码行数:30,代码来源:Txtdiff.py

示例4: processResults

# 需要导入模块: from RunApp import RunApp [as 别名]
# 或者: from RunApp.RunApp import processResults [as 别名]
 def processResults(self, moose_dir, retcode, options, output):
   if self.httpServer.getNumberOfPosts() != int(self.nPosts):
      return ("ICEUpdater FAILED: DID NOT GET CORRECT NUMBER OF POSTS",
              "Number of Posts was " + str(self.httpServer.getNumberOfPosts()) +
              ", but should have been " + str(self.nPosts))
   else:
      return RunApp.processResults(self, moose_dir, retcode, options, output)
开发者ID:cbolisetti,项目名称:moose,代码行数:9,代码来源:ICEUpdaterTester.py

示例5: processResults

# 需要导入模块: from RunApp import RunApp [as 别名]
# 或者: from RunApp.RunApp import processResults [as 别名]
  def processResults(self, moose_dir, retcode, options, output):
    (reason, output) = RunApp.processResults(self, moose_dir, retcode, options, output)

    specs = self.specs
    if reason != '' or specs['skip_checks']:
      return (reason, output)

    # Don't Run Exodiff on Scaled Tests
    if options.scaling and specs['scale_refine']:
      return (reason, output)

    for file in specs['exodiff']:
      custom_cmp = ''
      old_floor = ''
      if specs.isValid('custom_cmp'):
         custom_cmp = ' -f ' + os.path.join(specs['test_dir'], specs['custom_cmp'])
      if specs['use_old_floor']:
         old_floor = ' -use_old_floor'

      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
      else:
        command = os.path.join(moose_dir, 'framework', 'contrib', 'exodiff', 'exodiff') + ' -m' + custom_cmp + ' -F' + ' ' + str(specs['abs_zero']) + old_floor + ' -t ' + str(specs['rel_err']) \
            + ' ' + ' '.join(specs['exodiff_opts']) + ' ' + os.path.join(specs['test_dir'], specs['gold_dir'], file) + ' ' + os.path.join(specs['test_dir'], file)
        exo_output = runCommand(command)

        output += 'Running exodiff: ' + command + '\n' + exo_output + ' ' + ' '.join(specs['exodiff_opts'])

        if ('different' in exo_output or 'ERROR' in exo_output) and not "Files are the same" in exo_output:
          reason = 'EXODIFF'
          break

    return (reason, output)
开发者ID:DarinReid,项目名称:moose,代码行数:37,代码来源:Exodiff.py

示例6: processResults

# 需要导入模块: from RunApp import RunApp [as 别名]
# 或者: from RunApp.RunApp import processResults [as 别名]
    def processResults(self, moose_dir, retcode, options, output):
        (reason, output) = RunApp.processResults(self, moose_dir, retcode, options, output)

        specs = self.specs
        if reason != "" or specs["skip_checks"]:
            return (reason, output)

        if reason == "":
            # if still no errors, check other files (just for existence)
            for file in self.specs["check_files"]:
                if not os.path.isfile(os.path.join(self.specs["test_dir"], file)):
                    reason = "MISSING FILES"
                    break
            for file in self.specs["check_not_exists"]:
                if os.path.isfile(os.path.join(self.specs["test_dir"], file)):
                    reason = "UNEXPECTED FILES"
                    break

            # if still no errors, check that all the files contain the file_expect_out expression
            if reason == "":
                if self.specs.isValid("file_expect_out"):
                    for file in self.specs["check_files"]:
                        fid = open(os.path.join(self.specs["test_dir"], file), "r")
                        contents = fid.read()
                        fid.close()
                        if not self.checkOutputForPattern(contents, self.specs["file_expect_out"]):
                            reason = "NO EXPECTED OUT IN FILE"
                            break

        return (reason, output)
开发者ID:permcody,项目名称:moose,代码行数:32,代码来源:CheckFiles.py

示例7: processResults

# 需要导入模块: from RunApp import RunApp [as 别名]
# 或者: from RunApp.RunApp import processResults [as 别名]
  def processResults(self, moose_dir, retcode, options, output):
    reason = ''
    specs = self.specs

    # 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 self.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 self.checkOutputForPattern(output, specs['expect_assert']):
          reason = 'NO EXPECTED ASSERT'

    if reason == '':
      (reason, output) = RunApp.processResults(self, moose_dir, retcode, options, output)

    return (reason, output)
开发者ID:AhmedAly83,项目名称:moose,代码行数:20,代码来源:RunException.py

示例8: processResults

# 需要导入模块: from RunApp import RunApp [as 别名]
# 或者: from RunApp.RunApp import processResults [as 别名]
  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)
开发者ID:JasonTurner56,项目名称:ARL,代码行数:45,代码来源:VTKDiff.py

示例9: processResults

# 需要导入模块: from RunApp import RunApp [as 别名]
# 或者: from RunApp.RunApp import processResults [as 别名]
  def processResults(self, moose_dir, retcode, options, output):
    (reason, output) = RunApp.processResults(self, moose_dir, retcode, options, output)

    specs = self.specs
    if reason != '' or specs['skip_checks']:
      return (reason, output)

    # Don't Run CSVDiff on Scaled Tests
    if options.scaling and specs['scale_refine']:
      return (reason, output)

    if len(specs['csvdiff']) > 0:
      differ = CSVDiffer( specs['test_dir'], specs['csvdiff'], specs['abs_zero'], specs['rel_err'] )
      msg = differ.diff()
      output += 'Running CSVDiffer.py\n' + msg
      if msg != '':
        reason = 'CSVDIFF'

    return (reason, output)
开发者ID:Jieun2,项目名称:moose,代码行数:21,代码来源:CSVDiff.py

示例10: processResults

# 需要导入模块: from RunApp import RunApp [as 别名]
# 或者: from RunApp.RunApp import processResults [as 别名]
  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)
开发者ID:Jieun2,项目名称:moose,代码行数:38,代码来源:VTKDiff.py


注:本文中的RunApp.RunApp.processResults方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。