Backport #10320: Convert `validate.sh` to a Haskell script (#10490)
* Convert `validate.sh` to `cabal-validate` Closes #10317. A Haskell script will be easier to maintain and expand than the existing Bash script. This also adds a `--pattern PATTERN` option which lets you filter tests across all test suites. (cherry picked from commit 582a5c74) # Conflicts: # validate.sh * Split `cabal-validate` into modules This disentangles the utility boilerplate from the validation logic, making the `Main.hs` module much easier to read and modify. (cherry picked from commit 43a39755) * cabal-validate: Add Haddock documentation + README (cherry picked from commit e257591a) * Remove `ansi-terminal` dependency (cherry picked from commit 96d6ad54) * Use `unlines` in `printConfig` (cherry picked from commit 9f5d90f5) * optsParser -> rawOptsParser (cherry picked from commit a10a2a3d) * withTiming: take `startTime` explicitly (cherry picked from commit 37cfe85b) * Add `cabal-validate` to `format` job (cherry picked from commit 92613f0e) * Build test suites explicitly This seems to fix an error where `long-tests` isn't built? (cherry picked from commit d2082821) * fixup! Remove `ansi-terminal` dependency (cherry picked from commit bae200a4) * fixup! Build test suites explicitly (cherry picked from commit 1900d5e9) * fixup! fixup! Build test suites explicitly (cherry picked from commit 30f0faa3) * fix pointless validate conflict since it's going away * 3.12 doesn't have Cabal-hooks --------- Co-authored-by:Rebecca Turner <rbt@sent.as> Co-authored-by:
brandon s allbery kf8nh <allbery.b@gmail.com> Co-authored-by:
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Showing
- .github/workflows/format.yml 1 addition, 0 deletions.github/workflows/format.yml
- Makefile 3 additions, 3 deletionsMakefile
- cabal-validate/README.md 23 additions, 0 deletionscabal-validate/README.md
- cabal-validate/cabal-validate.cabal 47 additions, 0 deletionscabal-validate/cabal-validate.cabal
- cabal-validate/src/ANSI.hs 105 additions, 0 deletionscabal-validate/src/ANSI.hs
- cabal-validate/src/Cli.hs 436 additions, 0 deletionscabal-validate/src/Cli.hs
- cabal-validate/src/ClockUtil.hs 33 additions, 0 deletionscabal-validate/src/ClockUtil.hs
- cabal-validate/src/Main.hs 425 additions, 0 deletionscabal-validate/src/Main.hs
- cabal-validate/src/OutputUtil.hs 86 additions, 0 deletionscabal-validate/src/OutputUtil.hs
- cabal-validate/src/ProcessUtil.hs 137 additions, 0 deletionscabal-validate/src/ProcessUtil.hs
- cabal-validate/src/Step.hs 62 additions, 0 deletionscabal-validate/src/Step.hs
- project-cabal/pkgs/tests.config 1 addition, 0 deletionsproject-cabal/pkgs/tests.config
- validate.sh 2 additions, 533 deletionsvalidate.sh
Loading
Please register or sign in to comment