Skip to content

Commit

Permalink
reverse order tests (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipDeegan authored Jun 6, 2024
1 parent b434f67 commit 3f8cb24
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions phlop/run/test_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def cli_args_parser():
dump="Dump discovered tests as YAML, no execution",
load="Run tests exported from dump",
regex="Filter out non-matching execution strings",
reverse="reverse order - higher core count tests preferred",
logging="0=off, 1=on non zero exit code, 2=always",
)

Expand All @@ -48,6 +49,9 @@ def cli_args_parser():
)
parser.add_argument("--load", default=None, help=_help.load)
parser.add_argument("-r", "--regex", default=None, help=_help.regex)
parser.add_argument(
"-R", "--reverse", action="store_true", default=False, help=_help.reverse
)
parser.add_argument("--logging", type=int, default=1, help=_help.logging)

return parser
Expand Down Expand Up @@ -153,6 +157,9 @@ def main():
else:
test_batches = log(test_batches)

if cli_args.reverse:
test_batches = list(reversed(test_batches))

pp.process(
test_batches,
n_cores=cli_args.cores,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "phlop"
version = "0.0.21"
version = "0.0.22"

dependencies = [

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="phlop",
version="0.0.21",
version="0.0.22",
cmdclass={},
classifiers=[],
include_package_data=True,
Expand Down

0 comments on commit 3f8cb24

Please sign in to comment.