Skip to content
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

Use submitted test-spec as a full filename #17

Merged
merged 2 commits into from
Nov 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,16 +161,16 @@ Running the tests
The ``run_testr`` command has the following options::

$ run_testr --help
usage: run_testr [-h] [--test-spec TEST_SPEC] [--packages-dir PACKAGES_DIR]
usage: run_testr [-h] [--test-spec TEST_SPEC_FILE] [--packages-dir PACKAGES_DIR]
[--outputs-dir OUTPUTS_DIR] [--outputs-subdir OUTPUTS_SUBDIR]
[--regress-dir REGRESS_DIR] [--include INCLUDES]
[--exclude EXCLUDES] [--collect-only]
[--packages-repo PACKAGES_REPO] [--overwrite]

optional arguments:
-h, --help show this help message and exit
--test-spec TEST_SPEC
Test include/exclude specification (default=None)
--test-spec TEST_SPEC_FILE
Test include/exclude specification file(default=None)
--packages-dir PACKAGES_DIR
Directory containing package tests
--outputs-dir OUTPUTS_DIR
Expand Down Expand Up @@ -295,7 +295,7 @@ manage these lists of tests directly.
The ``--test-spec`` command line option provides a way to do this. If you provide
an option like ``--test-spec=HEAD`` then the following happens:

- A file in the current directory named ``test_spec_HEAD`` is opened and read:
- A file in the current directory named ``HEAD`` is opened and read:

- It must contain a list of include / exclude specifications like those for
the ``-include`` and ``-exclude`` options.
Expand Down
2 changes: 1 addition & 1 deletion testr/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def process_opt():
# and reads additional test file include/excludes.
opt.regress_dir = os.path.join(opt.regress_dir, opt.test_spec)

with open('test_spec_{}'.format(opt.test_spec), 'r') as fh:
with open('{}'.format(opt.test_spec), 'r') as fh:
specs = (line.strip() for line in fh)
specs = [spec for spec in specs if spec and not spec.startswith('#')]

Expand Down