Skip to content

Commit

Permalink
Merge pull request #17 from sot/spec_name
Browse files Browse the repository at this point in the history
Use submitted test-spec as a full filename
  • Loading branch information
jeanconn authored Nov 20, 2019
2 parents 808ea6b + 23b9d6a commit 118aefe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,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 @@ -296,7 +296,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

0 comments on commit 118aefe

Please sign in to comment.