Beispiel #1
0
  def execute(self, *args, **kwargs):
    masterTbl = MasterTbl()
    target    = masterTbl['target']
    epoch     = masterTbl['origEpoch']
    prefix = ""

    if (target != "") :
      prefix = target + '-'

    uuid          = prefix + full_date_string(epoch) + '-' + masterTbl['os_mach']
    tst_report_fn = os.path.join(masterTbl['testReportDir'],
                                 uuid + masterTbl['testRptExt'])
    masterTbl['tstReportFn'] = tst_report_fn

    #--------------------------------------------------------
    #  Do not create a report when there are no tests to run

    if (not masterTbl['tstT']):
      return

    human_data = ''
    test_results = build_test_reportT(human_data, masterTbl)

    dir_name, fn = os.path.split(tst_report_fn)
    if (not os.path.exists(dir_name)):
      os.makedirs(dir_name)

    write_table(tst_report_fn, test_results)
Beispiel #2
0
  def setup_output_dir_names(self, epoch, target=""):
    masterTbl = MasterTbl()
    prefix = ''
    if (len(target) > 0):
      prefix = target + "-"

    uuid           = prefix + full_date_string(epoch) + '-' + masterTbl['os_mach']
    self.uuid      = uuid
    self.outputDir = os.path.join(self.parent_dir,uuid + '-' + self.testName)
    self.resultFn  = os.path.join(self.outputDir, self.idtag + ".result")
    self.runtimeFn = os.path.join(self.outputDir, self.idtag + ".runtime")
    self.versionFn = os.path.join(self.outputDir, 'version.lua')
    self.messageFn = os.path.join(self.outputDir, 'message.lua')
Beispiel #3
0
  def execute(self, *args, **kwargs):
    masterTbl                  = MasterTbl()
    version                    = Version()
    epoch                      = time.time()
    masterTbl['testreportLoc'] = 'testreports'
    masterTbl['testReportDir'] = os.path.join(masterTbl['projectDir'],
                                              masterTbl['testreportLoc'])
    masterTbl['testRptExt']    = '.rtm'
    masterTbl['descriptExt']   = '.desc'
    masterTbl['ThemisVersion'] = 'Themis ' + version.tag()
    masterTbl['currentEpoch']  = epoch
    masterTbl['origEpoch']     = masterTbl['currentEpoch']
    masterTbl['target']        = os.environ.get("TARG_SUMMARY") or ""
    masterTbl['errors']        = 0
    masterTbl['diffCount']     = 0
    masterTbl['failCount']     = 0
    masterTbl['resultMaxLen']  = 12
    masterTbl['minNP']         = 0
    masterTbl['maxNP']         = sys.maxsize

    #------------------------------------------------------------
    # Add projectDir to PYTHONPATH for user functions
    sys.path.append(masterTbl['projectDir'])
    unameT                     = get_platform()
    currentUUID = full_date_string(epoch) + "-" + unameT['os_mach']
    for k in unameT:
      masterTbl[k] = unameT[k]
    
    masterTbl['hostname'] = unameT['machine']
    #------------------------------------------------------------
    # Setup gauntlet
    masterTbl['gauntlet'] = Gauntlet(GauntletData())

    # masterTbl['gauntlet'] = None --> for later

    masterTbl['candidateTstT'] = {}
    masterTbl['tstT'] = {}
    masterTbl['rptT'] = {}