Make Nixpkgs parsing test also optional (for now)

This commit is contained in:
John Wiegley 2018-04-10 11:14:20 -07:00
parent 586402ad9a
commit 6d275b6093

View file

@ -41,7 +41,7 @@ main :: IO ()
main = do main = do
nixLanguageTests <- NixLanguageTests.genTests nixLanguageTests <- NixLanguageTests.genTests
langTestsEnv <- lookupEnv "LANGUAGE_TESTS" langTestsEnv <- lookupEnv "LANGUAGE_TESTS"
nixpkgsTestsEnv <- lookupEnv "NIXPKGS_PARSE_DISABLE" nixpkgsTestsEnv <- lookupEnv "NIXPKGS_TESTS"
let runLangTests = langTestsEnv == Just "yes" let runLangTests = langTestsEnv == Just "yes"
let runNixpkgsTests = nixpkgsTestsEnv == Just "yes" let runNixpkgsTests = nixpkgsTestsEnv == Just "yes"
defaultMain $ testGroup "hnix" $ defaultMain $ testGroup "hnix" $
@ -52,4 +52,4 @@ main = do
] ++ ] ++
[ testCase "Nix languarge tests present" ensureLangTestsPresent | runLangTests ] ++ [ testCase "Nix languarge tests present" ensureLangTestsPresent | runLangTests ] ++
[ nixLanguageTests | runLangTests ] ++ [ nixLanguageTests | runLangTests ] ++
[ testCase "Nixpkgs parses without errors" ensureNixpkgsCanParse | not runNixpkgsTests ] [ testCase "Nixpkgs parses without errors" ensureNixpkgsCanParse | runNixpkgsTests ]