Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 11 additions & 0 deletions .github/workflows/functional-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,17 @@ jobs:
run-id: ${{ inputs.vfs_run_id || github.run_id }}
github-token: ${{ secrets.vfs_token || github.token }}

- name: Download FastFetch drop
if: steps.skip.outputs.result != 'true'
continue-on-error: true
uses: actions/download-artifact@v8
with:
name: FastFetch_${{ matrix.configuration }}
path: ft
repository: ${{ inputs.vfs_repository || github.repository }}
run-id: ${{ inputs.vfs_run_id || github.run_id }}
github-token: ${{ secrets.vfs_token || github.token }}

- name: ProjFS details (pre-install)
if: steps.skip.outputs.result != 'true'
shell: cmd
Expand Down
5 changes: 2 additions & 3 deletions AuthoringTests.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ The functional tests are built on NUnit 3, which is available as a set of NuGet

#### Selecting Which Tests are Run

By default, the functional tests run a subset of tests as a quick smoke test for developers. There are three mutually exclusive arguments that can be passed to the functional tests to change this behavior:
By default, the functional tests run all tests. There are two mutually exclusive arguments that can be passed to the functional tests to change this behavior:

- `--full-suite`: Run all configurations of all functional tests
- `--extra-only`: Run only those tests marked as "ExtraCoverage" (i.e. the tests that are not run by default)
- `--full-suite`: Run all configurations of all functional tests (tests all `ValidateWorkingTreeMode` values and all `FileSystemRunner` types)
- `--windows-only`: Run only the tests marked as being Windows specific

**NOTE** `Scripts\RunFunctionalTests.bat` already uses some of these arguments. If you run the tests using `RunFunctionalTests.bat` consider locally modifying the script rather than passing these flags as arguments to the script.
Expand Down
3 changes: 1 addition & 2 deletions GVFS/GVFS.FunctionalTests/Categories.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
{
public static class Categories
{
public const string ExtraCoverage = "ExtraCoverage";
public const string FastFetch = "FastFetch";
public const string GitCommands = "GitCommands";
public const string NeedsReactionInCI = "NeedsReactionInCI";
public const string SkipInCI = "SkipInCI";
}
}
12 changes: 1 addition & 11 deletions GVFS/GVFS.FunctionalTests/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,21 +84,11 @@ public static void Main(string[] args)
new object[] { validateMode },
};

if (runner.HasCustomArg("--extra-only"))
{
Console.WriteLine("Running only the tests marked as ExtraCoverage");
includeCategories.Add(Categories.ExtraCoverage);
}
else
{
excludeCategories.Add(Categories.ExtraCoverage);
}

// If we're running in CI exclude tests that are currently
// flakey or broken when run in a CI environment.
if (runner.HasCustomArg("--ci"))
{
excludeCategories.Add(Categories.NeedsReactionInCI);
excludeCategories.Add(Categories.SkipInCI);
}

GVFSTestConfig.FileSystemRunners = FileSystemRunners.FileSystemRunner.DefaultRunners;
Expand Down
20 changes: 20 additions & 0 deletions GVFS/GVFS.FunctionalTests/SkipInCIAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using NUnit.Framework;

namespace GVFS.FunctionalTests
{
/// <summary>
/// Marks a test or fixture to be skipped in CI (when --ci is passed).
/// Use the <see cref="Reason"/> property to document why the test is
/// skipped so it can be triaged and fixed later.
/// </summary>
public class SkipInCIAttribute : CategoryAttribute
{
public SkipInCIAttribute(string reason)
: base("SkipInCI")
{
this.Reason = reason;
}

public string Reason { get; }
}
}
1 change: 0 additions & 1 deletion GVFS/GVFS.FunctionalTests/Tests/DiskLayoutVersionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
namespace GVFS.FunctionalTests.Tests
{
[TestFixture]
[Category(Categories.ExtraCoverage)]
public class DiskLayoutVersionTests : TestsWithEnlistmentPerTestCase
{
private const int CurrentDiskLayoutMinorVersion = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture
{
[TestFixture]
[Category(Categories.ExtraCoverage)]
public class CacheServerTests : TestsWithEnlistmentPerFixture
{
private const string CustomUrl = "https://myCache";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture
{
[TestFixture]
[Category(Categories.ExtraCoverage)]
[SkipInCI("Atrophied: folder dehydrate behavior changed, expectations need updating")]
public class DehydrateTests : TestsWithEnlistmentPerFixture
{
private const string FolderDehydrateSuccessfulMessage = "folder dehydrate successful.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture
{
[TestFixture]
[NonParallelizable]
[Category(Categories.ExtraCoverage)]
public class DiagnoseTests : TestsWithEnlistmentPerFixture
{
private FileSystemRunner fileSystem;
Expand Down

This file was deleted.

Loading
Loading