|
25 | 25 | ReframeFatalError, ReframeForceExitError, SystemAutodetectionError |
26 | 26 | ) |
27 | 27 | from reframe.core.exceptions import format_exception |
| 28 | +from reframe.core.pipeline import (DEPEND_EXACT, DEPEND_BY_ENV, DEPEND_FULLY) |
28 | 29 | from reframe.frontend.executors import Runner, generate_testcases |
29 | 30 | from reframe.frontend.executors.policies import (SerialExecutionPolicy, |
30 | 31 | AsynchronousExecutionPolicy) |
|
33 | 34 |
|
34 | 35 |
|
35 | 36 | def format_check(check, detailed): |
| 37 | + def dep_type(t): |
| 38 | + if t == DEPEND_EXACT: |
| 39 | + return 'DEPEND_EXACT' |
| 40 | + elif t == DEPEND_BY_ENV: |
| 41 | + return 'DEPEND_BY_ENV' |
| 42 | + elif t == DEPEND_FULLY: |
| 43 | + return 'DEPEND_FULLY' |
| 44 | + |
36 | 45 | lines = [' * %s (found in %s)' % (check.name, |
37 | 46 | inspect.getfile(type(check)))] |
38 | 47 | flex = 'flexible' if check.num_tasks <= 0 else 'standard' |
39 | 48 |
|
40 | 49 | if detailed: |
41 | 50 | lines += [ |
42 | | - ' - description: %s' % check.descr, |
43 | | - ' - systems: %s' % ', '.join(check.valid_systems), |
44 | | - ' - environments: %s' % ', '.join(check.valid_prog_environs), |
45 | | - ' - modules: %s' % ', '.join(check.modules), |
46 | | - ' - task allocation: %s' % flex, |
47 | | - ' - tags: %s' % ', '.join(check.tags), |
48 | | - ' - maintainers: %s' % ', '.join(check.maintainers) |
| 51 | + f" - description: {check.descr}", |
| 52 | + f" - systems: {', '.join(check.valid_systems)}", |
| 53 | + f" - environments: {', '.join(check.valid_prog_environs)}", |
| 54 | + f" - modules: {', '.join(check.modules)}", |
| 55 | + f" - task allocation: {flex}", |
| 56 | + f" - dependencies: " |
| 57 | + f"{[(n, dep_type(t), s) for (n, t, s) in check.user_deps()]}", |
| 58 | + f" - tags: {', '.join(check.tags)}", |
| 59 | + f" - maintainers: {', '.join(check.maintainers)}" |
49 | 60 | ] |
50 | 61 |
|
51 | 62 | return '\n'.join(lines) |
|
0 commit comments