Skip to content

Commit 0c62d00

Browse files
committed
Address review comments
- Rename some variables and arguments - Use number padding
1 parent 177c1fe commit 0c62d00

File tree

5 files changed

+59
-57
lines changed

5 files changed

+59
-57
lines changed

docs/advanced.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -647,15 +647,15 @@ Here is the output when running the OSU tests with the asynchronous execution po
647647
[----------] finished processing OSUAllreduceTest_16 (OSU Allreduce test)
648648
649649
[----------] waiting for spawned checks to finish
650-
[ OK ] (1/21) OSUBuildTest on daint:gpu using PrgEnv-pgi
651-
[ OK ] (2/21) OSUBuildTest on daint:gpu using PrgEnv-gnu
652-
[ OK ] (3/21) OSUBuildTest on daint:gpu using PrgEnv-intel
653-
[ OK ] (4/21) OSUAllreduceTest_2 on daint:gpu using PrgEnv-pgi
654-
[ OK ] (5/21) OSUAllreduceTest_4 on daint:gpu using PrgEnv-pgi
655-
[ OK ] (6/21) OSUAllreduceTest_8 on daint:gpu using PrgEnv-pgi
656-
[ OK ] (7/21) OSUAllreduceTest_16 on daint:gpu using PrgEnv-pgi
657-
[ OK ] (8/21) OSUAllreduceTest_4 on daint:gpu using PrgEnv-gnu
658-
[ OK ] (9/21) OSUAllreduceTest_16 on daint:gpu using PrgEnv-gnu
650+
[ OK ] ( 1/21) OSUBuildTest on daint:gpu using PrgEnv-pgi
651+
[ OK ] ( 2/21) OSUBuildTest on daint:gpu using PrgEnv-gnu
652+
[ OK ] ( 3/21) OSUBuildTest on daint:gpu using PrgEnv-intel
653+
[ OK ] ( 4/21) OSUAllreduceTest_2 on daint:gpu using PrgEnv-pgi
654+
[ OK ] ( 5/21) OSUAllreduceTest_4 on daint:gpu using PrgEnv-pgi
655+
[ OK ] ( 6/21) OSUAllreduceTest_8 on daint:gpu using PrgEnv-pgi
656+
[ OK ] ( 7/21) OSUAllreduceTest_16 on daint:gpu using PrgEnv-pgi
657+
[ OK ] ( 8/21) OSUAllreduceTest_4 on daint:gpu using PrgEnv-gnu
658+
[ OK ] ( 9/21) OSUAllreduceTest_16 on daint:gpu using PrgEnv-gnu
659659
[ OK ] (10/21) OSUAllreduceTest_8 on daint:gpu using PrgEnv-gnu
660660
[ OK ] (11/21) OSUAllreduceTest_16 on daint:gpu using PrgEnv-intel
661661
[ OK ] (12/21) OSULatencyTest on daint:gpu using PrgEnv-pgi

docs/running.rst

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -262,15 +262,15 @@ The output of the regression run looks like the following:
262262
[----------] finished processing Example1Test (Simple matrix-vector multiplication example)
263263
264264
[----------] waiting for spawned checks to finish
265-
[ OK ] (1/12) Example1Test on daint:login using PrgEnv-intel
266-
[ OK ] (2/12) Example1Test on daint:login using PrgEnv-cray
267-
[ OK ] (3/12) Example1Test on daint:login using PrgEnv-gnu
268-
[ OK ] (4/12) Example1Test on daint:login using PrgEnv-pgi
269-
[ OK ] (5/12) Example1Test on daint:mc using PrgEnv-gnu
270-
[ OK ] (6/12) Example1Test on daint:mc using PrgEnv-pgi
271-
[ OK ] (7/12) Example1Test on daint:mc using PrgEnv-cray
272-
[ OK ] (8/12) Example1Test on daint:mc using PrgEnv-intel
273-
[ OK ] (9/12) Example1Test on daint:gpu using PrgEnv-intel
265+
[ OK ] ( 1/12) Example1Test on daint:login using PrgEnv-intel
266+
[ OK ] ( 2/12) Example1Test on daint:login using PrgEnv-cray
267+
[ OK ] ( 3/12) Example1Test on daint:login using PrgEnv-gnu
268+
[ OK ] ( 4/12) Example1Test on daint:login using PrgEnv-pgi
269+
[ OK ] ( 5/12) Example1Test on daint:mc using PrgEnv-gnu
270+
[ OK ] ( 6/12) Example1Test on daint:mc using PrgEnv-pgi
271+
[ OK ] ( 7/12) Example1Test on daint:mc using PrgEnv-cray
272+
[ OK ] ( 8/12) Example1Test on daint:mc using PrgEnv-intel
273+
[ OK ] ( 9/12) Example1Test on daint:gpu using PrgEnv-intel
274274
[ OK ] (10/12) Example1Test on daint:gpu using PrgEnv-cray
275275
[ OK ] (11/12) Example1Test on daint:gpu using PrgEnv-gnu
276276
[ OK ] (12/12) Example1Test on daint:gpu using PrgEnv-pgi
@@ -1132,29 +1132,29 @@ Here is an example output of ReFrame using asynchronous execution policy:
11321132
[----------] finished processing Example2aTest (Matrix-vector multiplication example with OpenMP)
11331133
<output omitted>
11341134
[----------] waiting for spawned checks to finish
1135-
[ OK ] (1/101) Example1Test on daint:login using PrgEnv-pgi
1136-
[ OK ] (2/101) Example1Test on daint:login using PrgEnv-gnu
1137-
[ OK ] (3/101) OpenMPTest on daint:login using PrgEnv-pgi
1138-
[ OK ] (4/101) SerialTest on daint:mc using PrgEnv-gnu
1139-
[ OK ] (5/101) Example6Test on daint:mc using PrgEnv-gnu
1140-
[ OK ] (6/101) Example1Test on daint:login using PrgEnv-cray
1135+
[ OK ] ( 1/101) Example1Test on daint:login using PrgEnv-pgi
1136+
[ OK ] ( 2/101) Example1Test on daint:login using PrgEnv-gnu
1137+
[ OK ] ( 3/101) OpenMPTest on daint:login using PrgEnv-pgi
1138+
[ OK ] ( 4/101) SerialTest on daint:mc using PrgEnv-gnu
1139+
[ OK ] ( 5/101) Example6Test on daint:mc using PrgEnv-gnu
1140+
[ OK ] ( 6/101) Example1Test on daint:login using PrgEnv-cray
11411141
<output omitted>
1142-
[ OK ] (84/101) SerialTest on daint:gpu using PrgEnv-cray
1143-
[ OK ] (85/101) MPITest on daint:gpu using PrgEnv-gnu
1144-
[ OK ] (86/101) OpenMPTest on daint:gpu using PrgEnv-pgi
1145-
[ OK ] (87/101) OpenMPTest on daint:gpu using PrgEnv-gnu
1146-
[ OK ] (88/101) MPITest on daint:gpu using PrgEnv-cray
1147-
[ OK ] (89/101) OpenMPTest on daint:gpu using PrgEnv-cray
1148-
[ OK ] (90/101) OpenMPTest on daint:gpu using PrgEnv-intel
1149-
[ OK ] (91/101) MPITest on daint:gpu using PrgEnv-intel
1150-
[ OK ] (92/101) OpenACCTest on daint:gpu using PrgEnv-pgi
1151-
[ OK ] (93/101) Example1Test on daint:gpu using PrgEnv-cray
1152-
[ OK ] (94/101) CudaTest on daint:gpu using PrgEnv-gnu
1153-
[ OK ] (95/101) MPITest on daint:gpu using PrgEnv-pgi
1154-
[ OK ] (96/101) CudaTest on daint:gpu using PrgEnv-pgi
1155-
[ OK ] (97/101) Example1Test on daint:gpu using PrgEnv-intel
1156-
[ OK ] (98/101) CudaTest on daint:gpu using PrgEnv-cray
1157-
[ OK ] (99/101) Example1Test on daint:gpu using PrgEnv-pgi
1142+
[ OK ] ( 84/101) SerialTest on daint:gpu using PrgEnv-cray
1143+
[ OK ] ( 85/101) MPITest on daint:gpu using PrgEnv-gnu
1144+
[ OK ] ( 86/101) OpenMPTest on daint:gpu using PrgEnv-pgi
1145+
[ OK ] ( 87/101) OpenMPTest on daint:gpu using PrgEnv-gnu
1146+
[ OK ] ( 88/101) MPITest on daint:gpu using PrgEnv-cray
1147+
[ OK ] ( 89/101) OpenMPTest on daint:gpu using PrgEnv-cray
1148+
[ OK ] ( 90/101) OpenMPTest on daint:gpu using PrgEnv-intel
1149+
[ OK ] ( 91/101) MPITest on daint:gpu using PrgEnv-intel
1150+
[ OK ] ( 92/101) OpenACCTest on daint:gpu using PrgEnv-pgi
1151+
[ OK ] ( 93/101) Example1Test on daint:gpu using PrgEnv-cray
1152+
[ OK ] ( 94/101) CudaTest on daint:gpu using PrgEnv-gnu
1153+
[ OK ] ( 95/101) MPITest on daint:gpu using PrgEnv-pgi
1154+
[ OK ] ( 96/101) CudaTest on daint:gpu using PrgEnv-pgi
1155+
[ OK ] ( 97/101) Example1Test on daint:gpu using PrgEnv-intel
1156+
[ OK ] ( 98/101) CudaTest on daint:gpu using PrgEnv-cray
1157+
[ OK ] ( 99/101) Example1Test on daint:gpu using PrgEnv-pgi
11581158
[ OK ] (100/101) OpenACCTest on daint:gpu using PrgEnv-cray
11591159
[ OK ] (101/101) Example1Test on daint:gpu using PrgEnv-gnu
11601160
[----------] all spawned checks have finished

docs/tutorial.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,15 @@ If everything is configured correctly for your system, you should get an output
203203
[----------] finished processing Example1Test (Simple matrix-vector multiplication example)
204204
205205
[----------] waiting for spawned checks to finish
206-
[ OK ] (1/12) Example1Test on daint:login using PrgEnv-intel
207-
[ OK ] (2/12) Example1Test on daint:login using PrgEnv-cray
208-
[ OK ] (3/12) Example1Test on daint:login using PrgEnv-gnu
209-
[ OK ] (4/12) Example1Test on daint:login using PrgEnv-pgi
210-
[ OK ] (5/12) Example1Test on daint:mc using PrgEnv-gnu
211-
[ OK ] (6/12) Example1Test on daint:mc using PrgEnv-pgi
212-
[ OK ] (7/12) Example1Test on daint:mc using PrgEnv-cray
213-
[ OK ] (8/12) Example1Test on daint:mc using PrgEnv-intel
214-
[ OK ] (9/12) Example1Test on daint:gpu using PrgEnv-intel
206+
[ OK ] ( 1/12) Example1Test on daint:login using PrgEnv-intel
207+
[ OK ] ( 2/12) Example1Test on daint:login using PrgEnv-cray
208+
[ OK ] ( 3/12) Example1Test on daint:login using PrgEnv-gnu
209+
[ OK ] ( 4/12) Example1Test on daint:login using PrgEnv-pgi
210+
[ OK ] ( 5/12) Example1Test on daint:mc using PrgEnv-gnu
211+
[ OK ] ( 6/12) Example1Test on daint:mc using PrgEnv-pgi
212+
[ OK ] ( 7/12) Example1Test on daint:mc using PrgEnv-cray
213+
[ OK ] ( 8/12) Example1Test on daint:mc using PrgEnv-intel
214+
[ OK ] ( 9/12) Example1Test on daint:gpu using PrgEnv-intel
215215
[ OK ] (10/12) Example1Test on daint:gpu using PrgEnv-cray
216216
[ OK ] (11/12) Example1Test on daint:gpu using PrgEnv-gnu
217217
[ OK ] (12/12) Example1Test on daint:gpu using PrgEnv-pgi

reframe/frontend/executors/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def print_separator(check, prefix):
334334
)
335335

336336
self._policy.enter()
337-
self._printer.init_progress(len(testcases))
337+
self._printer.reset_progress(len(testcases))
338338
last_check = None
339339
for t in testcases:
340340
if last_check is None or last_check.name != t.check.name:

reframe/frontend/printer.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ def __init__(self):
2424
self.line_width = 78
2525
self.status_width = 10
2626

27-
def init_progress(self, num_cases):
27+
def reset_progress(self, total_cases):
2828
self._progress_count = 0
29-
self._total_count = num_cases
29+
self._progress_total = total_cases
3030

3131
def separator(self, linestyle, msg=''):
3232
if linestyle == 'short double line':
@@ -46,19 +46,21 @@ def status(self, status, message='', just=None, level=logging.INFO):
4646
else:
4747
status = status.ljust(self.status_width - 2)
4848

49-
status_stripped = status.strip().lower()
49+
status_stripped = status.strip()
5050
if self.colorize:
51-
if status_stripped == 'skip':
51+
if status_stripped == 'SKIP':
5252
status = color.colorize(status, color.YELLOW)
53-
elif status_stripped in ['fail', 'failed', 'error']:
53+
elif status_stripped in ['FAIL', 'FAILED', 'ERROR']:
5454
status = color.colorize(status, color.RED)
5555
else:
5656
status = color.colorize(status, color.GREEN)
5757

5858
final_msg = f'[ {status} ] '
59-
if status_stripped in ['ok', 'skip', 'fail', 'error']:
59+
if status_stripped in ['OK', 'SKIP', 'FAIL', 'ERROR']:
6060
self._progress_count += 1
61-
final_msg += f'({self._progress_count}/{self._total_count}) '
61+
width = len(str(self._progress_total))
62+
padded_progress = str(self._progress_count).rjust(width)
63+
final_msg += f'({padded_progress}/{self._progress_total}) '
6264

6365
final_msg += message
6466
logging.getlogger().log(level, final_msg)

0 commit comments

Comments
 (0)