Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Add F# EndToEnd tests - #6914

Closed
enricosada wants to merge 2 commits into
dotnet:release/2.0.0from
enricosada:fsharp_e2e_basic
Closed

Add F# EndToEnd tests#6914
enricosada wants to merge 2 commits into
dotnet:release/2.0.0from
enricosada:fsharp_e2e_basic

Conversation

@enricosada

Copy link
Copy Markdown

a dotnet new an f# console app who reference an dotnet new F# lib, restore => build => run

An app with lib
@enricosada

enricosada commented Jun 17, 2017

Copy link
Copy Markdown
Author

@dsyme@ncave can you please check if this fails for you (i cannot repro locally the bug).

How to test it:

  • clone repo
  • have bugged sdk in PATH
    and
cd test\EndToEnd
dotnet restore
dotnet test --filter "FullyQualifiedName=Microsoft.DotNet.Tests.EndToEnd.GivenFSharpShouldWork.AppWithLib"

if you want to see the test generated, before dotnet test

set DOTNET_TEST_PRESERVE_TEMP=1

and change

using(DisposableDirectorydirectory=Temp.CreateDirectory())

to

varDisposableDirectory directory =Temp.CreateDirectory();

the test failure will show the generated directory, so you can manually run the commands

@enricosada

enricosada commented Jun 17, 2017

Copy link
Copy Markdown
Author

Ok got it, fails if lib is netstandard instead of netcoreapp.

Unhandled Exception: System.MissingMethodException: Method not found: 'Void Lib.Say.hello(System.String)'.
at Program.main(String[] argv)

this is the repro case of error https://github.com/dotnet/cli/issues/6912 and https://github.com/dotnet/cli/issues/6863
and anyway a good scenario to test

/cc @dsyme@cartermp@KevinRansom@ncave

17:44:41 15>RunTest:
17:44:41 Failed Microsoft.DotNet.Tests.EndToEnd.GivenFSharpShouldWork.AppWithLib
17:44:41 15>DOTNETTEST : error Message: [D:\j\workspace\debug_windows---bc3c3f12\build\test\RunTest.proj]
17:44:41 Expected command to pass but it did not.
17:44:41 File Name: D:\j\workspace\debug_windows---bc3c3f12\artifacts\win81-x86\stage2\dotnet.exe
17:44:41 Arguments: run -p app
17:44:41 WorkingDir:: D:\j\workspace\debug_windows---bc3c3f12\/artifacts/testpackages//artifacts/e99b7f9b-5b8d-42c5-810b-de79f8e68b60
17:44:41 Exit Code: -532462766
17:44:41 StdOut:
17:44:41 17:44:41 StdErr:
17:44:41 17:44:41 Unhandled Exception: System.MissingMethodException: Method not found: 'Void Lib.Say.hello(System.String)'.
17:44:41 at Program.main(String[] argv)

@enricosadaenricosada mentioned this pull request Jun 17, 2017
5 tasks
@dsyme

Copy link
Copy Markdown

@enricosada Thanks!

@dsymedsyme left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved (once the corresponding fixes dotnet/fsharp#3215 are integrated into Microsoft/visualfsharp and available here)

@cartermpcartermp left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks a bunch, @enricosada. Same as @dsyme, this is good pending the changes to VF#

@wli3

wli3 commented Jun 19, 2017

Copy link
Copy Markdown

Failed with

Stacktrace
MESSAGE:
Expected command to pass but it did not.
File Name: /mnt/j/workspace/dotnet_cli/release_2.0.0/release_linux_x64_prtest/artifacts/linux-x64/stage2/dotnet
Arguments: run -p app
WorkingDir:: /mnt/j/workspace/dotnet_cli/release_2.0.0/release_linux_x64_prtest/artifacts/testpackages/artifacts/9acc2935-7089-484d-8e42-340608edf6fe
Exit Code: 134
StdOut:
StdErr:
Unhandled Exception: System.MissingMethodException: Method not found: 'Void Lib.Say.hello(System.String)'.
+++++++++++++++++++
STACK TRACE:
at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
at FluentAssertions.Execution.AssertionScope.FailWith(String message, Object[] args)
at Microsoft.DotNet.Tools.Test.Utilities.CommandResultAssertions.Pass() in /mnt/j/workspace/dotnet_cli/release_2.0.0/release_linux_x64_prtest/test/Microsoft.DotNet.Tools.Tests.Utilities/Assertions/CommandResultAssertions.cs:line 32
at Microsoft.DotNet.Tests.EndToEnd.GivenFSharpShouldWork.AppWithLib() in /mnt/j/workspace/dotnet_cli/release_2.0.0/release_linux_x64_prtest/test/EndToEnd/GivenFSharpShouldWork.cs:line 61

@cartermp

Copy link
Copy Markdown

@wli3 Looks like this is pending #6935, otherwise the test will always fail to compile.

@enricosada

Copy link
Copy Markdown
Author

closing in favor of #6975 who target release/2.0.0-preview2 branch

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@enricosada@dsyme@wli3@cartermp@dnfclas