Exemple #1
0
 def downloadNonpassingTestsData(self):
     apiQueryTestsUrl = self.options.nonpassingTestsUrl.replace(
         "/queryTests.php", "/api/v1/queryTests.php")
     cdashDownloadFileForTesting = \
       os.environ.get('CREATE_ISSUE_TRACKER_FROM_CDASH_QUERY_FILE_FOR_UNIT_TESTING',
       '' )
     nonpassingTestsLOD = \
        CDQAR.downloadTestsOffCDashQueryTestsAndFlatten(apiQueryTestsUrl,
          fullCDashQueryTestsJsonCacheFile=cdashDownloadFileForTesting,
          alwaysUseCacheFileIfExists=True )
     return nonpassingTestsLOD
            inOptions.cdashNonpassedTestsFilters)

        print("\nGetting list of nonpassing tests from CDash ...\n")

        print("\nCDash nonpassing tests browser URL:\n\n"+\
          "  "+cdashNonpassingTestsBrowserUrl+"\n")

        cdashNonpassingTestsQueryUrl = CDQAR.getCDashQueryTestsQueryUrl(
            inOptions.cdashSiteUrl, inOptions.cdashProjectName, inOptions.date,
            inOptions.cdashNonpassedTestsFilters)

        cdashNonpassingTestsQueryJsonCacheFile = \
          cacheDirAndBaseFilePrefix+"fullCDashNonpassingTests.json"

        nonpassingTestsLOD = CDQAR.downloadTestsOffCDashQueryTestsAndFlatten(
            cdashNonpassingTestsQueryUrl,
            cdashNonpassingTestsQueryJsonCacheFile,
            inOptions.useCachedCDashData)
        print("\nNum nonpassing tests direct from CDash query = "+\
          str(len(nonpassingTestsLOD)))

        # HTML line "Nonpassing Tests on CDash"
        overallVars.htmlEmailBodyTop += \
         "<a href=\""+cdashNonpassingTestsBrowserUrl+"\">"+\
         "Non-passing Tests on CDash</a> (num="+str(len(nonpassingTestsLOD))+")<br>\n"

        # End of full build and test link paragraph and start the next paragraph
        # for the summary of failures and other tables
        overallVars.htmlEmailBodyTop += \
          "</p>\n\n"+\
          "<p>\n"
      inOptions.cdashNonpassedTestsFilters)

    print("\nGetting list of nonpassing tests from CDash ...\n")

    print("\nCDash nonpassing tests browser URL:\n\n"+\
      "  "+cdashNonpassingTestsBrowserUrl+"\n")

    cdashNonpassingTestsQueryUrl = CDQAR.getCDashQueryTestsQueryUrl(
      inOptions.cdashSiteUrl, inOptions.cdashProjectName, inOptions.date,
      inOptions.cdashNonpassedTestsFilters)

    cdashNonpassingTestsQueryJsonCacheFile = \
      cacheDirAndBaseFilePrefix+"fullCDashNonpassingTests.json"

    nonpassingTestsLOD = CDQAR.downloadTestsOffCDashQueryTestsAndFlatten(
      cdashNonpassingTestsQueryUrl, cdashNonpassingTestsQueryJsonCacheFile,
      inOptions.useCachedCDashData )
    print("\nNum nonpassing tests direct from CDash query = "+\
      str(len(nonpassingTestsLOD)))
  
    # HTML line "Nonpassing Tests on CDash"
    overallVars.htmlEmailBodyTop += \
     "<a href=\""+cdashNonpassingTestsBrowserUrl+"\">"+\
     "Non-passing Tests on CDash</a> (num="+str(len(nonpassingTestsLOD))+")<br>\n"
  
    # End of full build and test link paragraph and start the next paragraph
    # for the summary of failures and other tables
    overallVars.htmlEmailBodyTop += \
      "</p>\n\n"+\
      "<p>\n"