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/Oracles/TestSettings.hs | |
parent | 337a31db4a6985e70ea1d852f4eb7e5d3f929c9b (diff) | |
download | haskell-8c224b6d43e220930ef0a60e50636e4910d15229.tar.gz |
ci: test in-tree compiler in hadrian
Diffstat (limited to 'hadrian/src/Oracles/TestSettings.hs')
-rw-r--r-- | hadrian/src/Oracles/TestSettings.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/hadrian/src/Oracles/TestSettings.hs b/hadrian/src/Oracles/TestSettings.hs index 6b08a43cd5..116bf95789 100644 --- a/hadrian/src/Oracles/TestSettings.hs +++ b/hadrian/src/Oracles/TestSettings.hs @@ -4,7 +4,7 @@ module Oracles.TestSettings ( TestSetting (..), testSetting, testRTSSettings - , getCompilerPath, getBinaryDirectory + , getCompilerPath, getBinaryDirectory, isInTreeCompiler ) where import Base @@ -81,6 +81,7 @@ getBinaryDirectory :: String -> Action FilePath getBinaryDirectory "stage0" = takeDirectory <$> setting SystemGhc getBinaryDirectory "stage1" = liftM2 (-/-) topDirectory (stageBinPath Stage0) getBinaryDirectory "stage2" = liftM2 (-/-) topDirectory (stageBinPath Stage1) +getBinaryDirectory "stage3" = liftM2 (-/-) topDirectory (stageBinPath Stage2) getBinaryDirectory compiler = pure $ takeDirectory compiler -- | Get the path to the given @--test-compiler@. @@ -88,8 +89,12 @@ getCompilerPath :: String -> Action FilePath getCompilerPath "stage0" = setting SystemGhc getCompilerPath "stage1" = liftM2 (-/-) topDirectory (fullPath Stage0 ghc) getCompilerPath "stage2" = liftM2 (-/-) topDirectory (fullPath Stage1 ghc) +getCompilerPath "stage3" = liftM2 (-/-) topDirectory (fullPath Stage2 ghc) getCompilerPath compiler = pure compiler +isInTreeCompiler :: String -> Bool +isInTreeCompiler c = c `elem` ["stage1","stage2","stage3"] + -- | Get the full path to the given program. fullPath :: Stage -> Package -> Action FilePath fullPath stage pkg = programPath =<< programContext stage pkg |