else:
    console = logging.StreamHandler(sys.stdout)
    formatter = logging.Formatter("%(asctime)s %(levelname)-7s %(message)s", "%H:%M:%S")
    console.setFormatter(formatter)
    console.setLevel(logging.NOTSET)
    rootlogger.addHandler(console)

  log.info("Detailed test results are in file %s", outfile)

  installdir = args[0]
  installdir = os.path.abspath(os.path.normpath(os.path.expanduser(installdir)))

  srcdir = args[1]
  srcdir = os.path.abspath(os.path.normpath(os.path.expanduser(srcdir)))

  utils.setupCleanEnvironment(installdir, shellCheck=shellCheck)

  (passed, failed, disabled)  = runTestsInSeparateDirectory(installdir, srcdir, 
                                         short=short, serial=serial,
                                         testlist=testlists,
                                         extratests=extratests,
                                         excludedtests=excludedtests, 
                                         nprocs=nprocs)



  if len(testlists) == 1 and len(extratests) == 0 and len(excludedtests) == 0:
    name = "%s testlist" % testlists[0]
  else:
    name = "testlists: %s  tests: %s  excluded: %s" % (testlists, extratests, excludedtests)
Пример #2
0
        formatter = logging.Formatter(
            "%(asctime)s %(levelname)-7s %(message)s", "%H:%M:%S")
        console.setFormatter(formatter)
        console.setLevel(logging.NOTSET)
        rootlogger.addHandler(console)

    log.info("Detailed test results are in file %s", outfile)

    installdir = args[0]
    installdir = os.path.abspath(
        os.path.normpath(os.path.expanduser(installdir)))

    srcdir = args[1]
    srcdir = os.path.abspath(os.path.normpath(os.path.expanduser(srcdir)))

    utils.setupCleanEnvironment(installdir, shellCheck=shellCheck)

    (passed, failed,
     disabled) = runTestsInSeparateDirectory(installdir,
                                             srcdir,
                                             short=short,
                                             serial=serial,
                                             testlist=testlists,
                                             extratests=extratests,
                                             excludedtests=excludedtests,
                                             nprocs=nprocs)

    if len(testlists) == 1 and len(extratests) == 0 and len(
            excludedtests) == 0:
        name = "%s testlist" % testlists[0]
    else:
Пример #3
0
  testdir = utils.extractArchive(tarball, srcTestDir)
  log.info("Testing customer release %s in directory %s" % (releaseType, testdir))
  if releaseType != "binary":
    try:
      print releaseType
      print srcDir
      print releaseTarball
      print binaryTarball
      print testdir
      buildCustomerRelease(releaseType,  srcDir, releaseTarball, binaryTarball, testdir)
    except Exception, e:
      log.error("Source release failed: %s", e)
      # note: leaves temp directory intact
      return(list(), ["build source release"], list())

  utils.setupCleanEnvironment(testdir)
  (passed, failed, disabled) = test.runTests(testdir, srcDir,  short=short, testlist=testlist, nprocs=nprocs)

  return (passed, failed, disabled, testdir)


def buildCustomerRelease(releaseType, releaseSpecDir, releaseTarball, binaryTarball, prefix=None, nprocs=1,parentTmpDir=None):
    """From the given source release tarball, compile and verify that the 
    build product is correct.
    @param releaseType -- one of the source release types
    @param releaseSpecDir -- trunk/release directory containing manifest files for this release
    @param releaseTarball -- tarball containing the release to be built. 
    @param binaryTarball -- tarball containing the binary release. This must be provided
        when building the tools source release, which requires prebuilt libraries that 
        only exist in the binary release. These libraries are copied in to the source 
        release tree prior to building the source release.