Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Dying if Test::Version is not installed breaks automated testing #6

Closed
harleypig opened this issue Nov 20, 2014 · 9 comments
Closed

Comments

@harleypig
Copy link

If Test::Version is not installed for some reason during a clean setup (e.g., travis-ci testing) dying breaks the entire build.

It would be better to skip_all instead of dying. This would allow the developer to ignore or fix as needed.

@xenoterracide
Copy link
Owner

disagree this leads to CI not appropriately running the test. Tests that can be accidentally not run aren't very usefull. I once introduced a bug because of the behavior you're asking for. However, it should probably add develop requires to the package, which it probably doesn't do. patches welcome.

@xenoterracide
Copy link
Owner

also do not run author tests (or version tests) without pulling in authordeps in ci

@xenoterracide
Copy link
Owner

it's worth noting that this plugin pulls in test version, so if you're running dzil authordeps --missing | cpanm and dzil test ( sets AUTHOR_TESTING at the right time) things should run correctly.

@harleypig
Copy link
Author

I see your point of view, though I don't fully agree with it. However, it's not my module. :]

I'm using travis-helper's perl help scripts with so I'm not sure why it didn't pull it in.

I added Test::Version = 0 to my [Prereqs / TestRequires] section of dist.ini and it worked fine in all versions of perl from 5.10 to 5.20 on travis-ci.

If adding [Prereqs / DevelopRequires] to the dist.ini for this dist, I can certainly do that and submit a pull request. But I don't understand how that would make it work.

@xenoterracide
Copy link
Owner

can you link me to your .travis.yml? it's probably wrong. If all you want is Test::Version in your TestRequires, that's possible I've been thinking about removing the evil eval for a while

here's one of mine https://github.com/xenoterracide/Business-CyberSource/blob/master/.travis.yml

also Don't use ExtraTests instead let your tests be in xt/... and use RunExtraTests so that dzil test still works, a standard make test or prove -lv won't attempt to run those tests anymore.

@xenoterracide
Copy link
Owner

To prove my point about skipping the test, IIRC the PodCoverageTests is one such test that will skip if not installed, so I force it to install, so that I don't accidentally release with brokenness

https://travis-ci.org/xenoterracide/Dist-Zilla-Plugin-Test-Version/jobs/41667983

xenoterracide added a commit that referenced this issue Nov 21, 2014
Signed-off-by: Caleb Cushing <xenoterracide@gmail.com>
@xenoterracide
Copy link
Owner

0.003000 should fix your problem, though I'd still suggest not using ExtraTests and using RunExtraTests instead, and ensuring that your travis.yml is actually configured to pull in deps properly.

@harleypig
Copy link
Author

If you're still interested: https://github.com/harleypig/Dist-Zilla-Plugin-Test-Legal/blob/release_testing/master/.travis.yml

I will experiment with RunExtraTests instead of ExtraTests ... I've been concerned about how the module will test in the wild, especilly CPANTesters. Thanks for your time.

@xenoterracide
Copy link
Owner

you're running author and release tests without ensuring that deps (author deps/develop requires ) for those are installed, cpantesters will not (if they do their testing is flawed, and should be ignored) AUTHOR_TESTING or RELEASE_TESTING. also IIRC setting it in env means that its set for the entire test run, which will cause problems because as you're pulling deps in you'll be running any author tests they've included (running author tests for modules you aren't currently authoring). blah blah. if you're going to run author only tests install the developer prereqs, or don't run author tests in ci.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants