Make sure tests can't be forgotten in cabal file

some *Spec.hs files weren't landing in the sdist since they werent
listed in other-modules and since we use hspec-discover no one ever
noticed.
This commit is contained in:
Daniel Gröber 2017-03-01 03:26:37 +01:00
parent 2d6d03fcea
commit 8680b3f7d1
4 changed files with 54 additions and 7 deletions

View File

@ -277,21 +277,28 @@ Test-Suite spec
Type: exitcode-stdio-1.0
Other-Modules: Paths_ghc_mod
Dir
Spec
TestUtils
-- $ ls test/*Spec.hs | sed 's_^.*/\(.*\)\.hs$_\1_' | sort
BrowseSpec
CustomPackageDbSpec
CabalHelperSpec
CaseSplitSpec
CheckSpec
CradleSpec
CustomPackageDbSpec
FileMappingSpec
FindSpec
FlagSpec
GhcPkgSpec
HomeModuleGraphSpec
InfoSpec
LangSpec
LintSpec
ListSpec
MonadSpec
PathsAndFilesSpec
HomeModuleGraphSpec
FileMappingSpec
ShellParseSpec
TargetSpec
Build-Depends: hspec < 2.4 && >= 2.0.0
X-Build-Depends-Like: CLibName

View File

@ -1,7 +1,7 @@
{-# LANGUAGE OverloadedStrings #-}
module FindSpec where
import GhcMod.Find
import GhcModExe.Find
import Test.Hspec
import TestUtils

View File

@ -1,5 +1,4 @@
{-# LANGUAGE CPP, ScopedTypeVariables #-}
import Spec
import Dir
import Control.Exception as E
@ -10,6 +9,48 @@ import System.Environment
import Test.Hspec
import TestUtils
import qualified BrowseSpec
import qualified CabalHelperSpec
import qualified CaseSplitSpec
import qualified CheckSpec
import qualified CradleSpec
import qualified CustomPackageDbSpec
import qualified FileMappingSpec
import qualified FindSpec
import qualified FlagSpec
import qualified GhcPkgSpec
import qualified HomeModuleGraphSpec
import qualified InfoSpec
import qualified LangSpec
import qualified LintSpec
import qualified ListSpec
import qualified MonadSpec
import qualified PathsAndFilesSpec
import qualified ShellParseSpec
import qualified TargetSpec
spec :: Spec
spec = do
describe "Browse" BrowseSpec.spec
describe "CabalHelper" CabalHelperSpec.spec
describe "CaseSplit" CaseSplitSpec.spec
describe "Check" CheckSpec.spec
describe "Cradle" CradleSpec.spec
describe "CustomPackageDb" CustomPackageDbSpec.spec
describe "FileMapping" FileMappingSpec.spec
describe "Find" FindSpec.spec
describe "Flag" FlagSpec.spec
describe "GhcPkg" GhcPkgSpec.spec
describe "HomeModuleGraph" HomeModuleGraphSpec.spec
describe "Info" InfoSpec.spec
describe "Lang" LangSpec.spec
describe "Lint" LintSpec.spec
describe "List" ListSpec.spec
describe "Monad" MonadSpec.spec
describe "PathsAndFiles" PathsAndFilesSpec.spec
describe "ShellParse" ShellParseSpec.spec
describe "Target" TargetSpec.spec
main :: IO ()
main = do
#if __GLASGOW_HASKELL__ >= 708

View File

@ -1 +0,0 @@
{-# OPTIONS_GHC -F -pgmF hspec-discover -optF --no-main #-}