From 156fb34c6209b4e309997d595d2768b92d8e5823 Mon Sep 17 00:00:00 2001 From: Francesco Ariis Date: Wed, 22 Jun 2022 16:59:40 +0200 Subject: [PATCH] (cabal check) Add "Autogen include" test for bm All in `autogen-includes` hs to be in either `includes` or `install-includes` (benchmark). --- .../Sanity/AutogenIncludesBenchmark/cabal.out | 4 ++++ .../Sanity/AutogenIncludesBenchmark/cabal.test.hs | 6 ++++++ .../Sanity/AutogenIncludesBenchmark/pkg.cabal | 14 ++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesBenchmark/cabal.out create mode 100644 cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesBenchmark/cabal.test.hs create mode 100644 cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesBenchmark/pkg.cabal diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesBenchmark/cabal.out b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesBenchmark/cabal.out new file mode 100644 index 000000000..9e561d018 --- /dev/null +++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesBenchmark/cabal.out @@ -0,0 +1,4 @@ +# cabal check +Warning: The package will not build sanely due to these errors: +Warning: An include in 'autogen-includes' is not in 'includes'. +Warning: Hackage would reject this package. diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesBenchmark/cabal.test.hs b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesBenchmark/cabal.test.hs new file mode 100644 index 000000000..b77926c7b --- /dev/null +++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesBenchmark/cabal.test.hs @@ -0,0 +1,6 @@ +import Test.Cabal.Prelude + +-- All `autogen-includes` should appear in `install-includes` or +-- `includes` (benchmark). +main = cabalTest $ + fails $ cabal "check" [] diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesBenchmark/pkg.cabal b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesBenchmark/pkg.cabal new file mode 100644 index 000000000..41994a39e --- /dev/null +++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenIncludesBenchmark/pkg.cabal @@ -0,0 +1,14 @@ +cabal-version: 3.0 +name: pkg +synopsis: synopsis +description: description +version: 0 +category: example +maintainer: none@example.com +license: GPL-3.0-or-later + +benchmark benchmark + main-is: Main.hs + autogen-includes: AutoGenInc + default-language: Haskell2010 + type: exitcode-stdio-1.0 -- 2.11.4.GIT