Skip to content

Commit

Permalink
Fixing INT tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BlythMeister committed Jun 5, 2018
1 parent b9fb1c2 commit 99e7402
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 5 deletions.
39 changes: 38 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
"presentation": {
"reveal": "always"
},
"problemMatcher": "$msCompile"
"problemMatcher": "$msCompile",
"dependsOn": [
"dotnet:restore:fake.sln"
]
},
{
"label": "dotnet:run:unitTests",
Expand All @@ -32,6 +35,40 @@
"reveal": "always"
},
"problemMatcher": "$msCompile"
},
{
"label": "dotnet:run:commandLineUnitTests",
"group": "test",
"command": "dotnet run -p src/test/Fake.Core.CommandLine.UnitTests/Fake.Core.CommandLine.UnitTests.fsproj",
"type": "shell",
"presentation": {
"reveal": "always"
},
"problemMatcher": "$msCompile"
},
{
"label": "dotnet:run:integrationTests",
"group": "test",
"command": "dotnet run -p src/test/Fake.Core.IntegrationTests/Fake.Core.IntegrationTests.fsproj",
"type": "shell",
"presentation": {
"reveal": "always"
},
"problemMatcher": "$msCompile"
},
{
"label": "dotnet:run:allTests",
"group": "test",
"dependsOn": [
"dotnet:run:integrationTests",
"dotnet:run:commandLineUnitTests",
"dotnet:run:unitTests"
],
"type": "shell",
"presentation": {
"reveal": "always"
},
"problemMatcher": "$msCompile"
}
]
}
2 changes: 1 addition & 1 deletion src/app/Fake.Core.Process/Process.fs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ module Process =
//let startedProcesses = HashSet()
let private startedProcessesVar = "Fake.Core.Process.startedProcesses"
let private getStartedProcesses, _, private setStartedProcesses =
Fake.Core.FakeVar.define<ProcessList> startedProcessesVar
Fake.Core.FakeVar.defineAllowNoContext<ProcessList> startedProcessesVar

let private doWithProcessList f =
if Fake.Core.Context.isFakeContext () then
Expand Down
4 changes: 2 additions & 2 deletions src/test/Fake.Core.UnitTests/Fake.Core.Process.fs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ open Expecto
[<Tests>]
let tests =
testList "Fake.Core.Process.Tests" [
Fake.ContextHelper.fakeContextTestCase "Test that we have a nice error message when a file doesn't exist" <| fun _ ->
testCase "Test that we have a nice error message when a file doesn't exist" <| fun _ ->
try
Process.start(fun proc ->
{ proc with
Expand All @@ -20,7 +20,7 @@ let tests =
let s = e.Message.Contains "FileDoesntExist.exe"
Expect.isTrue s ("Expected file-path as part of the message '" + e.Message + "'")

Fake.ContextHelper.fakeContextTestCase "Test that we can read messages correctly" <| fun _ ->
testCase "Test that we can read messages correctly" <| fun _ ->
let shell, command =
if Environment.isWindows then
"cmd", "/C \"echo 1&& echo 2\""
Expand Down
2 changes: 1 addition & 1 deletion src/test/Fake.Core.UnitTests/Fake.DotNet.MSBuild.fs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ open Expecto
[<Tests>]
let tests =
testList "Fake.DotNet.MSBuild.Tests" [
Fake.ContextHelper.fakeContextTestCase "Test that we can create simple msbuild cmdline" <| fun _ ->
testCase "Test that we can create simple msbuild cmdline" <| fun _ ->
let cmdLine =
{ MSBuildParams.Create() with
Properties = ["OutputPath", "C:\\Test\\"] }
Expand Down

0 comments on commit 99e7402

Please sign in to comment.