Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Run test suites in azure ci #1401

Open
3 of 11 tasks
jneira opened this issue Oct 3, 2019 · 11 comments
Open
3 of 11 tasks

Run test suites in azure ci #1401

jneira opened this issue Oct 3, 2019 · 11 comments
Labels
build Continuous integration and building testing

Comments

@jneira
Copy link
Member

jneira commented Oct 3, 2019

  • This is the more promising option for running tests in macos and windows (thanks god and @alanz at least we have the circle ci for linux)

  • Linux jobs: all test suites are green

  • Windows jobs

  • macos jobs

    • ghc-8.6.*: all test suites green
    • ghc-8.4.*:
      • test hangs after error in dispatcher test (see below)
      • functional test cant be run (func-test: fd:28: hPutBuf: resource vanished (Broken pipe))
@fendor
Copy link
Collaborator

fendor commented Oct 3, 2019

Some of these issues should be fixed by #1126, so maybe we can try again to enable azure-ci testing, once that pr has landed.

@jneira
Copy link
Member Author

jneira commented Oct 3, 2019

I am just running the pr in azure with tests enabled: https://dev.azure.com/jneira/haskell-ide-engine/_build/results?buildId=212

@jneira
Copy link
Member Author

jneira commented Oct 7, 2019

Hi, after applying the workaround to avoid the errors compiling cabal-helper at runtime the number of failed tests has decreased sensibly:

The functional tests suite with the hie-bios branch hasmore fails: https://dev.azure.com/jneira/haskell-ide-engine/_build/results?buildId=221. Most of them are like:

haskell-ide-engine>   1) Completion.completions works
haskell-ide-engine>        uncaught exception: ConduitParserException
haskell-ide-engine>        NamedParserException "NotificationMessage ServerMethod PublishDiagnosticsParams" (NamedParserException "NotificationMessage ServerMethod PublishDiagnosticsParams" (NamedParserException "NotificationMessage ServerMethod PublishDiagnosticsParams" (NamedParserException "Logging notification" (BothFailed (Unexpected "ConduitParser.empty") (NamedParserException "NotificationMessage ServerMethod PublishDiagnosticsParams" (NamedParserException "NotificationMessage ServerMethod PublishDiagnosticsParams" (NamedParserException "NotificationMessage ServerMethod PublishDiagnosticsParams" (NamedParserException "Logging notification" (BothFailed (Unexpected "ConduitParser.empty") (NamedParserException "NotificationMessage ServerMethod PublishDiagnosticsParams" (NamedParserException "NotificationMessage ServerMethod PublishDiagnosticsParams" (NamedParserException "NotificationMessage ServerMethod PublishDiagnosticsParams" (NamedParserException "Logging notification" (BothFailed (Unexpected "ConduitParser.empty") (Unexpected "ConduitParser.empty")))))))))))))))
haskell-ide-engine> 
haskell-ide-engine>   To rerun use: --match "/Completion/completions/works/"

@jneira
Copy link
Member Author

jneira commented Dec 26, 2019

I've reran tests in azure with actual master: https://dev.azure.com/jneira/haskell-ide-engine/_build/results?buildId=334&view=results

@fendor
Copy link
Collaborator

fendor commented Dec 26, 2019

This would be great! maybe we should start poking members of the haskell organizations to enable azure for this project?

@jneira
Copy link
Member Author

jneira commented Dec 27, 2019

Absolutely, do we know who has the permissions to do it, @alanz, @bubba?

@alanz
Copy link
Collaborator

alanz commented Dec 27, 2019

I think the haskell committee has control of this. Not sure who specifically.

@jneira
Copy link
Member Author

jneira commented Dec 27, 2019

Ok, maybe we can wait to have the azure setup complete, including green test suites and deploy.

EDIT: i get linux and macos to run the entire test suite succesfully: https://dev.azure.com/jneira/0fa2df97-1d6d-4a00-935a-03a77e7170b8/_build/results?buildId=344&view=logs&j=d2c7b64e-54d7-53d5-7f80-77915c458472

@jneira jneira self-assigned this Jan 3, 2020
@jneira
Copy link
Member Author

jneira commented Jan 10, 2020

Update:


Windows wrapper-test errors:

haskell-ide-engine>   test\wrapper\HieWrapper.hs:18:9: 
haskell-ide-engine>   1) version checking picks up a stack.yaml with 8.2.1
haskell-ide-engine>        expected: "8.2.1"
haskell-ide-engine>         but got: ""
haskell-ide-engine> 
haskell-ide-engine>   To rerun use: --match "/version checking/picks up a stack.yaml with 8.2.1/"
haskell-ide-engine> 
haskell-ide-engine>   test\wrapper\HieWrapper.hs:23:9: 
haskell-ide-engine>   2) version checking picks up a stack.yaml with 8.2.2
haskell-ide-engine>        expected: "8.2.2"
haskell-ide-engine>         but got: "8.6.5"
haskell-ide-engine> 
haskell-ide-engine>   To rerun use: --match "/version checking/picks up a stack.yaml with 8.2.2/"


windows dispatcher-test errors:

Failures:

  test\dispatcher\Main.hs:157:5: 
  1) functional dispatch defers responses until module is loaded
       uncaught exception: ErrorCall
       Prelude.head: empty list

  To rerun use: --match "/functional dispatch/defers responses until module is loaded/"

  test\dispatcher\Main.hs:205:7: 
  2) functional dispatch instantly responds to deferred requests if cache is available
       expected: ("references",Just [DocumentHighlight {_range = Range {_start = Position {_line = 7, _character = 0}, _end = Position {_line = 7, _character = 2}}, _kind = Just HkWrite},DocumentHighlight {_range = Range {_start = Position {_line = 7, _character = 0}, _end = Position {_line = 7, _character = 2}}, _kind = Just HkWrite},DocumentHighlight {_range = Range {_start = Position {_line = 5, _character = 6}, _end = Position {_line = 5, _character = 8}}, _kind = Just HkRead},DocumentHighlight {_range = Range {_start = Position {_line = 7, _character = 0}, _end = Position {_line = 7, _character = 2}}, _kind = Just HkWrite},DocumentHighlight {_range = Range {_start = Position {_line = 7, _character = 0}, _end = Position {_line = 7, _character = 2}}, _kind = Just HkWrite},DocumentHighlight {_range = Range {_start = Position {_line = 5, _character = 6}, _end = Position {_line = 5, _character = 8}}, _kind = Just HkRead}])
        but got: ("req2",Nothing)

  To rerun use: --match "/functional dispatch/instantly responds to deferred requests if cache is available/"

  test\dispatcher\Main.hs:257:7: 
  3) functional dispatch returns hints as diagnostics
       expected: ("r5",Just (PublishDiagnosticsParams {_uri = Uri {getUri = "file:///D:/a/1/s/test/testdata/FuncTest.hs"}, _diagnostics = List [Diagnostic {_range = Range {_start = Position {_line = 9, _character = 6}, _end = Position {_line = 10, _character = 18}}, _severity = Just DsInfo, _code = Just (StringValue "Redundant do"), _source = Just "hlint", _message = "Redundant do\nFound:\n  do putStrLn \"hello\"\nWhy not:\n  putStrLn \"hello\"\n", _relatedInformation = Nothing}]}))
        but got: ("references",Nothing)

  To rerun use: --match "/functional dispatch/returns hints as diagnostics/"

  test\dispatcher\Main.hs:297:7: 
  4) functional dispatch instantly responds to failed modules with no cache with the default
       expected: ("req7",Just [])
        but got: ("r5",Nothing)

  To rerun use: --match "/functional dispatch/instantly responds to failed modules with no cache with the default/"

windows func-test error for ghc-8.6.4:

haskell-ide-engine>   1) Hover.hover works
haskell-ide-engine>        predicate failed on: HoverContents (MarkupContent {_kind = MkMarkdown, _value = "\n```haskell\nsum :: [Int] -> Int\n```\n```haskell\nsum :: forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a\n```\n\n\n\nbase Data.Foldable"})
haskell-ide-engine> 
haskell-ide-engine>   To rerun use: --match "/Hover/hover/works/"

windows func-test error with cabal anf ghc-8.4.4

Failures:

  src\Language\Haskell\LSP\Test\Decoding.hs:121:32: 
  1) Completion.completions works
       uncaught exception: ErrorCall
       Couldn't decode response for the request type: Shutdown
       "{\"result\":{\"capabilities\":{\"typeDefinitionProvider\":true,\"foldingRangeProvider\":false,\"textDocumentSync\":{\"openClose\":true,\"change\":2,\"willSave\":false,\"willSaveWaitUntil\":false,\"save\":{\"includeText\":false}},\"workspace\":{},\"implementationProvider\":true,\"documentRangeFormattingProvider\":true,\"documentHighlightProvider\":true,\"executeCommandProvider\":{\"commands\":[\"1904:applyrefact:applyOne\",\"1904:applyrefact:applyAll\",\"1904:generic:type\",\"1904:ghcmod:check\",\"1904:ghcmod:type\",\"1904:ghcmod:casesplit\",\"1904:hsimport:import\",\"1904:package:add\",\"1904:pragmas:addPragma\"]},\"renameProvider\":false,\"colorProvider\":false,\"definitionProvider\":true,\"hoverProvider\":true,\"codeActionProvider\":true,\"completionProvider\":{\"triggerCharacters\":[\".\"],\"resolveProvider\":true},\"documentSymbolProvider\":true,\"documentFormattingProvider\":true,\"referencesProvider\":true}},\"jsonrpc\":\"2.0\",\"id\":0}"
       CallStack (from HasCallStack):
         error, called at src\Language\Haskell\LSP\Test\Decoding.hs:121:32 in lsp-test-0.10.0.0-2370d2b00c7c9eae10f8c415728453dde8ccc33a:Language.Haskell.LSP.Test.Decoding

  To rerun use: --match "/Completion/completions/works/"

Commenting the previous test triggers another functional errors, so i've deactivated func-test for win+cabal+ghc-8.4.4


macos error in dispatcher-test for ghc-8.4

haskell-ide-engine> dispatcher-test: 
haskell-ide-engine> lookupSymbol failed in relocateSection (RELOC_GOT)
haskell-ide-engine> /Users/runner/runners/2.163.1/work/1/s/.stack/programs/x86_64-osx/ghc-8.4.3/lib/ghc-8.4.3/integer-gmp-1.0.2.0/HSinteger-gmp-1.0.2.0.o: unknown symbol `___gmp_rands'

Errors in unis-test involving cabal helper reported here: DanielG/cabal-helper#91

@jneira jneira added build Continuous integration and building testing labels Jan 14, 2020
jneira added a commit that referenced this issue Jan 15, 2020
* Enabled test-suites:
  * Linux, with stack or cabal, all test suites are enabled
  * Macos:
      * ghc-8.6.*: all suites enabled
      * ghc-8.4.*: func-test and dispatcher-test disabled
  * Windows
      * unit-test enabled
             * Except CabalHelper ones for ghc-8.6.4
      * func-test enabled with almost all tests
* cabal job:
   * Aadded one for linux

Make progress towards #1401
Closes #1431
@jneira
Copy link
Member Author

jneira commented Jan 24, 2020

  • Intermitent errors:
    • stack windows jobs fail with C:\path\to\ghc\strip.exe: unable to rename 'D:\sr\snapshots\add677e6\bin\happy.exe'; reason: File exists. I've hit it in local, and you have to delete the snapshot
    • stack windows job fail installing the specific ghc for liquidhaskell: error decompressing tar
      • resolved installing ghc's in the same step, at the beginning

@jneira
Copy link
Member Author

jneira commented Feb 3, 2020

After #1601 there are a new failing unit test in windows:

  • All windows jobs using ghc-8.6 (stack and cabal)
Failures:

  test/unit\\ApplyRefactPluginSpec.hs:42:5: 
  1) ApplyRefactPlugin, apply-refact plugin, apply-refact plugin commands, applies one hint only
       uncaught exception: GhcException
       unit-test.exe: could not detect mingw toolchain

  To rerun use: --match "/ApplyRefactPlugin/apply-refact plugin/apply-refact plugin commands/applies one hint only/"
  • All windows ghc-8.4 jobs
Failures:

  test/unit\\ApplyRefactPluginSpec.hs:134:5: 
  1) ApplyRefactPlugin, apply-refact plugin, apply-refact plugin commands, respects hlint config files in project root dir
       uncaught exception: IOException of type NoSuchThing
       .\settings: openFile: does not exist (No such file or directory)

  To rerun use: --match "/ApplyRefactPlugin/apply-refact plugin/apply-refact plugin commands/respects hlint config files in project root dir/"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build Continuous integration and building testing
Projects
None yet
Development

No branches or pull requests

3 participants