Skip to content

Fix CradleTests "simple-multi-def-test" test #4262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ghcide/test/exe/CradleTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ simpleMultiTest variant = testCase (multiTestName variant "test") $ runWithExtra
liftIO $ assertBool "A should typecheck" ideResultSuccess
WaitForIdeRuleResult {..} <- waitForAction "TypeCheck" bdoc
liftIO $ assertBool "B should typecheck" ideResultSuccess
skipManyTill anyMessage $ isReferenceReady bPath
locs <- getDefinitions bdoc (Position 2 7)
let fooL = mkL (adoc ^. L.uri) 2 0 2 3
checkDefs locs (pure [fooL])
Expand Down
11 changes: 11 additions & 0 deletions repeatTest.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# recommended to build test binary separately and then run it in a loop (to avoid running cabal test in a loop)
# Run tests in a loop
for i in {1..500}; do
echo "Iteration $i" &&
HLS_TEST_LOG_STDERR=1 TASTY_PATTERN="simple-multi-def-test" cabal test ghcide-tests \
|| {
echo "Warning: error at iteration $i"
break
}; done
Loading