@@ -1261,7 +1261,7 @@ addTypeAnnotationsToLiteralsTest = testGroup "add type annotations to literals t
1261
1261
, " "
1262
1262
, " import Debug.Trace"
1263
1263
, " "
1264
- , " f a = traceShow \" debug\" a"
1264
+ , " f a = traceShow \" debug\" a"
1265
1265
])
1266
1266
[ (DsWarning , (6 , 6 ), " Defaulting the following constraint" ) ]
1267
1267
" Add type annotation ‘[Char]’ to ‘\" debug\" ’"
@@ -2303,6 +2303,13 @@ xfail8101 = flip expectFailBecause
2303
2303
xfail8101 t _ = t
2304
2304
#endif
2305
2305
2306
+ expectFailCabal :: String -> TestTree -> TestTree
2307
+ #ifdef STACK
2308
+ expectFailCabal _ = id
2309
+ #else
2310
+ expectFailCabal = expectFailBecause
2311
+ #endif
2312
+
2306
2313
data Expect
2307
2314
= ExpectRange Range -- Both gotoDef and hover should report this range
2308
2315
| ExpectLocation Location
@@ -2678,17 +2685,19 @@ nonLspCommandLine = testGroup "ghcide command line"
2678
2685
]
2679
2686
2680
2687
benchmarkTests :: TestTree
2688
+ -- These tests require stack and will fail with cabal test
2681
2689
benchmarkTests =
2682
2690
let ? config = Bench. defConfig
2683
2691
{ Bench. verbosity = Bench. Quiet
2684
2692
, Bench. repetitions = Just 3
2685
2693
, Bench. buildTool = Bench. Stack
2686
2694
} in
2687
2695
withResource Bench. setup id $ \ _ -> testGroup " benchmark experiments"
2688
- [ testCase (Bench. name e) $ do
2696
+ [ expectFailCabal " Requires stack " $ testCase (Bench. name e) $ do
2689
2697
res <- Bench. runBench runInDir e
2690
2698
assertBool " did not successfully complete 5 repetitions" $ Bench. success res
2691
2699
| e <- Bench. experiments
2700
+ , Bench. name e /= " edit" -- the edit experiment does not ever fail
2692
2701
]
2693
2702
2694
2703
----------------------------------------------------------------------
0 commit comments