Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test adapter loading strategy #3380

Merged
merged 10 commits into from
Feb 18, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Code formatting, and localization typos fixed.
  • Loading branch information
Haplois committed Feb 17, 2022
commit b58979fb848d9420ed5b5215803063ccd44b303f
Original file line number Diff line number Diff line change
@@ -1,47 +1,46 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace Microsoft.VisualStudio.TestPlatform.ObjectModel;

using System;

namespace Microsoft.VisualStudio.TestPlatform.ObjectModel
/// <summary>
/// Represents a loading strategy
/// </summary>
[Flags]
internal enum TestAdapterLoadingStrategy
Haplois marked this conversation as resolved.
Show resolved Hide resolved
{
/// <summary>
/// Represents a loading strategy
/// A strategy not defined, Test Platform will load adapters normally.
/// </summary>
Default = 0b0000_0000_0000_0000,

/// <summary>
/// Test Platform will only load adapters specified by /TestAdapterPath (or RunConfiguration.TestAdaptersPaths node).
/// If a specific adapter path is provided, adapter will be loaded; if a directory path is provided adapters directly in that folder will be loaded.
/// If no adapter path is specified, test run will fail.
/// This will imply /InIsolation switch and force the tests to be run in an isolated process.
/// </summary>
Explicit = 0b0000_0000_0000_0001,

/// <summary>
/// Load adapters next to source.
/// </summary>
NextToSource = 0b0000_0000_0000_0010,

/// <summary>
/// Default runtime providers inside Extensions folder will be included
Haplois marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
DefaultRuntimeProviders = 0b0000_0000_0000_0100,

/// <summary>
/// Load adapters inside Extensions folder.
/// </summary>
ExtensionsDirectory = 0b0000_0000_0000_1000,

/// <summary>
/// Directory wide searches will be recursive, this is required to be with with NextToSource or Explicit.
Haplois marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
[Flags]
internal enum TestAdapterLoadingStrategy
{
/// <summary>
/// A strategy not defined, Test Platform will load adapters normally.
/// </summary>
Default = 0b0000_0000_0000_0000,

/// <summary>
/// Test Platform will only load adapters specified by /TestAdapterPath (or RunConfiguration.TestAdaptersPaths node).
/// If a specific adapter path is provided, adapter will be loaded; if a directory path is provided adapters directly in that folder will be loaded.
/// If no adapter path is specified, test run will fail.
/// This will imply /InIsolation switch and force the tests to be run in an isolated process.
/// </summary>
Explicit = 0b0000_0000_0000_0001,

/// <summary>
/// Load adapters next to source.
/// </summary>
NextToSource = 0b0000_0000_0000_0010,

/// <summary>
/// Default runtime providers inside Extensions folder will be included
/// </summary>
DefaultRuntimeProviders = 0b0000_0000_0000_0100,

/// <summary>
/// Load adapters inside Extensions folder.
/// </summary>
ExtensionsDirectory = 0b0000_0000_0000_1000,

/// <summary>
/// Directory wide searches will be recursive, this is required to be with with NextToSource or Explicit.
/// </summary>
Recursive = 0b0001_0000_0000_0000,
}
Recursive = 0b0001_0000_0000_0000,
Haplois marked this conversation as resolved.
Show resolved Hide resolved
}
Loading