Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IssueTrackerTestsStatusReporter and related refactorings (trilinos./Trilinos#3887) #322

Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1f69584
Rename testSetXXX to testsetsXXX (trilinos/Trilinos#3887)
bartlettroscoe May 29, 2020
9d6bd1b
Get daysOfHistory from test data (trilinos/Trilinos#3887)
bartlettroscoe May 29, 2020
157e133
Create and use getDefaultTestsSortOrder() (trilinos/Trilinos#3887)
bartlettroscoe May 29, 2020
75edcf2
Factor out function createOverallSummaryLine() (trilinos/Trilinos#3887)
bartlettroscoe May 29, 2020
96c2c34
Create and use TestsetInfo class (trilinos/Trilinos#3887)
bartlettroscoe May 30, 2020
0157fb5
Extract class AddTestHistoryStrategy and rename TestsetGetDataAnayzeR…
bartlettroscoe May 30, 2020
6c9bb37
Move class TestsetReporter (trilinos/Trilinos#3887)
bartlettroscoe May 30, 2020
5b73d07
Move and rename OverallVars to CDashReportData (trilinos/Trilinos#3887)
bartlettroscoe May 31, 2020
3b4fd85
Rename NumRows to NumCols (ATDV-216)
bartlettroscoe May 31, 2020
26e7c33
Rename testSortOrder to testDictsSortKeyList (trilinos/Trilinos#3887)
bartlettroscoe May 31, 2020
1b87f2b
Factor out getCDashTestHtmlTableConsecColData(), some formatting (tri…
bartlettroscoe May 31, 2020
d172969
Add some comments, standardize formatting some (trilinos/Trilinos#3887)
bartlettroscoe May 31, 2020
db1b040
Add binTestDictsByIssueTracker() (trilinos/Trilinos#3887)
bartlettroscoe Jun 1, 2020
56c3568
Add getTestsetAcroFromTestDict() and isTestMissing() (trilinos/Trili…
bartlettroscoe Jun 2, 2020
cdb58e7
Factor out HTML code to generate full HTML page out of parts (trilino…
bartlettroscoe Jun 2, 2020
1990c29
Add binTestDictsByTestsetAcro() (trilinos/Trilinos#3887)
bartlettroscoe Jun 2, 2020
e2fde06
Change name to SingleTestsetReporter (trilinos/Trilinos#3887)
bartlettroscoe Jun 2, 2020
d746f25
Add TestsetsReporter (trilinos/Trilinos#3887)
bartlettroscoe Jun 2, 2020
2a3dc6e
Fill in TestsetsReporter.getTestsHtmlReportStr() (trilinos/Trilinos#3…
bartlettroscoe Jun 2, 2020
0eead79
Allow htmlSytle to be set to empty, fix paragrapgh (trilinos/Trilinos…
bartlettroscoe Jun 2, 2020
2d1e4fa
Compete TestsetsReporter.getTestsHtmlReportStr() (trilinos/Trilinos#3…
bartlettroscoe Jun 2, 2020
243d585
Add class IssueTrackerTestsStatusReporter (trilinos/Trilinos#3887)
bartlettroscoe Jun 4, 2020
fb34468
Add <details> block for IssueTrackerTestsStatusReporter (trilinos/Tri…
bartlettroscoe Jun 6, 2020
8620f53
Rename test 'test_twip_twim' to 'test_bm_1_twoif_12_twip_2_twim_2_twi…
bartlettroscoe Jun 6, 2020
a4e6d35
Add 'test_twip_2_twim_2' that 'FAILED' and make it say 'PASSED'
bartlettroscoe Jun 6, 2020
7afe4f2
Change name of 'TestsetInfo' to 'TestsetTypeInfo' (trilinos/Trilinos#…
bartlettroscoe Jun 7, 2020
c4f121a
Remove tests for class TestsetsReporter (trilinos/Trilinos#3887)
bartlettroscoe Jun 7, 2020
8d285d5
Implement review feedback (trilinos/Trilinos#3887)
bartlettroscoe Jun 8, 2020
d7da7e2
Remove some unused HTML vars and minor whitespace tweak (trilinos/Tri…
bartlettroscoe Jun 8, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions test/ci_support/CDashQueryAnalyzeReportUnitTestHelpers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@

################################################################################
#
# Unit testing helpers for CDashQueryAnalyzeReport code
#
################################################################################

import re

# Find the index of a test in a list of test dicts
def getIdxOfTestInTestLOD(testsLOD, site, buildName, testname):
testIdx = 0
for testsDict in testsLOD:
if testsDict['site'] == site \
and testsDict['buildName'] == buildName \
and testsDict['testname'] == testname \
:
#print(testsDict)
break
testIdx = testIdx+1
return testIdx


# Search for a list of strings in a single long string
def assertFindListOfStringsInString(
testObj,
stringListToFind,
stringToSearch,
stringToSearchVarName,
debugPrint=False,
):
for stringToFind in stringListToFind:
foundString = True
if stringToSearch.find(stringToFind) == -1:
foundString = False
if debugPrint:
print(stringToSearchVarName+" = "+str(stringToSearch))
testObj.assertTrue(foundString,
"Error, could not find string '"+stringToFind+"' in '"+stringToSearchVarName+"'!")


# Search for a string in a list of stirngs
def assertFindStringInListOfStrings(
testObj,
stringToFind,
stringsList,
stringsListName,
):
foundStringToFind = False
for stdoutLine in stringsList:
if stdoutLine.find(stringToFind) != -1:
foundStringToFind = True
break
testObj.assertTrue(foundStringToFind,
"Error, could not find string '"+stringToFind+"' in "+stringsListName+"!")


# Search for a list of regexs in order in a list of strings
def assertListOfRegexsFoundInLinstOfStrs(
testObj,
regexList,
stringsList,
stringsListName,
debugPrint=False,
):
# Set up for first regex
current_regex_idx = 0
currentRe = re.compile(regexList[current_regex_idx])
# Loop over the lines in the input strings list and look for the regexes in
# order!
strLine_idx = -1
for strLine in stringsList:
strLine_idx += 1
if current_regex_idx == len(regexList):
# Found all the regexes so we are done!
break
if debugPrint:
print("\nstrLine_idx = '"+str(strLine_idx)+"'")
print("strLine = '"+strLine+"'")
print("regexList["+str(current_regex_idx)+"] = '"+regexList[current_regex_idx]+"'")
if currentRe.match(strLine):
# Found the current regex being looked for!
if debugPrint:
print("Found match!")
current_regex_idx += 1
if current_regex_idx < len(regexList):
if debugPrint:
print("regexList["+str(current_regex_idx)+"] = '"+regexList[current_regex_idx]+"'")
currentRe = re.compile(regexList[current_regex_idx])
continue
# Look to see if you have found all of the regexes being searched for. If
# the current one has not been found, then report that you could not find
# it!
if current_regex_idx < len(regexList):
testObj.assertTrue(False,
"Error, could not find the regex '"+regexList[current_regex_idx]+"'"+\
" in "+stringsListName+"!")
Loading