-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #603 from TriBITSPub/600-cdash-random-failure-tool
CDash Report random test failure tool (#600)
- Loading branch information
Showing
26 changed files
with
2,657 additions
and
0 deletions.
There are no files selected for viewing
71 changes: 71 additions & 0 deletions
71
test/ci_support/CDashAnalyzeReportRandomFailures_UnitTests.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import unittest | ||
from unittest.mock import patch | ||
import unittest.mock as mock | ||
import datetime | ||
|
||
|
||
from FindCISupportDir import * | ||
import CDashAnalyzeReportRandomFailures as CDARRF | ||
from example_cdash_analyze_and_report_random_failures import ExampleVersionInfoStrategy, ExampleExtractBuildNameStrategy | ||
|
||
|
||
#################################################################### | ||
# | ||
# Test CDashAnalyzeReportRandomFailuresDriver | ||
# | ||
#################################################################### | ||
|
||
def getDriver(): | ||
return CDARRF.CDashAnalyzeReportRandomFailuresDriver( | ||
ExampleVersionInfoStrategy(), | ||
ExampleExtractBuildNameStrategy()) | ||
|
||
# | ||
# Test getDateRangeTuple member function | ||
# for how it constructs a tuple containing | ||
# the begin and end of a date range. | ||
# | ||
class Test_GetDateRangeTuple(unittest.TestCase): | ||
|
||
def setUp(self): | ||
self.driver = getDriver() | ||
|
||
def test_date_range_tuple(self): | ||
referenceDateTime = datetime.datetime(year=2024, month=2, day=12) | ||
dayTimeDelta = 3 | ||
expected = ('2024-02-10', '2024-02-12') | ||
|
||
sideEffectList = ['2024-02-10', '2024-02-12'] | ||
with mock.patch('cdash_build_testing_date.getDateStrFromDateTime', side_effect=sideEffectList) as m_getDateStrFromDateTime: | ||
result = self.driver.getDateRangeTuple(referenceDateTime, dayTimeDelta) | ||
|
||
self.assertEqual(result, expected) | ||
|
||
|
||
# | ||
# Test getBuildIDFromTest() member function | ||
# to check if it can get correctly get the last value of | ||
# a slash delimited string | ||
# | ||
class Test_GetBuildIdFromTest(unittest.TestCase): | ||
|
||
def setUp(self): | ||
self.driver = getDriver() | ||
|
||
def test_single_slash(self): | ||
testDict = {'buildSummaryLink':'build/somenumber'} | ||
self.assertEqual( | ||
self.driver.getBuildIdFromTest(testDict), 'somenumber') | ||
|
||
def test_multiple_slash(self): | ||
testDict = {'buildSummaryLink':'build/two/somenumber'} | ||
self.assertEqual( | ||
self.driver.getBuildIdFromTest(testDict), 'somenumber') | ||
|
||
def test_no_slash(self): | ||
testDict = {'buildSummaryLink':'somenumber'} | ||
self.assertEqual( | ||
self.driver.getBuildIdFromTest(testDict), 'somenumber') | ||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
...random_failures/rft_0_ift_2/test_queries_cache/build_summary_cache/testname1_buildname1/1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
{ 'bugtracker': 'GitHub', | ||
'build': { 'command': 'build command', | ||
'compilername': '', | ||
'compilerversion': '', | ||
'endtime': '2023-12-20T16:59:05 MST', | ||
'error': 0, | ||
'errors': [], | ||
'generator': 'ctest-3.24.3', | ||
'id': 1323424, | ||
'lastsubmitbuild': 0, | ||
'lastsubmitdate': 0, | ||
'name': 'PR-12620-test-rhel7_sems-gnu-8.3.0-openmpi-1.10.1-serial_debug_shared_no-kokkos-arch_no-asan_no-complex_no-fpic_mpi_no-pt_no-rdc_no-uvm_deprecated-on_no-package-enables-1957', | ||
'nerrors': 0, | ||
'note': 0, | ||
'nwarnings': 0, | ||
'osname': 'Linux', | ||
'osplatform': 'x86_64', | ||
'osrelease': '3.10.0-1062.1.2.el7.x86_64', | ||
'osversion': '#1 SMP Mon Sep 16 14:19:51 EDT 2019', | ||
'site': 'site1', | ||
'siteid': 49, | ||
'sitename_encoded': 'site1', | ||
'stamp': '20231220-2248-Pull Request', | ||
'starttime': '2023-12-20T15:48:14 MST', | ||
'time': '2023-12-20T15:48:14 MST', | ||
'type': 'Pull Request', | ||
'warnings': []}, | ||
'configure': { 'command': 'configure command here', | ||
'endtime': '2023-12-20T15:50:06 MST', | ||
'nerrors': 0, | ||
'nwarnings': 0, | ||
'output': 'loading initial cache file \n' | ||
'Trilinos repos versions:\n' | ||
'--------------------------------------------------------------------------------\n' | ||
'*** Base Git Repo: Trilinos\n' | ||
'dc6cb45 [Thu Dec 21 07:49:49 2023 -0700] ' | ||
'<[email protected]>\n' | ||
'Merge commit ' | ||
"'71d07d7370583c071c3e0fa98cb00b4794be6cb2' into " | ||
'develop\n' | ||
' *** Parent 1:\n' | ||
' bs1_p1 [Mon Jan 15 22:26:29 2024 -0700] <[email protected]>\n' | ||
' Cleaned up git log and cmake command argument formatting (#597)\n' | ||
' *** Parent 2:\n' | ||
' bs1_p2 [Wed Jan 17 12:33:03 2024 -0700] <[email protected]>\n' | ||
' Cleaned up empty lines (#597)\n' | ||
' ' | ||
'--------------------------------------------------------------------------------\n' | ||
'\n' | ||
'\n', | ||
'starttime': '2023-12-20T15:48:14 MST', | ||
'status': 0}, | ||
'currentdate': '2024-01-23', | ||
'date': '2023-12-20', | ||
'datetime': 'Tuesday, January 23 2024 16:00:15', | ||
'documentation': 'https://trilinos.github.io/documentation.html', | ||
'generationtime': 0.05, | ||
'googletracker': '', | ||
'hasconfigure': True, | ||
'hascoverage': False, | ||
'hasrelationships': False, | ||
'hasupdate': True, | ||
'home': 'https://trilinos.github.io/', | ||
'logoid': 1, | ||
'menu': { 'back': 'index.php?project=Trilinos&parentid=1323325', | ||
'current': '/build/0', | ||
'next': False, | ||
'previous': False}, | ||
'newissueurl': False, | ||
'nextdate': '2023-12-21', | ||
'nightlytime': '22:00 MST', | ||
'notes': [], | ||
'previousdate': '2023-12-19', | ||
'projectid': 1, | ||
'projectname': 'Trilinos', | ||
'projectname_encoded': 'Trilinos', | ||
'public': 1, | ||
'relationships_from': [], | ||
'relationships_to': [], | ||
'startdate': 'Tuesday, December 19 2023 22:00:00', | ||
'test': { 'nerrors': 0, | ||
'nfailed': 0, | ||
'nnotrun': 0, | ||
'npassed': 178, | ||
'nwarnings': 0}, | ||
'title': 'CDash : Trilinos', | ||
'unixtimestamp': 1703048400, | ||
'update': { 'command': '', | ||
'endtime': '2023-12-20T15:48:14 MST', | ||
'nerrors': 0, | ||
'nupdates': 0, | ||
'nwarnings': 0, | ||
'starttime': '2023-12-20T15:48:14 MST', | ||
'type': 'GIT'}, | ||
'user': {'id': None}, | ||
'vcs': 'https://github.com/trilinos/Trilinos/', | ||
'version': 'v3.1.0'} |
97 changes: 97 additions & 0 deletions
97
...random_failures/rft_0_ift_2/test_queries_cache/build_summary_cache/testname1_buildname1/2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
{ 'bugtracker': 'GitHub', | ||
'build': { 'command': 'build command', | ||
'compilername': '', | ||
'compilerversion': '', | ||
'endtime': '2023-12-20T16:59:05 MST', | ||
'error': 0, | ||
'errors': [], | ||
'generator': 'ctest-3.24.3', | ||
'id': 1323424, | ||
'lastsubmitbuild': 0, | ||
'lastsubmitdate': 0, | ||
'name': 'PR-12620-test-rhel7_sems-gnu-8.3.0-openmpi-1.10.1-serial_debug_shared_no-kokkos-arch_no-asan_no-complex_no-fpic_mpi_no-pt_no-rdc_no-uvm_deprecated-on_no-package-enables-1957', | ||
'nerrors': 0, | ||
'note': 0, | ||
'nwarnings': 0, | ||
'osname': 'Linux', | ||
'osplatform': 'x86_64', | ||
'osrelease': '3.10.0-1062.1.2.el7.x86_64', | ||
'osversion': '#1 SMP Mon Sep 16 14:19:51 EDT 2019', | ||
'site': 'site1', | ||
'siteid': 49, | ||
'sitename_encoded': 'site1', | ||
'stamp': '20231220-2248-Pull Request', | ||
'starttime': '2023-12-20T15:48:14 MST', | ||
'time': '2023-12-20T15:48:14 MST', | ||
'type': 'Pull Request', | ||
'warnings': []}, | ||
'configure': { 'command': 'configure command here', | ||
'endtime': '2023-12-20T15:50:06 MST', | ||
'nerrors': 0, | ||
'nwarnings': 0, | ||
'output': 'loading initial cache file \n' | ||
'Trilinos repos versions:\n' | ||
'--------------------------------------------------------------------------------\n' | ||
'*** Base Git Repo: Trilinos\n' | ||
'dc6cb45 [Thu Dec 21 07:49:49 2023 -0700] ' | ||
'<[email protected]>\n' | ||
'Merge commit ' | ||
"'71d07d7370583c071c3e0fa98cb00b4794be6cb2' into " | ||
'develop\n' | ||
' *** Parent 1:\n' | ||
' bs2_p1 [Mon Jan 15 22:26:29 2024 -0700] <[email protected]>\n' | ||
' Cleaned up git log and cmake command argument formatting (#597)\n' | ||
' *** Parent 2:\n' | ||
' bs2_p2 [Wed Jan 17 12:33:03 2024 -0700] <[email protected]>\n' | ||
' Cleaned up empty lines (#597)\n' | ||
' ' | ||
'--------------------------------------------------------------------------------\n' | ||
'\n' | ||
'\n', | ||
'starttime': '2023-12-20T15:48:14 MST', | ||
'status': 0}, | ||
'currentdate': '2024-01-23', | ||
'date': '2023-12-20', | ||
'datetime': 'Tuesday, January 23 2024 16:00:15', | ||
'documentation': 'https://trilinos.github.io/documentation.html', | ||
'generationtime': 0.05, | ||
'googletracker': '', | ||
'hasconfigure': True, | ||
'hascoverage': False, | ||
'hasrelationships': False, | ||
'hasupdate': True, | ||
'home': 'https://trilinos.github.io/', | ||
'logoid': 1, | ||
'menu': { 'back': 'index.php?project=Trilinos&parentid=1323325', | ||
'current': '/build/0', | ||
'next': False, | ||
'previous': False}, | ||
'newissueurl': False, | ||
'nextdate': '2023-12-21', | ||
'nightlytime': '22:00 MST', | ||
'notes': [], | ||
'previousdate': '2023-12-19', | ||
'projectid': 1, | ||
'projectname': 'Trilinos', | ||
'projectname_encoded': 'Trilinos', | ||
'public': 1, | ||
'relationships_from': [], | ||
'relationships_to': [], | ||
'startdate': 'Tuesday, December 19 2023 22:00:00', | ||
'test': { 'nerrors': 0, | ||
'nfailed': 0, | ||
'nnotrun': 0, | ||
'npassed': 178, | ||
'nwarnings': 0}, | ||
'title': 'CDash : Trilinos', | ||
'unixtimestamp': 1703048400, | ||
'update': { 'command': '', | ||
'endtime': '2023-12-20T15:48:14 MST', | ||
'nerrors': 0, | ||
'nupdates': 0, | ||
'nwarnings': 0, | ||
'starttime': '2023-12-20T15:48:14 MST', | ||
'type': 'GIT'}, | ||
'user': {'id': None}, | ||
'vcs': 'https://github.com/trilinos/Trilinos/', | ||
'version': 'v3.1.0'} |
Oops, something went wrong.