Skip to content

Hadrian: add a --test-accept/-a flag, to mimic 'make accept'

Alp Mestanogullari requested to merge alp/ghc:wip/alp/hadrian-test-accept into master

When -a or --test-accept is passed, and if one runs the 'test' target, then any test failing because of mismatching output and which is not expected to fail will have its expected output adjusted by the test driver, effectively considering the new output correct from now on.

When this flag is passed, hadrian's 'test' target becomes sensitive to the PLATFORM and OS environment variable, just like the Make build system:

  • when the PLATFORM env var is set to "YES", when accepting a result, accept it for the current platform;
  • when the OS env var is set to "YES", when accepting a result, accept it for all wordsizes of the current operating system.

This can all be combined with --only="..." and TEST="..." to only accept the new output of a subset of tests. An example would be:

$ PLATFORM=YES OS=YES hadrian/build.sh -j4 test --test-accept --only="TXXXX TYYYY"
Edited by Alp Mestanogullari

Merge request reports