Running test with the stage-1 compiler

Simon Peyton Jones simonpj at microsoft.com
Mon Dec 9 23:08:57 UTC 2019


|     hadrian/build.cabal.sh --flavor=validate --build-root=_buildvalidate
| --test-compiler=_buildvalidate/stage0/bin/ghc
| 
| Although I'll admit  this is far from convenient. 

I often want to do this in a single testsuite directory, or perhaps just on a single test, like say T15043 in testsuite/tests/typecheck/should_compile.  I'm not validating at all ... I just want to run a test, or a directory-full of tests, with the stage1 compiler.

How can I do that?

Thanks

Simon

| -----Original Message-----
| From: Ben Gamari <ben at smart-cactus.org>
| Sent: 09 December 2019 22:24
| To: Simon Peyton Jones <simonpj at microsoft.com>; ghc-devs at haskell.org
| Subject: Re: Running test with the stage-1 compiler
| 
| Simon Peyton Jones via ghc-devs <ghc-devs at haskell.org> writes:
| 
| > Apparently 'sh validate' now uses Hadrian.
| > This has broken one of my workflows:
| >
| >   *   build the stage1 compiler
| >   *   cd testsuite/tests
| >   *   make stage=1
| >
| > That is, run the testsuite with the stage-1 compile.  (This often
| > produces a small test case for a compiler crash, much easier than
| debugging GHC compiling itself.) How do I do this?
| 
| I suspect (but have not tested) that you can accomplish this with
| 
|     hadrian/build.cabal.sh --flavor=validate --build-root=_buildvalidate
| --test-compiler=_buildvalidate/stage0/bin/ghc
| 
| Although I'll admit  this is far from convenient. If you weren't using
| the `validate` script this would just be
| 
|     hadrian/build.cabal.sh --test-compiler=_build/stage0/bin/ghc
| 
| Cheers,
| 
| - Ben


More information about the ghc-devs mailing list