diff options
author | Zubin Duggal <zubin.duggal@gmail.com> | 2021-10-04 15:58:39 +0530 |
---|---|---|
committer | Zubin Duggal <zubin.duggal@gmail.com> | 2021-10-13 13:51:03 +0530 |
commit | 8c224b6d43e220930ef0a60e50636e4910d15229 (patch) | |
tree | 99459405e1e362bc04b9710917320e72724624f1 /hadrian/src/CommandLine.hs | |
parent | 337a31db4a6985e70ea1d852f4eb7e5d3f929c9b (diff) | |
download | haskell-8c224b6d43e220930ef0a60e50636e4910d15229.tar.gz |
ci: test in-tree compiler in hadrian
Diffstat (limited to 'hadrian/src/CommandLine.hs')
-rw-r--r-- | hadrian/src/CommandLine.hs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/hadrian/src/CommandLine.hs b/hadrian/src/CommandLine.hs index 2c5b90c499..2bee0e44e9 100644 --- a/hadrian/src/CommandLine.hs +++ b/hadrian/src/CommandLine.hs @@ -71,7 +71,13 @@ data TestArgs = TestArgs , testVerbosity :: Maybe String , testWays :: [String] , brokenTests :: [String] - , testAccept :: Bool} + , testAccept :: Bool + , testHasInTreeFiles :: Bool + -- ^ This is used to signal that we have access to in-tree files like + -- the rts sources and the haddock stats directory even if the test + -- compiler is not in-tree + -- If this flag is set, then those tests will also be run. + } deriving (Eq, Show) -- | Default value for `TestArgs`. @@ -92,7 +98,9 @@ defaultTestArgs = TestArgs , testVerbosity = Nothing , testWays = [] , brokenTests = [] - , testAccept = False } + , testAccept = False + , testHasInTreeFiles = False + } readConfigure :: Either String (CommandLineArgs -> CommandLineArgs) readConfigure = Left "hadrian --configure has been deprecated (see #20167). Please run ./boot; ./configure manually" @@ -140,6 +148,9 @@ readTestKeepFiles = Right $ \flags -> flags { testArgs = (testArgs flags) { test readTestAccept :: Either String (CommandLineArgs -> CommandLineArgs) readTestAccept = Right $ \flags -> flags { testArgs = (testArgs flags) { testAccept = True } } +readTestHasInTreeFiles :: Either String (CommandLineArgs -> CommandLineArgs) +readTestHasInTreeFiles = Right $ \flags -> flags { testArgs = (testArgs flags) { testHasInTreeFiles = True } } + readTestCompiler :: Maybe String -> Either String (CommandLineArgs -> CommandLineArgs) readTestCompiler compiler = maybe (Left "Cannot parse compiler") (Right . set) compiler where @@ -298,6 +309,7 @@ optDescrs = , Option [] ["broken-test"] (OptArg readBrokenTests "TEST_NAME") "consider these tests to be broken" , Option ['a'] ["test-accept"] (NoArg readTestAccept) "Accept new output of tests" + , Option [] ["test-have-intree-files"] (NoArg readTestHasInTreeFiles) "Run the in-tree tests even with an out of tree compiler" , Option [] ["prefix"] (OptArg readPrefix "PATH") "Destination path for the bindist 'install' rule" , Option [] ["complete-setting"] (OptArg readCompleteStg "SETTING") |