From a79f72a72c32f67a1ba2189dd22814ee388aaba7 Mon Sep 17 00:00:00 2001 From: Petr Date: Mon, 6 Mar 2023 16:11:04 +0100 Subject: [PATCH 1/7] Revert "Update Build.ps1" This reverts commit 4ce754545f593f27a036ba9b6f03d91d67cdc94a. --- eng/Build.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eng/Build.ps1 b/eng/Build.ps1 index 075d8cdf5ed..5e3e1ee47ad 100644 --- a/eng/Build.ps1 +++ b/eng/Build.ps1 @@ -620,6 +620,10 @@ try { TestUsingNUnit -testProject "$RepoRoot\vsintegration\tests\UnitTests\VisualFSharp.UnitTests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\VisualFSharp.UnitTests\" TestUsingXUnit -testProject "$RepoRoot\vsintegration\tests\FSharp.Editor.Tests\FSharp.Editor.Tests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Editor.Tests\FSharp.Editor.Tests.fsproj" } + + if ($testIntegration) { + TestUsingXUnit -testProject "$RepoRoot\vsintegration\tests\FSharp.Editor.IntegrationTests\FSharp.Editor.IntegrationTests.csproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Editor.IntegrationTests\" + } # verify nupkgs have access to the source code $nupkgtestFailed = $false From be158436a87a24d670726b439c3aabadcabb4885 Mon Sep 17 00:00:00 2001 From: Petr Date: Mon, 6 Mar 2023 16:11:07 +0100 Subject: [PATCH 2/7] Revert "Disable integrtation tests (#14839)" This reverts commit 0b29f662c62298a7c58dee72fe70ebdb3a4cc4fa. --- azure-pipelines.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ca18d32ab22..025dba1856d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -346,11 +346,17 @@ stages: vs_release: _configuration: Release _testKind: testVs - + inttests_release: + _configuration: Release + _testKind: testIntegration steps: - checkout: self clean: true + - powershell: eng\SetupVSHive.ps1 + displayName: Setup VS Hive + condition: or(eq(variables['_testKind'], 'testVs'), eq(variables['_testKind'], 'testIntegration')) + - script: eng\CIBuild.cmd -compressallmetadata -configuration $(_configuration) -$(_testKind) displayName: Build / Test - task: PublishTestResults@2 From 275168c06d89c509fac1f00b634682b23049ecb2 Mon Sep 17 00:00:00 2001 From: Petr Date: Mon, 6 Mar 2023 16:27:46 +0100 Subject: [PATCH 3/7] Update azure-pipelines.yml --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 025dba1856d..7a450f5dd3c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -346,6 +346,7 @@ stages: vs_release: _configuration: Release _testKind: testVs + ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: inttests_release: _configuration: Release _testKind: testIntegration From f67fd7375989a09a3195668343b3ede26c05a51b Mon Sep 17 00:00:00 2001 From: Petr Date: Mon, 6 Mar 2023 16:36:55 +0100 Subject: [PATCH 4/7] Update azure-pipelines.yml --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7a450f5dd3c..caccf12f68d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -346,7 +346,7 @@ stages: vs_release: _configuration: Release _testKind: testVs - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: + ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: inttests_release: _configuration: Release _testKind: testIntegration From 067e1f0b707eabde977349dcaa7373a71000e905 Mon Sep 17 00:00:00 2001 From: Petr Date: Mon, 6 Mar 2023 16:41:14 +0100 Subject: [PATCH 5/7] Update azure-pipelines.yml --- azure-pipelines.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index caccf12f68d..3dd47ae6774 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -346,10 +346,10 @@ stages: vs_release: _configuration: Release _testKind: testVs - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: - inttests_release: - _configuration: Release - _testKind: testIntegration + ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: + inttests_release: + _configuration: Release + _testKind: testIntegration steps: - checkout: self clean: true From 5fe333ca0014296880da293bcaeefbb553ed0594 Mon Sep 17 00:00:00 2001 From: Petr Date: Mon, 6 Mar 2023 18:54:09 +0100 Subject: [PATCH 6/7] up --- .vscode/tasks.json | 4 ++-- DEVGUIDE.md | 1 + TESTGUIDE.md | 1 + azure-pipelines.yml | 2 +- eng/Build.ps1 | 10 ++++++++++ 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 6439f9210a4..b20a77fcc8d 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -77,11 +77,11 @@ "group": "build" }, { - "label": "Run tests (all)", + "label": "Run tests (all but integration)", "command": "./build.sh", "type": "shell", "args": [ - "-testAll" + "-testAllButIntegration" ], "windows": { "command": "${workspaceFolder}/Build.cmd", diff --git a/DEVGUIDE.md b/DEVGUIDE.md index 39acc63cf23..bf87db92322 100644 --- a/DEVGUIDE.md +++ b/DEVGUIDE.md @@ -108,6 +108,7 @@ You can find all test options as separate flags. For example `build -testAll`: ```shell -testAll Run all tests + -testAllButIntegration Run all but integration tests -testCambridge Run Cambridge tests -testCompiler Run FSharpCompiler unit tests -testCompilerService Run FSharpCompilerService unit tests diff --git a/TESTGUIDE.md b/TESTGUIDE.md index 93972f7e144..77093336065 100644 --- a/TESTGUIDE.md +++ b/TESTGUIDE.md @@ -41,6 +41,7 @@ build -testAll -c Release | testScripting | Windows | Runs scripting fsx and fsi commandline tests | | test | Windows | Same as testDesktop | | testAll | Windows | Runs all above tests | +| testAllButIntegration | Windows | Runs all minus integration tests | Some test groups can only be run in `CI` configuration, for that, you need to pass the `-ci -bl` or `-ci -nobl` arguments. Some test groups can only be run in Release mode, this is indicated below. Some tests can only be run on Windows. diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3dd47ae6774..df8e2173833 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -124,7 +124,7 @@ stages: - script: eng\CIBuild.cmd -configuration $(_BuildConfig) -prepareMachine - -testAll + -testAllButIntegration -officialSkipTests $(SkipTests) /p:SignType=$(_SignType) /p:DotNetSignType=$(_SignType) diff --git a/eng/Build.ps1 b/eng/Build.ps1 index 5e3e1ee47ad..913b7b9229e 100644 --- a/eng/Build.ps1 +++ b/eng/Build.ps1 @@ -95,6 +95,7 @@ function Print-Usage() { Write-Host "" Write-Host "Test actions" Write-Host " -testAll Run all tests" + Write-Host " -testAllButIntegration Run all but integration tests" Write-Host " -testCambridge Run Cambridge tests" Write-Host " -testCompiler Run FSharpCompiler unit tests" Write-Host " -testCompilerService Run FSharpCompilerService unit tests" @@ -148,8 +149,17 @@ function Process-Arguments() { $script:testVs = $True } + if ($testAllButIntegration) { + $script:testDesktop = $True + $script:testCoreClr = $True + $script:testFSharpQA = $True + $script:testIntegration = $False + $script:testVs = $True + } + if ([System.Boolean]::Parse($script:officialSkipTests)) { $script:testAll = $False + $script:testAllButIntegration = $False $script:testCambridge = $False $script:testCompiler = $False $script:testCompilerService = $False From 5d0beac485772560579859a6c410c0768f3aba68 Mon Sep 17 00:00:00 2001 From: Petr Date: Mon, 6 Mar 2023 19:19:18 +0100 Subject: [PATCH 7/7] Update Build.ps1 --- eng/Build.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/Build.ps1 b/eng/Build.ps1 index 913b7b9229e..be7ae7de99c 100644 --- a/eng/Build.ps1 +++ b/eng/Build.ps1 @@ -59,6 +59,7 @@ param ( [switch]$testScripting, [switch]$testVs, [switch]$testAll, + [switch]$testAllButIntegration, [switch]$testpack, [string]$officialSkipTests = "false", [switch]$noVisualStudio,