Closed oalders closed 4 years ago
This is probably a bug in the runner logic that handles the situation where multiple conflicting settings get picked. For instance you can set a command line value for timeout, and tests can also set test-specific timeouts. Typically it is done as a fallback, it picks one. This push vivifies args, even when none are present, so the ones coming from the ::
never have a chance to come in.
I think CLI args is a special case where things should be merged, not fallback. The question is ordering, I think arguments can be made in either direction. I think ::
args should come last, Other sources are generally test-specific, and as such for any given test will be consistent (from plugins, directives, resources, etc). The ::
cli ones are the ones that may come and go or be inconsistent.
Right. In our codebase we're using Test::Class::Moose
and passing in test class names after the ::
. We've fallen back to prove
in the meantime because yath
will no longer allow us to run individual test classes.
yeah, I will fix this tonight if I have a moment. Test::Class is used where I work, so I need to fix it for us too.
Released v1.000028
Thanks, @exodist! 🚀 Do you want me to send a PR with a regression test?
Sure!
This appears to be the behaviour since
v1.000024
. Specifically it looks to break at https://github.com/Test-More/Test2-Harness/commit/e23a37d5#diff-4a4cd0f6c984be5b67002a3b8c1b99b2R277The line in question:
push @{$task->{test_args}} => @{$res->{args}};
If I comment out that line, then arguments following the arisdottle re-appear.
Test case:
Invoke via
perl -Ilib scripts/yath test.t :: foobar