Trying to create a regression test for #20261

Adam Gundry adam at well-typed.com
Sun Aug 29 19:56:33 UTC 2021


Hi Alexis,


On 29/08/2021 17:42, Alexis Praga wrote:
> As a intermediate beginner in Haskell, I want to try to tackle a small
> issue for contributing to GHC.

Welcome! Thanks for trying your hand at contributing to GHC.


> I've looked into https://gitlab.haskell.org/ghc/ghc/-/issues/20261, but
> it's not clear how to integrate a running time in a regression test.
> 
> From what I understand, regression tests should be compared against
> sucess/failure or a given output.
> Should there be a hard-coded limit ? If that's the case, how could I
> create such a test ?  I could not find a similar test in the source
> code.

Have a look in testsuite/tests/perf/compiler. That directory contains a
number of compiler performance tests, which work by having the test
runner compare metrics about the compilation run for the current commit
vs. previous commits. The all.T file lists the tests to run and the
metrics to collect.

There's more details on the wiki:
https://gitlab.haskell.org/ghc/ghc/-/wikis/building/running-tests/adding#performance-tests

Hope this helps,

Adam


-- 
Adam Gundry, Haskell Consultant
Well-Typed LLP, https://www.well-typed.com/

Registered in England & Wales, OC335890
118 Wymering Mansions, Wymering Road, London W9 2NF, England


More information about the ghc-devs mailing list