[MacPorts] #69866: Built-in tests should not run pre-test and post-test blocks

MacPorts noreply at macports.org
Tue Apr 30 01:04:26 UTC 2024


#69866: Built-in tests should not run pre-test and post-test blocks
------------------------+--------------------
 Reporter:  ryandesign  |      Owner:  (none)
     Type:  defect      |     Status:  new
 Priority:  Normal      |  Milestone:
Component:  base        |    Version:  2.9.3
 Keywords:              |       Port:
------------------------+--------------------
 The test phase now runs built-in tests for all ports, and CI has been
 modified to run only the built-in tests. This fails on ports that have
 pre-test or post-test blocks because those blocks were all written at a
 time when built-in tests did not exist, so of course they assume that the
 test dependencies have been installed and (in the case of the post-test
 block) that the test command has been run.

 Some failures caused by this:

 * https://github.com/macports/macports-ports/pull/23485
 * https://github.com/macports/macports-ports/pull/23764

 Josh suggested that each port could check, in its pre- and post-test
 blocks, whether `test.run` is `yes`, but I don't think all ports with such
 blocks should have to be modified for this base change. Instead, base
 should not run pre- and post-test blocks for the built-in tests.

 Perhaps the build-in tests should not be part of the test phase at all.
 Perhaps they should be a completely separate phase that can be requested
 separately by CI. And the test phase could have a dependency on this new
 separate phase to keep the existing behavior.

-- 
Ticket URL: <https://trac.macports.org/ticket/69866>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list