How to run tests while building a port?
Mojca Miklavec
mojca at macports.org
Fri Aug 15 03:50:21 PDT 2014
On Fri, Aug 15, 2014 at 9:44 AM, Rainer Müller wrote:
> On 2014-08-15 08:37, Mojca Miklavec wrote:
>> I know that I can run "[sudo] port test p5.20-foo" to run the tests,
>> but that usually requires rebuilding the whole port.
>>
>> I also know that one could add "test.run yes" to the port, but that
>> requires modifications to the port.
>
> This option is a pre-requisite for 'port test' to work. If a port can be
> tested automatically, the Portfile should indicate that.
Oh. I thought that "test.run yes" meant "always run the tests".
But it seems that the option is automagically added to the Perl modules already.
>> Is there any shortcut to build + test + install at the same time
>> without modifying the port?
>
> You can also override many of the Portfile options on the command line,
> for example like this:
>
> sudo port test p5.20-foo test.run=yes
>
> There is no way to do an install with the tests other than running
> separate commands for 'port test' and then 'port install'.
It would be nice if there was a way to run tests with a single command.
Also, it might be handy to have "depends_test" available.
Mojca
More information about the macports-dev
mailing list