mirror of
https://github.com/haskell/ghcide.git
synced 2024-10-26 14:08:12 +03:00
Expect bench experiments to fail with Cabal (#704)
This commit is contained in:
parent
8a96da605b
commit
251ee08da3
@ -24,3 +24,4 @@ flags:
|
||||
ghc-options:
|
||||
ghc-lib-parser: -O0
|
||||
ghc-lib: -O0
|
||||
ghcide: -DSTACK
|
||||
|
@ -18,3 +18,6 @@ extra-deps:
|
||||
- extra-1.7.2
|
||||
nix:
|
||||
packages: [zlib]
|
||||
|
||||
ghc-options:
|
||||
ghcide: -DSTACK
|
||||
|
@ -27,3 +27,6 @@ extra-deps:
|
||||
|
||||
nix:
|
||||
packages: [zlib]
|
||||
|
||||
ghc-options:
|
||||
ghcide: -DSTACK
|
||||
|
@ -36,3 +36,7 @@ extra-deps:
|
||||
|
||||
nix:
|
||||
packages: [zlib]
|
||||
|
||||
|
||||
ghc-options:
|
||||
ghcide: -DSTACK
|
||||
|
@ -10,3 +10,6 @@ extra-deps:
|
||||
- extra-1.7.2
|
||||
nix:
|
||||
packages: [zlib]
|
||||
|
||||
ghc-options:
|
||||
ghcide: -DSTACK
|
||||
|
@ -1261,7 +1261,7 @@ addTypeAnnotationsToLiteralsTest = testGroup "add type annotations to literals t
|
||||
, ""
|
||||
, "import Debug.Trace"
|
||||
, ""
|
||||
, "f a = traceShow \"debug\" a"
|
||||
, "f a = traceShow \"debug\" a"
|
||||
])
|
||||
[ (DsWarning, (6, 6), "Defaulting the following constraint") ]
|
||||
"Add type annotation ‘[Char]’ to ‘\"debug\"’"
|
||||
@ -2303,6 +2303,13 @@ xfail8101 = flip expectFailBecause
|
||||
xfail8101 t _ = t
|
||||
#endif
|
||||
|
||||
expectFailCabal :: String -> TestTree -> TestTree
|
||||
#ifdef STACK
|
||||
expectFailCabal _ = id
|
||||
#else
|
||||
expectFailCabal = expectFailBecause
|
||||
#endif
|
||||
|
||||
data Expect
|
||||
= ExpectRange Range -- Both gotoDef and hover should report this range
|
||||
| ExpectLocation Location
|
||||
@ -2678,6 +2685,7 @@ nonLspCommandLine = testGroup "ghcide command line"
|
||||
]
|
||||
|
||||
benchmarkTests :: TestTree
|
||||
-- These tests require stack and will fail with cabal test
|
||||
benchmarkTests =
|
||||
let ?config = Bench.defConfig
|
||||
{ Bench.verbosity = Bench.Quiet
|
||||
@ -2685,10 +2693,11 @@ benchmarkTests =
|
||||
, Bench.buildTool = Bench.Stack
|
||||
} in
|
||||
withResource Bench.setup id $ \_ -> testGroup "benchmark experiments"
|
||||
[ testCase (Bench.name e) $ do
|
||||
[ expectFailCabal "Requires stack" $ testCase (Bench.name e) $ do
|
||||
res <- Bench.runBench runInDir e
|
||||
assertBool "did not successfully complete 5 repetitions" $ Bench.success res
|
||||
| e <- Bench.experiments
|
||||
, Bench.name e /= "edit" -- the edit experiment does not ever fail
|
||||
]
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user