How to run tests while building a port?

Rainer Müller raimue at macports.org
Fri Aug 15 00:44:49 PDT 2014


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.

> 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'.

Rainer


More information about the macports-dev mailing list