Skip to content

Commit c453421

Browse files
authored
Test runtime-report max_column_width option (LLNL#395)
1 parent aa80010 commit c453421

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

test/ci_app_tests/test_runtimereport.py

+27-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_runtime_report_default(self):
3434
self.fail('%s not found in log' % target)
3535

3636
def test_runtime_report_nompi(self):
37-
target_cmd = [ './ci_test_macros', '10', 'runtime-report,aggregate_across_ranks=false,output=stdout' ]
37+
target_cmd = [ './ci_test_macros', '10', 'runtime-report,aggregate_across_ranks=false,output=stdout,max_column_width=0' ]
3838

3939
caliper_config = {
4040
'CALI_LOG_VERBOSITY' : '0',
@@ -58,5 +58,31 @@ def test_runtime_report_nompi(self):
5858
else:
5959
self.fail('%s not found in log' % target)
6060

61+
def test_runtime_report_max_column_width(self):
62+
target_cmd = [ './ci_test_macros', '10', 'runtime-report,output=stdout,max_column_width=8' ]
63+
64+
caliper_config = {
65+
'CALI_LOG_VERBOSITY' : '0',
66+
}
67+
68+
log_targets = [
69+
'Path ',
70+
'main ',
71+
' ma~~op ',
72+
' foo ',
73+
' fo ',
74+
' .. ',
75+
]
76+
77+
report_out,_ = cat.run_test(target_cmd, caliper_config)
78+
lines = report_out.decode().splitlines()
79+
80+
for target in log_targets:
81+
for line in lines:
82+
if target in line:
83+
break
84+
else:
85+
self.fail('%s not found in log' % target)
86+
6187
if __name__ == "__main__":
6288
unittest.main()

0 commit comments

Comments
 (0)