Skip to content

Commit

Permalink
WIP: Working test for twif + twinr (TriBITSPub#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlettroscoe committed Feb 27, 2020
1 parent 33ec813 commit 237c1ba
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
23 changes: 22 additions & 1 deletion test/ci_support/cdash_analyze_and_report_UnitTests.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,28 @@ def test_twoif_10_twoinr2_twif_8_twinr_1(self):
# correct.

# Read the written file 'test_data.json' and verify that it is correct
raise Exception("ToDo: Implement this check!")
testDataLOD = eval(open(testOutputDir+"/test_data.json", 'r').read())
self.assertEqual(len(testDataLOD), 9)
# Make sure an entry from 'twif' exists!
testIdx = getIdxOfTestInTestLOD(testDataLOD, 'cee-rhel6',
'Trilinos-atdm-cee-rhel6-clang-opt-serial',
'MueLu_UnitTestsBlockedEpetra_MPI_1')
testDict = testDataLOD[testIdx]
self.assertEqual(testDict['site'], 'cee-rhel6')
self.assertEqual(testDict['buildName'], 'Trilinos-atdm-cee-rhel6-clang-opt-serial')
self.assertEqual(testDict['testname'], 'MueLu_UnitTestsBlockedEpetra_MPI_1')
self.assertEqual(testDict['test_history_list'][0]['buildstarttime'],
'2018-10-28T06:10:33 UTC')
# Make sure an entry from 'twinr' exists!
testIdx = getIdxOfTestInTestLOD(testDataLOD, 'cee-rhel6',
'Trilinos-atdm-cee-rhel6-clang-opt-serial',
'Teko_ModALPreconditioner_MPI_1')
testDict = testDataLOD[testIdx]
self.assertEqual(testDict['site'], 'cee-rhel6')
self.assertEqual(testDict['buildName'], 'Trilinos-atdm-cee-rhel6-clang-opt-serial')
self.assertEqual(testDict['testname'], 'Teko_ModALPreconditioner_MPI_1')
self.assertEqual(testDict['test_history_list'][0]['buildstarttime'],
'2018-10-28T06:10:33 UTC')


# Test with some duplicate tests from CDash query (this happens in real life
Expand Down
2 changes: 1 addition & 1 deletion tribits/ci_support/cdash_analyze_and_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ def testSetGetDataAnalyzeReport( self,

if inOptions.writeTestDataToFile:
testDataFileName = inOptions.writeTestDataToFile
print("\nWriting out gathered test dta to file "+testDataFileName+" ...")
print("\nWriting out gathered test data to file "+testDataFileName+" ...")
testDataLOD = twipLOD + twimLOD + twifLOD + twinrLOD
# ToDo: Add the first inOptions.limitTableRows elements of twiofLOD and twoinrLOD ...
CDQAR.pprintPythonDataToFile(testDataLOD, testDataFileName)
Expand Down

0 comments on commit 237c1ba

Please sign in to comment.