Skip to content

Commit

Permalink
Added function to test if a pair of sha1 is unstable test (TriBITSPub…
Browse files Browse the repository at this point in the history
…#600)

Add checkIfTestUnstable() that takes in a tuple of passing sha1s and a
set of tuples containing nonpassing sha1s. This requires testing.
  • Loading branch information
achauphan committed Jan 24, 2024
1 parent 55080cf commit c98cbdc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tribits/ci_support/cdash_analyze_and_report_random_failures.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,14 @@ def main():
buildSummaryQueryUrl = CDQAR.getCDashBuildSummaryQueryUrl(cdashSiteUrl, buildId)
buildConfigOutput = downloadBuildSummaryOffCDash(
buildSummaryQueryUrl, verbose=printUrlMode=='all')['configure']['output']
# Do sha1 comparison here...
passingSha1Pair = getTopicTargetSha1s(buildConfigOutput)

if checkIfTestUnstable(passingSha1Pair, nonpassingSha1Pairs):
print("\n Found passing sha1 pair, " + str(passingSha1Pair)+\
" in set of nonpassing sha1 pairs: \n"+str(nonpassingSha1Pairs))
# Set up list of unstable tests for email here?



print("\nNumber of failing tests from "+dateRangeStart+" to "+dateRangeEnd+": "
+str(len(nonpassingTestsLOD)))

Expand Down Expand Up @@ -201,7 +206,7 @@ def downloadBuildSummaryOffCDash(

# Check if passing test's SHA1 is in set of failed test SHA1s
def checkIfTestUnstable(passingSha1Pair, nonpassingSha1Pairs):
pass
return passingSha1Pair in nonpassingSha1Pairs

#
# Execute main if this is being run as a script
Expand Down

0 comments on commit c98cbdc

Please sign in to comment.