Running test with the stage-1 compiler

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Running test with the stage-1 compiler

GHC - devs mailing list

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?

Thanks

Simon


_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

Re: Running test with the stage-1 compiler

Ömer Sinan Ağacan
You can use `sh validate --legacy` to use the old build system.

Ömer

Simon Peyton Jones via ghc-devs <[hidden email]>, 9 Ara 2019
Pzt, 12:10 tarihinde şunu yazdı:

>
> 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?
>
> Thanks
>
> Simon
>
> _______________________________________________
> ghc-devs mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

Re: Running test with the stage-1 compiler

Ben Gamari-2
In reply to this post by GHC - devs mailing list
Simon Peyton Jones via ghc-devs <[hidden email]> 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

_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

signature.asc (497 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Running test with the stage-1 compiler

GHC - devs mailing list
|     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 <[hidden email]>
| Sent: 09 December 2019 22:24
| To: Simon Peyton Jones <[hidden email]>; [hidden email]
| Subject: Re: Running test with the stage-1 compiler
|
| Simon Peyton Jones via ghc-devs <[hidden email]> 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
_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

Re: Running test with the stage-1 compiler

Alp Mestanogullari-2
In reply to this post by Ben Gamari-2

For what it's worth, there's a "shortcut" to save a few keystrokes: --test-compiler=stage1

But this broke at some point in the past few months, as documented in #17528. I am however working on a patch to make this work.

On 09/12/2019 23:23, Ben Gamari wrote:
Simon Peyton Jones via ghc-devs [hidden email] 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

_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
-- 
Alp Mestanogullari, Haskell Consultant
Well-Typed LLP, https://www.well-typed.com/

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

_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs