-
Notifications
You must be signed in to change notification settings - Fork 117
[feat] Add new command-line option for more verbose test listing #506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
teojgo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change also the parts of the documentation in the Running ReFrame section which demonstrate using the -l option.
vkarak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's nice. I have just a couple of coding suggestions.
reframe/core/pipeline.py
Outdated
| (self.name, inspect.getfile(type(self)), | ||
| self.descr, ','.join(self.tags), self.maintainers)) | ||
| return ("%s(name='%s', prefix='%s')" % | ||
| (self.__class__.__name__, self.name, self.prefix)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rewrite this as follows:
return "%s(name='%s', prefix='%s')" % (type(self).__name__,
self.name, self.prefix)
reframe/frontend/cli.py
Outdated
| ', '.join(check.tags), ', '.join(check.maintainers))) | ||
| else: | ||
| return (' * %s (found in %s)' % | ||
| (check.name, inspect.getfile(type(check)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rewrite this as follows:
lines = [' * %s (found in %s)' % (check.name, inspect.getfile(type(check)))]
if detailed:
lines += ['...', '...']
return '\n'.join(lines)
reframe/frontend/cli.py
Outdated
|
|
||
|
|
||
| def list_checks(checks, printer): | ||
| def format_check_description(check, detailed): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename this to format_check.
reframe/frontend/cli.py
Outdated
| help='List matched regression checks') | ||
| action_options.add_argument( | ||
| '-L', '--list-detailed', action='store_true', | ||
| help='Detailed description of matched regression checks') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List matched regression checks with a detailed description
reframe/core/pipeline.py
Outdated
| (self.name, inspect.getfile(type(self)), | ||
| self.descr, ','.join(self.tags), self.maintainers)) | ||
| return ("%s(name='%s', prefix='%s')" % | ||
| (type(self).__name__, self.name, self.prefix)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's against the coding style to put parentheses around the return value, unless it is absolutely necessary. Can you rewrite this as I proposed before?
Codecov Report
@@ Coverage Diff @@
## master #506 +/- ##
==========================================
+ Coverage 91.39% 91.42% +0.02%
==========================================
Files 72 72
Lines 8749 8767 +18
==========================================
+ Hits 7996 8015 +19
+ Misses 753 752 -1
Continue to review full report at Codecov.
|
|
@rsarm Please also add a simple unit test that calls the |
vkarak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some comments regarding the documentation, which I am fixing them right now.
docs/advanced.rst
Outdated
| Command line: ./bin/reframe -C tutorial/config/settings.py -c tutorial/advanced/advanced_example8.py -l | ||
| Reframe version: 2.13-dev0 | ||
| Reframe version: 2.15-dev0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version here should be 2.15-dev1
docs/running.rst
Outdated
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| To retrieve a listing of the selected checks, you must specify the ``-l`` or ``--list`` options. | ||
| There are two ways to retrieve a listing of the selected checks. One is by specifying the ``-l`` or ``--list`` option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The guideline in the documentation is to put a single sentence per line, so as to facilitate the diffs and avoid conflicts. There is now line limit in the documentation.
docs/running.rst
Outdated
| .. code-block:: none | ||
| Command line: ./bin/reframe -c tutorial/ -L | ||
| Reframe version: 2.15-dev0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2.15-dev1
docs/running.rst
Outdated
| Command line: ./reframe.py -C tutorial/config/settings.py -c tutorial/example1.py -r | ||
| Reframe version: 2.13-dev0 | ||
| Reframe version: 2.15-dev0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not change manually the versions numbers if you don't re-reproduce the output. The date just after this output shows May 26, when the 2.15 wasn't available!
docs/running.rst
Outdated
| Command line: ./bin/reframe -C tutorial/config/settings.py -c tutorial/ --exec-policy=async -r | ||
| Reframe version: 2.13-dev0 | ||
| Reframe version: 2.15-dev0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version should still remain 2.13-dev0 here.
Closes #473