Summary: | dev-perl/Data-ICal-0.13 new ebuild | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Nick Prater <nick> |
Component: | New packages | Assignee: | Gentoo Perl team <perl> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | ||
Priority: | Low | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://search.cpan.org/~jesse/Data-ICal-0.13/ | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 235898, 235899 | ||
Bug Blocks: | 235914 | ||
Attachments: |
Data-ICal-0.13.ebuild
Added support for tests |
Description
Nick Prater
2008-08-27 11:15:28 UTC
Created attachment 163886 [details]
Data-ICal-0.13.ebuild
Why did you add SRC_TEST="no" to the ebuild? > Why did you add SRC_TEST="no" to the ebuild?
I think this is a misunderstanding on my part:
The build_requires: section of META.yml specifies a number of Test:: modules. I did not want to create dependencies on these modules by setting SRC_TEST="yes".
In fact, I have just tried setting SRC_TEST="yes" on my system. This ebuild still installs fine on my system, despite missing the Test::Warn and Test::LongString modules, although I get a message saying "Test phase [not enabled]".
I guess there must be some magic that only runs the tests if all the required modules are already installed. Otherwise the tests are skipped. Would this make sense? I must do some more reading and investigation to understand this...
(In reply to comment #3) > > Why did you add SRC_TEST="no" to the ebuild? > > I think this is a misunderstanding on my part: > > The build_requires: section of META.yml specifies a number of Test:: modules. I > did not want to create dependencies on these modules by setting SRC_TEST="yes". It's a little ugly but works: IUSE=test RDEPEND="..." DEPEND="$RDEPEND ... test? ( dev-perl/Test-... )" > In fact, I have just tried setting SRC_TEST="yes" on my system. This ebuild The perl-module.eclass tests for SRC_TEST=do. So if test is in FEATURES and SRC_TEST=do it will run the tests. If this is a good solution is a discussion for another bug. All other ebuilds would use RESTRICT=test if the test shouldn't be run. > still installs fine on my system, despite missing the Test::Warn and > Test::LongString modules, although I get a message saying "Test phase [not > enabled]". > > I guess there must be some magic that only runs the tests if all the required > modules are already installed. Otherwise the tests are skipped. Would this make > sense? I must do some more reading and investigation to understand this... I add SRC_TEST=no if there is a reason to not run the test (like online access, X stuff,.... too lazy to think about a fix...). Created attachment 164836 [details]
Added support for tests
Thanks for the explanation and suggestions - they've helped me understand much more.
I've attached a revised ebuild with SRC_TEST="do" and conditional dependencies for the modules required to run tests.
I've tested this ebuild on my system, first with tests disabled, then with tests enabled. Once the additional dependencies were installed, the tests completed successfully.
In the tree. Thanks |