From 18abe3b2ecd707c1c9ff640954b58b8176c88130 Mon Sep 17 00:00:00 2001 From: William Baker Date: Thu, 8 Aug 2019 14:59:00 -0700 Subject: [PATCH 1/3] Enable an initial set of functional tests and standup Mac Functional Test Pipeline - Add 'SupportsGVFSService' under construction flag, and only attempt to register/unregister when it's true - Add a new 'NeedsUpdatesForNonVirtualizedMode' category to functional tests - Update functional tests to run all tests not flagged with 'NeedsUpdatesForNonVirtualizedMode' - Update pipelines to run Mac functional tests --- .azure-pipelines/pull-request.yml | 16 ++++++++++++++- .../templates/macos-build-and-unit-test.yml | 20 +++++++++---------- .../templates/macos-functional-test.yml | 12 +++++------ GVFS/GVFS.Common/GVFSPlatform.cs | 5 ++++- GVFS/GVFS.FunctionalTests/Categories.cs | 2 ++ GVFS/GVFS.FunctionalTests/Program.cs | 6 ++++++ .../Tests/DiskLayoutVersionTests.cs | 1 + .../EnlistmentPerFixture/CacheServerTests.cs | 1 + .../EnlistmentPerFixture/DiagnoseTests.cs | 1 + .../GVFSUpgradeReminderTests.cs | 1 + .../GitCorruptObjectTests.cs | 1 + .../GitMoveRenameTests.cs | 1 + .../Tests/EnlistmentPerFixture/MountTests.cs | 1 + .../PackfileMaintenanceStepTests.cs | 1 + .../EnlistmentPerFixture/PrefetchVerbTests.cs | 1 + .../PrefetchVerbWithoutSharedCacheTests.cs | 1 + .../Tests/EnlistmentPerFixture/SparseTests.cs | 1 + .../EnlistmentPerFixture/StatusVerbTests.cs | 1 + .../EnlistmentPerFixture/SymbolicLinkTests.cs | 1 + .../EnlistmentPerFixture/UnmountTests.cs | 1 + .../CaseOnlyFolderRenameTests.cs | 1 + .../LooseObjectStepTests.cs | 1 + .../EnlistmentPerTestCase/RepairTests.cs | 1 + .../Tests/GitCommands/AddStageTests.cs | 1 + .../GitCommands/CherryPickConflictTests.cs | 1 + .../GitCommands/DeleteEmptyFolderTests.cs | 1 + .../Tests/GitCommands/EnumerationMergeTest.cs | 1 + .../Tests/GitCommands/GitCommandsTests.cs | 1 + .../Tests/GitCommands/MergeConflictTests.cs | 1 + .../Tests/GitCommands/RebaseConflictTests.cs | 1 + .../Tests/GitCommands/RebaseTests.cs | 1 + .../Tests/GitCommands/ResetHardTests.cs | 1 + .../Tests/GitCommands/ResetMixedTests.cs | 1 + .../Tests/GitCommands/ResetSoftTests.cs | 1 + .../Tests/GitCommands/StatusTests.cs | 3 ++- .../Tests/GitCommands/UpdateIndexTests.cs | 1 + .../Tests/GitCommands/UpdateRefTests.cs | 1 + .../MultiEnlistmentTests/ConfigVerbTests.cs | 1 + .../MultiEnlistmentTests/ServiceVerbTests.cs | 1 + .../MultiEnlistmentTests/SharedCacheTests.cs | 1 + GVFS/GVFS/CommandLine/MountVerb.cs | 2 +- GVFS/GVFS/CommandLine/UnmountVerb.cs | 2 +- 42 files changed, 80 insertions(+), 21 deletions(-) diff --git a/.azure-pipelines/pull-request.yml b/.azure-pipelines/pull-request.yml index b7f66cd957..b094997676 100644 --- a/.azure-pipelines/pull-request.yml +++ b/.azure-pipelines/pull-request.yml @@ -21,8 +21,22 @@ jobs: steps: - template: templates/windows-build-and-unit-test.yml - - job: macOS + - job: macOS_Build_and_UnitTests + variables: + platformFriendlyName: macOS pool: name: 'Hosted macOS' steps: - template: templates/macos-build-and-unit-test.yml + + - job: macOS_FunctionalTests + variables: + platformFriendlyName: macOS + timeoutInMinutes: 240 + pool: + name: 'Hosted macOS' + dependsOn: macOS_Build_and_UnitTests + condition: succeeded() + steps: + - checkout: none # Use the drop from Build_macOS job + - template: templates/macos-functional-test.yml \ No newline at end of file diff --git a/.azure-pipelines/templates/macos-build-and-unit-test.yml b/.azure-pipelines/templates/macos-build-and-unit-test.yml index a89c46f3d1..77fd2e89d4 100644 --- a/.azure-pipelines/templates/macos-build-and-unit-test.yml +++ b/.azure-pipelines/templates/macos-build-and-unit-test.yml @@ -25,14 +25,14 @@ steps: publishRunAttachments: true condition: succeededOrFailed() - #- script: Scripts/Mac/CI/CreateBuildDrop.sh $(configuration) $(Build.ArtifactStagingDirectory)/Tests - # displayName: Create functional test drop. + - script: Scripts/Mac/CI/CreateBuildDrop.sh $(configuration) $(Build.ArtifactStagingDirectory)/Tests + displayName: Create functional test drop. - #- task: PublishBuildArtifacts@1 - # displayName: Publish functional test drop artifact. - # inputs: - # pathtoPublish: $(Build.ArtifactStagingDirectory)/Tests - # artifactName: "FunctionalTests_$(platformFriendlyName)_$(configuration)" - # parallel: true - # parallelCount: 8 - # condition: succeededOrFailed() + - task: PublishBuildArtifacts@1 + displayName: Publish functional test drop artifact. + inputs: + pathtoPublish: $(Build.ArtifactStagingDirectory)/Tests + artifactName: "FunctionalTests_$(platformFriendlyName)_$(configuration)" + parallel: true + parallelCount: 8 + condition: succeededOrFailed() diff --git a/.azure-pipelines/templates/macos-functional-test.yml b/.azure-pipelines/templates/macos-functional-test.yml index d767b13b7a..03ee943b57 100644 --- a/.azure-pipelines/templates/macos-functional-test.yml +++ b/.azure-pipelines/templates/macos-functional-test.yml @@ -6,6 +6,12 @@ steps: packageType: sdk version: '2.1.301' + - task: InstallAppleCertificate@2 + displayName: 'Install Apple certificate' + inputs: + certSecureFile: 'PrjFSKextCertExpiresJun6_2020_v2.p12' + certPwd: '$(kext.certificate.password)' + - bash: rm -rf $(Build.BinariesDirectory)/FunctionalTests_$(platformFriendlyName)_$(configuration)/BuildOutput/Git/* displayName: Clean previous Git installations @@ -45,12 +51,6 @@ steps: displayName: Cleanup condition: always() - - task: PublishBuildArtifacts@1 - displayName: Publish kext logs - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory)/kext.log - artifactName: kext.log - - bash: sudo rm -rf $(Build.BinariesDirectory)/FunctionalTests_$(platformFriendlyName)_$(configuration) displayName: Cleanup phase 2 condition: always() diff --git a/GVFS/GVFS.Common/GVFSPlatform.cs b/GVFS/GVFS.Common/GVFSPlatform.cs index f12b759c5a..4f0f196c5d 100644 --- a/GVFS/GVFS.Common/GVFSPlatform.cs +++ b/GVFS/GVFS.Common/GVFSPlatform.cs @@ -185,16 +185,19 @@ public class UnderConstructionFlags public UnderConstructionFlags( bool supportsGVFSUpgrade = true, bool supportsGVFSConfig = true, - bool supportsNuGetEncryption = true) + bool supportsNuGetEncryption = true, + bool supportsGVFSService = false) { this.SupportsGVFSUpgrade = supportsGVFSUpgrade; this.SupportsGVFSConfig = supportsGVFSConfig; this.SupportsNuGetEncryption = supportsNuGetEncryption; + this.SupportsGVFSService = supportsGVFSService; } public bool SupportsGVFSUpgrade { get; } public bool SupportsGVFSConfig { get; } public bool SupportsNuGetEncryption { get; } + public bool SupportsGVFSService { get; } } } } diff --git a/GVFS/GVFS.FunctionalTests/Categories.cs b/GVFS/GVFS.FunctionalTests/Categories.cs index ea7c1470a7..3a9b024b49 100644 --- a/GVFS/GVFS.FunctionalTests/Categories.cs +++ b/GVFS/GVFS.FunctionalTests/Categories.cs @@ -9,6 +9,8 @@ public static class Categories public const string WindowsOnly = "WindowsOnly"; public const string MacOnly = "MacOnly"; + public const string NeedsUpdatesForNonVirtualizedMode = "NeedsUpdatesForNonVirtualizedMode"; + public static class MacTODO { // Tests that require #360 (detecting/handling new empty folders) diff --git a/GVFS/GVFS.FunctionalTests/Program.cs b/GVFS/GVFS.FunctionalTests/Program.cs index 1b765fd4c3..2799b4da13 100644 --- a/GVFS/GVFS.FunctionalTests/Program.cs +++ b/GVFS/GVFS.FunctionalTests/Program.cs @@ -109,6 +109,12 @@ public static void Main(string[] args) excludeCategories.Add(Categories.MacOnly); } + // For now, run all of the tests not flagged as needing to be updated to work + // with the non-virtualized solution + includeCategories.Clear(); + excludeCategories.Clear(); + excludeCategories.Add(Categories.NeedsUpdatesForNonVirtualizedMode); + GVFSTestConfig.DotGVFSRoot = RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? ".vfsforgit" : ".gvfs"; GVFSTestConfig.RepoToClone = diff --git a/GVFS/GVFS.FunctionalTests/Tests/DiskLayoutVersionTests.cs b/GVFS/GVFS.FunctionalTests/Tests/DiskLayoutVersionTests.cs index d9c3e7865c..83f4d30811 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/DiskLayoutVersionTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/DiskLayoutVersionTests.cs @@ -8,6 +8,7 @@ namespace GVFS.FunctionalTests.Tests { [TestFixture] [Category(Categories.ExtraCoverage)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class DiskLayoutVersionTests : TestsWithEnlistmentPerTestCase { private const int WindowsCurrentDiskLayoutMajorVersion = 0; diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/CacheServerTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/CacheServerTests.cs index b5f7af3a98..ac0146cac4 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/CacheServerTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/CacheServerTests.cs @@ -6,6 +6,7 @@ namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture { [TestFixture] [Category(Categories.ExtraCoverage)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class CacheServerTests : TestsWithEnlistmentPerFixture { private const string CustomUrl = "https://myCache"; diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/DiagnoseTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/DiagnoseTests.cs index 06c8713792..a8030d0474 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/DiagnoseTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/DiagnoseTests.cs @@ -10,6 +10,7 @@ namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture [TestFixture] [NonParallelizable] [Category(Categories.ExtraCoverage)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class DiagnoseTests : TestsWithEnlistmentPerFixture { private FileSystemRunner fileSystem; diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GVFSUpgradeReminderTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GVFSUpgradeReminderTests.cs index 31e84fedb0..b36e65f10d 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GVFSUpgradeReminderTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GVFSUpgradeReminderTests.cs @@ -14,6 +14,7 @@ namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture [NonParallelizable] [Category(Categories.ExtraCoverage)] [Category(Categories.WindowsOnly)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class UpgradeReminderTests : TestsWithEnlistmentPerFixture { private const string HighestAvailableVersionFileName = "HighestAvailableVersion"; diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitCorruptObjectTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitCorruptObjectTests.cs index 8bcc80455d..dbb87dd1fa 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitCorruptObjectTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitCorruptObjectTests.cs @@ -11,6 +11,7 @@ namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture { [TestFixture] [Category(Categories.GitCommands)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class GitCorruptObjectTests : TestsWithEnlistmentPerFixture { private FileSystemRunner fileSystem; diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitMoveRenameTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitMoveRenameTests.cs index b106876ec0..1a3cab7e2d 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitMoveRenameTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitMoveRenameTests.cs @@ -12,6 +12,7 @@ namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture { [TestFixtureSource(typeof(FileSystemRunner), nameof(FileSystemRunner.Runners))] [Category(Categories.GitCommands)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class GitMoveRenameTests : TestsWithEnlistmentPerFixture { private string testFileContents = "0123456789"; diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/MountTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/MountTests.cs index 9b0c0930a1..1f7fe42ddc 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/MountTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/MountTests.cs @@ -14,6 +14,7 @@ namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture { [TestFixture] [Category(Categories.ExtraCoverage)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class MountTests : TestsWithEnlistmentPerFixture { private const int GVFSGenericError = 3; diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PackfileMaintenanceStepTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PackfileMaintenanceStepTests.cs index f3a4f530a7..d830e9a017 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PackfileMaintenanceStepTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PackfileMaintenanceStepTests.cs @@ -9,6 +9,7 @@ namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture { [TestFixture] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class PackfileMaintenanceStepTests : TestsWithEnlistmentPerFixture { private FileSystemRunner fileSystem; diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PrefetchVerbTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PrefetchVerbTests.cs index 396d2b8f7e..97dde871fe 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PrefetchVerbTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PrefetchVerbTests.cs @@ -12,6 +12,7 @@ namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture { [TestFixture] [NonParallelizable] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class PrefetchVerbTests : TestsWithEnlistmentPerFixture { private const string PrefetchCommitsAndTreesLock = "prefetch-commits-trees.lock"; diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PrefetchVerbWithoutSharedCacheTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PrefetchVerbWithoutSharedCacheTests.cs index d94fe70376..540d41f616 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PrefetchVerbWithoutSharedCacheTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PrefetchVerbWithoutSharedCacheTests.cs @@ -14,6 +14,7 @@ namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture [TestFixture] [Category(Categories.ExtraCoverage)] [Category(Categories.MacTODO.TestNeedsToLockFile)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class PrefetchVerbWithoutSharedCacheTests : TestsWithEnlistmentPerFixture { private const string PrefetchPackPrefix = "prefetch"; diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/SparseTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/SparseTests.cs index 7dba0c68f9..9d24970d1b 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/SparseTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/SparseTests.cs @@ -10,6 +10,7 @@ namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture { [TestFixture] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class SparseTests : TestsWithEnlistmentPerFixture { private FileSystemRunner fileSystem = new SystemIORunner(); diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/StatusVerbTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/StatusVerbTests.cs index f7def18b94..811c3d4113 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/StatusVerbTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/StatusVerbTests.cs @@ -7,6 +7,7 @@ namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture { [TestFixture] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class StatusVerbTests : TestsWithEnlistmentPerFixture { [TestCase] diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/SymbolicLinkTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/SymbolicLinkTests.cs index 465215ffc1..e38a5916c0 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/SymbolicLinkTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/SymbolicLinkTests.cs @@ -9,6 +9,7 @@ namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture { // MacOnly until issue #297 (add SymLink support for Windows) is complete [Category(Categories.MacOnly)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] [TestFixture] public class SymbolicLinkTests : TestsWithEnlistmentPerFixture { diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/UnmountTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/UnmountTests.cs index 9a68755bf3..881385b47d 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/UnmountTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/UnmountTests.cs @@ -10,6 +10,7 @@ namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture { [TestFixture] [Category(Categories.ExtraCoverage)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class UnmountTests : TestsWithEnlistmentPerFixture { private FileSystemRunner fileSystem; diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/CaseOnlyFolderRenameTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/CaseOnlyFolderRenameTests.cs index 3c4a9fc0c5..1a312f6a2a 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/CaseOnlyFolderRenameTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/CaseOnlyFolderRenameTests.cs @@ -8,6 +8,7 @@ namespace GVFS.FunctionalTests.Tests.EnlistmentPerTestCase { [TestFixture] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class CaseOnlyFolderRenameTests : TestsWithEnlistmentPerTestCase { private FileSystemRunner fileSystem; diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/LooseObjectStepTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/LooseObjectStepTests.cs index 5a14879b50..605dcaaba0 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/LooseObjectStepTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/LooseObjectStepTests.cs @@ -10,6 +10,7 @@ namespace GVFS.FunctionalTests.Tests.EnlistmentPerTestCase { [TestFixture] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class LooseObjectStepTests : TestsWithEnlistmentPerTestCase { private const string TempPackFolder = "tempPacks"; diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/RepairTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/RepairTests.cs index 97ab601f4c..f29e5a4023 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/RepairTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/RepairTests.cs @@ -11,6 +11,7 @@ namespace GVFS.FunctionalTests.Tests.EnlistmentPerTestCase { [TestFixture] [Category(Categories.ExtraCoverage)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class RepairTests : TestsWithEnlistmentPerTestCase { [TestCase] diff --git a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/AddStageTests.cs b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/AddStageTests.cs index 9d18b94fdf..769fc65122 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/AddStageTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/AddStageTests.cs @@ -8,6 +8,7 @@ namespace GVFS.FunctionalTests.Tests.GitCommands { [TestFixtureSource(typeof(GitRepoTests), nameof(GitRepoTests.ValidateWorkingTree))] [Category(Categories.GitCommands)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class AddStageTests : GitRepoTests { public AddStageTests(Settings.ValidateWorkingTreeMode validateWorkingTree) diff --git a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/CherryPickConflictTests.cs b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/CherryPickConflictTests.cs index f6e508a798..f67b4185cc 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/CherryPickConflictTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/CherryPickConflictTests.cs @@ -5,6 +5,7 @@ namespace GVFS.FunctionalTests.Tests.GitCommands { [TestFixtureSource(typeof(GitRepoTests), nameof(GitRepoTests.ValidateWorkingTree))] [Category(Categories.GitCommands)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class CherryPickConflictTests : GitRepoTests { public CherryPickConflictTests(Settings.ValidateWorkingTreeMode validateWorkingTree) diff --git a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/DeleteEmptyFolderTests.cs b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/DeleteEmptyFolderTests.cs index e7556d5694..1e4d5c6c46 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/DeleteEmptyFolderTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/DeleteEmptyFolderTests.cs @@ -6,6 +6,7 @@ namespace GVFS.FunctionalTests.Tests.GitCommands { [TestFixtureSource(typeof(GitRepoTests), nameof(GitRepoTests.ValidateWorkingTree))] [Category(Categories.GitCommands)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class DeleteEmptyFolderTests : GitRepoTests { public DeleteEmptyFolderTests(Settings.ValidateWorkingTreeMode validateWorkingTree) diff --git a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/EnumerationMergeTest.cs b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/EnumerationMergeTest.cs index 46b7e1a3ee..3d1a16540f 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/EnumerationMergeTest.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/EnumerationMergeTest.cs @@ -5,6 +5,7 @@ namespace GVFS.FunctionalTests.Tests.GitCommands { [TestFixtureSource(typeof(GitRepoTests), nameof(GitRepoTests.ValidateWorkingTree))] [Category(Categories.GitCommands)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class EnumerationMergeTest : GitRepoTests { // Commit that found GvFlt Bug 12258777: Entries are sometimes skipped during diff --git a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/GitCommandsTests.cs b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/GitCommandsTests.cs index b83db0d344..63624617f4 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/GitCommandsTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/GitCommandsTests.cs @@ -11,6 +11,7 @@ namespace GVFS.FunctionalTests.Tests.GitCommands { [TestFixtureSource(typeof(GitRepoTests), nameof(GitRepoTests.ValidateWorkingTree))] [Category(Categories.GitCommands)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class GitCommandsTests : GitRepoTests { public const string TopLevelFolderToCreate = "level1"; diff --git a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/MergeConflictTests.cs b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/MergeConflictTests.cs index a602462e97..4d86e8930d 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/MergeConflictTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/MergeConflictTests.cs @@ -7,6 +7,7 @@ namespace GVFS.FunctionalTests.Tests.GitCommands { [TestFixtureSource(typeof(GitRepoTests), nameof(GitRepoTests.ValidateWorkingTree))] [Category(Categories.GitCommands)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class MergeConflictTests : GitRepoTests { public MergeConflictTests(Settings.ValidateWorkingTreeMode validateWorkingTree) diff --git a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/RebaseConflictTests.cs b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/RebaseConflictTests.cs index 14282c8edf..0b6434093f 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/RebaseConflictTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/RebaseConflictTests.cs @@ -5,6 +5,7 @@ namespace GVFS.FunctionalTests.Tests.GitCommands { [TestFixtureSource(typeof(GitRepoTests), nameof(GitRepoTests.ValidateWorkingTree))] [Category(Categories.GitCommands)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class RebaseConflictTests : GitRepoTests { public RebaseConflictTests(Settings.ValidateWorkingTreeMode validateWorkingTree) diff --git a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/RebaseTests.cs b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/RebaseTests.cs index 9b60773af8..b842f22c54 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/RebaseTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/RebaseTests.cs @@ -5,6 +5,7 @@ namespace GVFS.FunctionalTests.Tests.GitCommands { [TestFixtureSource(typeof(GitRepoTests), nameof(GitRepoTests.ValidateWorkingTree))] [Category(Categories.GitCommands)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class RebaseTests : GitRepoTests { public RebaseTests(Settings.ValidateWorkingTreeMode validateWorkingTree) diff --git a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/ResetHardTests.cs b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/ResetHardTests.cs index c41cc384d5..77e24de524 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/ResetHardTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/ResetHardTests.cs @@ -6,6 +6,7 @@ namespace GVFS.FunctionalTests.Tests.GitCommands { [TestFixtureSource(typeof(GitRepoTests), nameof(GitRepoTests.ValidateWorkingTree))] [Category(Categories.GitCommands)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class ResetHardTests : GitRepoTests { private const string ResetHardCommand = "reset --hard"; diff --git a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/ResetMixedTests.cs b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/ResetMixedTests.cs index 2d1e727a8a..aa0a8dcbb7 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/ResetMixedTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/ResetMixedTests.cs @@ -6,6 +6,7 @@ namespace GVFS.FunctionalTests.Tests.GitCommands { [TestFixtureSource(typeof(GitRepoTests), nameof(GitRepoTests.ValidateWorkingTree))] [Category(Categories.GitCommands)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class ResetMixedTests : GitRepoTests { public ResetMixedTests(Settings.ValidateWorkingTreeMode validateWorkingTree) diff --git a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/ResetSoftTests.cs b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/ResetSoftTests.cs index 064d874909..7eea5542af 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/ResetSoftTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/ResetSoftTests.cs @@ -5,6 +5,7 @@ namespace GVFS.FunctionalTests.Tests.GitCommands { [TestFixtureSource(typeof(GitRepoTests), nameof(GitRepoTests.ValidateWorkingTree))] [Category(Categories.GitCommands)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class ResetSoftTests : GitRepoTests { public ResetSoftTests(Settings.ValidateWorkingTreeMode validateWorkingTree) diff --git a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/StatusTests.cs b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/StatusTests.cs index bc5c776c25..dd393dd075 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/StatusTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/StatusTests.cs @@ -11,7 +11,8 @@ namespace GVFS.FunctionalTests.Tests.GitCommands { [TestFixtureSource(typeof(GitRepoTests), nameof(GitRepoTests.ValidateWorkingTree))] - [Category(Categories.GitCommands)] + [Category(Categories.GitCommands)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class StatusTests : GitRepoTests { public StatusTests(Settings.ValidateWorkingTreeMode validateWorkingTree) diff --git a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/UpdateIndexTests.cs b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/UpdateIndexTests.cs index b42d5c5281..21a70985b8 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/UpdateIndexTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/UpdateIndexTests.cs @@ -7,6 +7,7 @@ namespace GVFS.FunctionalTests.Tests.GitCommands { [TestFixtureSource(typeof(GitRepoTests), nameof(GitRepoTests.ValidateWorkingTree))] [Category(Categories.GitCommands)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class UpdateIndexTests : GitRepoTests { public UpdateIndexTests(Settings.ValidateWorkingTreeMode validateWorkingTree) diff --git a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/UpdateRefTests.cs b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/UpdateRefTests.cs index 48084b9d1a..52026419d4 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/UpdateRefTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/UpdateRefTests.cs @@ -5,6 +5,7 @@ namespace GVFS.FunctionalTests.Tests.GitCommands { [TestFixtureSource(typeof(GitRepoTests), nameof(GitRepoTests.ValidateWorkingTree))] [Category(Categories.GitCommands)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class UpdateRefTests : GitRepoTests { public UpdateRefTests(Settings.ValidateWorkingTreeMode validateWorkingTree) diff --git a/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/ConfigVerbTests.cs b/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/ConfigVerbTests.cs index 9881020af8..0f54c77086 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/ConfigVerbTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/ConfigVerbTests.cs @@ -11,6 +11,7 @@ namespace GVFS.FunctionalTests.Tests.MultiEnlistmentTests [TestFixture] [Category(Categories.ExtraCoverage)] [Category(Categories.MacTODO.NeedsGVFSConfig)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class ConfigVerbTests : TestsWithMultiEnlistment { private const string IntegerSettingKey = "functionalTest_Integer"; diff --git a/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/ServiceVerbTests.cs b/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/ServiceVerbTests.cs index afeb68b428..b776a1f082 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/ServiceVerbTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/ServiceVerbTests.cs @@ -8,6 +8,7 @@ namespace GVFS.FunctionalTests.Tests.MultiEnlistmentTests [NonParallelizable] [Category(Categories.ExtraCoverage)] [Category(Categories.MacTODO.NeedsServiceVerb)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class ServiceVerbTests : TestsWithMultiEnlistment { private static readonly string[] EmptyRepoList = new string[] { }; diff --git a/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/SharedCacheTests.cs b/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/SharedCacheTests.cs index d572c01d50..79a5083cb4 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/SharedCacheTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/SharedCacheTests.cs @@ -15,6 +15,7 @@ namespace GVFS.FunctionalTests.Tests.MultiEnlistmentTests { [TestFixture] [Category(Categories.ExtraCoverage)] + [Category(Categories.NeedsUpdatesForNonVirtualizedMode)] public class SharedCacheTests : TestsWithMultiEnlistment { private const string WellKnownFile = "Readme.md"; diff --git a/GVFS/GVFS/CommandLine/MountVerb.cs b/GVFS/GVFS/CommandLine/MountVerb.cs index 63c09e20c3..c15f791c87 100644 --- a/GVFS/GVFS/CommandLine/MountVerb.cs +++ b/GVFS/GVFS/CommandLine/MountVerb.cs @@ -173,7 +173,7 @@ protected override void Execute(GVFSEnlistment enlistment) this.ReportErrorAndExit(tracer, errorMessage); } - if (!this.Unattended) + if (!this.Unattended && GVFSPlatform.Instance.UnderConstruction.SupportsGVFSService) { tracer.RelatedInfo($"{nameof(this.Execute)}: Registering for automount"); diff --git a/GVFS/GVFS/CommandLine/UnmountVerb.cs b/GVFS/GVFS/CommandLine/UnmountVerb.cs index 8015e06e5d..4718db07f3 100644 --- a/GVFS/GVFS/CommandLine/UnmountVerb.cs +++ b/GVFS/GVFS/CommandLine/UnmountVerb.cs @@ -51,7 +51,7 @@ public override void Execute() this.ReportErrorAndExit(errorMessage); } - if (!this.Unattended && !this.SkipUnregister) + if (!this.Unattended && !this.SkipUnregister && GVFSPlatform.Instance.UnderConstruction.SupportsGVFSService) { if (!this.ShowStatusWhileRunning( () => { return this.UnregisterRepo(root, out errorMessage); }, From 0bd44c9c7676b204049277049dd1c70304e2d083 Mon Sep 17 00:00:00 2001 From: William Baker Date: Thu, 8 Aug 2019 16:42:18 -0700 Subject: [PATCH 2/3] Remove task to install Apple certificate from functional test yml --- .azure-pipelines/templates/macos-functional-test.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.azure-pipelines/templates/macos-functional-test.yml b/.azure-pipelines/templates/macos-functional-test.yml index 03ee943b57..747c3e6587 100644 --- a/.azure-pipelines/templates/macos-functional-test.yml +++ b/.azure-pipelines/templates/macos-functional-test.yml @@ -6,12 +6,6 @@ steps: packageType: sdk version: '2.1.301' - - task: InstallAppleCertificate@2 - displayName: 'Install Apple certificate' - inputs: - certSecureFile: 'PrjFSKextCertExpiresJun6_2020_v2.p12' - certPwd: '$(kext.certificate.password)' - - bash: rm -rf $(Build.BinariesDirectory)/FunctionalTests_$(platformFriendlyName)_$(configuration)/BuildOutput/Git/* displayName: Clean previous Git installations From c30507d2377a0f047cff7f4ea466fa8843b44405 Mon Sep 17 00:00:00 2001 From: William Baker Date: Thu, 8 Aug 2019 17:08:51 -0700 Subject: [PATCH 3/3] PR Feedback: Reduce functional test time limit to 30min and add newline --- .azure-pipelines/pull-request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/pull-request.yml b/.azure-pipelines/pull-request.yml index b094997676..11ffedb69e 100644 --- a/.azure-pipelines/pull-request.yml +++ b/.azure-pipelines/pull-request.yml @@ -32,11 +32,11 @@ jobs: - job: macOS_FunctionalTests variables: platformFriendlyName: macOS - timeoutInMinutes: 240 + timeoutInMinutes: 30 pool: name: 'Hosted macOS' dependsOn: macOS_Build_and_UnitTests condition: succeeded() steps: - checkout: none # Use the drop from Build_macOS job - - template: templates/macos-functional-test.yml \ No newline at end of file + - template: templates/macos-functional-test.yml