How does GHC's testsuite work?
Edward Z. Yang
ezyang at mit.edu
Mon Oct 30 15:25:34 UTC 2017
Actually, it's the reverse of what you said: like OCaml, GHC essentially
has ~no unit tests; it's entirely Haskell programs which we compile
(and sometimes run; a lot of tests are for the typechecker only so
we don't bother running those.) The .T file is just a way of letting
the Python driver know what tests exist.
Edward
Excerpts from Sébastien Hinderer's message of 2017-10-30 16:17:38 +0100:
> Dear all,
>
> I am a member of OCaml's developement team. More specifically, I am
> working on a test-driver for the OCaml compiler, which will be part of
> OCaml's 4.06 release.
>
> I am currently writing an article to describe the tool and its
> principles. In this article, I would like to also talk about how other
> compilers' testsuites are handled and loking how things are done in GHC
> is natural.
>
> In OCaml, our testsuite essentially consist in whole programs that
> we compile and run, checking that the compilation and execution results
> match the expected ones.
>
> From what I could see from GHC's testsuite, it seemed to me that it uses
> Python to drive the tests. I also understood that the testsuite has
> tests that are more kind of unit-tests, in the .T file. Am I correct
> here? Or do you guys also have whole program tests?
> If you do, how do you compile and run them?
>
> Any comment / hint on this aspect of the test harness' design would be
> really helpful.
>
> Many thanks in advance,
>
> Sébastien.
>
More information about the Glasgow-haskell-users
mailing list