From 6f12ee91f8279694fa12b677e8c50a74671c895a Mon Sep 17 00:00:00 2001 From: Patrick Date: Mon, 27 May 2024 23:01:40 +0800 Subject: [PATCH 1/2] Migrate PluginSimpleTests --- ghcide/test/exe/PluginSimpleTests.hs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ghcide/test/exe/PluginSimpleTests.hs b/ghcide/test/exe/PluginSimpleTests.hs index cc5b5eba6c..dbe4145f90 100644 --- a/ghcide/test/exe/PluginSimpleTests.hs +++ b/ghcide/test/exe/PluginSimpleTests.hs @@ -10,8 +10,11 @@ import Language.LSP.Protocol.Types hiding (SemanticTokenAbsolute (..), import Language.LSP.Test import System.FilePath -- import Test.QuickCheck.Instances () +import Config +import Test.Hls.Util (EnvSpec (..), OS (..), + knownBrokenForGhcVersions, + knownBrokenInSpecificEnv) import Test.Tasty -import TestUtils tests :: TestTree tests = @@ -36,9 +39,8 @@ tests = -- Error: cabal: Failed to build ghc-typelits-natnormalise-0.7.7 (which is -- required by plugin-1.0.0). See the build log above for details. - ignoreFor (BrokenForGHC [GHC96, GHC98]) "fragile, frequently times out" $ - ignoreFor (BrokenSpecific Windows [GHC94]) "ghc-typelist-natnormalise fails to build on GHC 9.4.2 for windows only" $ - testSessionWithExtraFiles "plugin-knownnat" "simple plugin" $ \dir -> do + knownBrokenInSpecificEnv [HostOS Windows, GhcVer GHC94] "ghc-typelist-natnormalise fails to build on GHC 9.4.2 for windows only" $ + testWithExtraFiles "simple plugin" "plugin-knownnat" $ \dir -> do _ <- openDoc (dir "KnownNat.hs") "haskell" liftIO $ writeFile (dir"hie.yaml") "cradle: {cabal: [{path: '.', component: 'lib:plugin'}]}" From 9d4e4d54ed4870ccdb2fa6c9210eb7a6d24b2387 Mon Sep 17 00:00:00 2001 From: Patrick Date: Tue, 28 May 2024 15:15:29 +0800 Subject: [PATCH 2/2] Remove broken for windows 9.4 --- ghcide/test/exe/PluginSimpleTests.hs | 1 - 1 file changed, 1 deletion(-) diff --git a/ghcide/test/exe/PluginSimpleTests.hs b/ghcide/test/exe/PluginSimpleTests.hs index dbe4145f90..80b16395bd 100644 --- a/ghcide/test/exe/PluginSimpleTests.hs +++ b/ghcide/test/exe/PluginSimpleTests.hs @@ -39,7 +39,6 @@ tests = -- Error: cabal: Failed to build ghc-typelits-natnormalise-0.7.7 (which is -- required by plugin-1.0.0). See the build log above for details. - knownBrokenInSpecificEnv [HostOS Windows, GhcVer GHC94] "ghc-typelist-natnormalise fails to build on GHC 9.4.2 for windows only" $ testWithExtraFiles "simple plugin" "plugin-knownnat" $ \dir -> do _ <- openDoc (dir "KnownNat.hs") "haskell" liftIO $ writeFile (dir"hie.yaml")