Review main Merged

71890[TASK] Do not cache phpunit results

Christian Kuhn CR +2 V +2 Easy +4 −1 updated 10/19/21, 16:28

Commit message

phpunit has a default-enabled feature to write test
result to a cache file. phpunit however has no option
to only run failed tests since those tests may have
an @depends annatation and its hard for phpunit to
sort this out. The cache file is of rather little
use and mostly only pollutes the filesystem in real
life.

When developing core tests, developer typically
use a filter or a path constraint to execute a sub set
of tests only.

Additionally, with multiple phpunit .xml files in
one directory, the cache file overrides itself when
different suites are executed.

The patch disables that cache file by default in
phpunit xml files.

If anyone still wants to run the test suite and have
tests that failed executed first, the option can be
enabled on a per-use basis, example using runTests.sh:

  # Run suite and create cache file
  Build/Scripts/runTests.sh -e '--cache-result'
  # Run tests that failed first and update cache file
  Build/Scripts/runTests.sh -e '--cache-result --order-by=depends,defect'

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 5