Skip to content
Snippets Groups Projects
Commit 09875f48 authored by Matthew Pickering's avatar Matthew Pickering Committed by Marge Bot
Browse files

testsuite: Implement `isInTreeCompiler` in a more robust way

Just a small refactoring to avoid redundantly specifying the same
strings in two different places.
parent 5b7fa20c
No related branches found
No related tags found
No related merge requests found
......@@ -111,7 +111,7 @@ getCompilerPath "stage-cabal" = do
getCompilerPath compiler = pure compiler
isInTreeCompiler :: String -> Bool
isInTreeCompiler c = c `elem` ["stage1","stage2","stage3"]
isInTreeCompiler c = isJust (stageOfTestCompiler c)
-- | Get the full path to the given program.
fullPath :: Stage -> Package -> Action FilePath
......
......@@ -304,7 +304,7 @@ testRules = do
-- We should have built them already by this point, but
isOkToBuild :: TestArgs -> String -> Bool
isOkToBuild args target
= isJust (stageOf (testCompiler args))
= isInTreeCompiler (testCompiler args)
|| testHasInTreeFiles args
|| target `elem` map cp_target checkPrograms
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment