Skip to content

Commit 2934dd3

Browse files
authored
Merge pull request #1997 from tyrielv/tyrielv/remove-extra-coverage
Remove ExtraCoverage category — run all functional tests in CI
2 parents c379b4e + 151e3c4 commit 2934dd3

31 files changed

Lines changed: 267 additions & 468 deletions

.github/workflows/functional-tests.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
matrix:
6464
configuration: [ Debug, Release ]
6565
architecture: [ x86_64, arm64 ]
66-
nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] # 10 parallel jobs to speed up the tests
66+
nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] # 12 parallel jobs to speed up the tests
6767
fail-fast: false # most failures are flaky tests, no need to stop the other jobs from succeeding
6868

6969
steps:
@@ -142,6 +142,17 @@ jobs:
142142
run-id: ${{ inputs.vfs_run_id || github.run_id }}
143143
github-token: ${{ secrets.vfs_token || github.token }}
144144

145+
- name: Download FastFetch drop
146+
if: steps.skip.outputs.result != 'true'
147+
continue-on-error: true
148+
uses: actions/download-artifact@v8
149+
with:
150+
name: FastFetch_${{ matrix.configuration }}
151+
path: ft
152+
repository: ${{ inputs.vfs_repository || github.repository }}
153+
run-id: ${{ inputs.vfs_run_id || github.run_id }}
154+
github-token: ${{ secrets.vfs_token || github.token }}
155+
145156
- name: ProjFS details (pre-install)
146157
if: steps.skip.outputs.result != 'true'
147158
shell: cmd
@@ -193,7 +204,7 @@ jobs:
193204
run: |
194205
SET PATH=C:\Program Files\VFS for Git;%PATH%
195206
SET GIT_TRACE2_PERF=C:\temp\git-trace2.log
196-
ft\GVFS.FunctionalTests.exe /result:TestResult.xml --ci --slice=${{ matrix.nr }},10
207+
ft\GVFS.FunctionalTests.exe /result:TestResult.xml --ci --slice=${{ matrix.nr }},12
197208
198209
- name: Upload functional test results
199210
if: always() && steps.skip.outputs.result != 'true'

AuthoringTests.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ The functional tests are built on NUnit 3, which is available as a set of NuGet
4040

4141
#### Selecting Which Tests are Run
4242

43-
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:
43+
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:
4444

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

4948
**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.

GVFS/GVFS.Common/Database/SqliteDatabase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static bool HasIssue(string databasePath, PhysicalFileSystem filesystem,
2121

2222
try
2323
{
24-
string sqliteConnectionString = CreateConnectionString(databasePath);
24+
string sqliteConnectionString = $"data source={databasePath};Pooling=False";
2525
using (SqliteConnection integrityConnection = new SqliteConnection(sqliteConnectionString))
2626
{
2727
integrityConnection.Open();
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
namespace GVFS.Common.Database
2+
{
3+
/// <summary>
4+
/// SQLite result codes used for error classification.
5+
/// See https://www.sqlite.org/rescode.html
6+
/// </summary>
7+
public static class SqliteErrorCodes
8+
{
9+
/// <summary>SQLITE_CORRUPT (11) — database disk image is malformed</summary>
10+
public const int Corrupt = 11;
11+
12+
/// <summary>SQLITE_NOTADB (26) — file is not a database</summary>
13+
public const int NotADatabase = 26;
14+
}
15+
}

GVFS/GVFS.FunctionalTests/Categories.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
{
33
public static class Categories
44
{
5-
public const string ExtraCoverage = "ExtraCoverage";
65
public const string FastFetch = "FastFetch";
76
public const string GitCommands = "GitCommands";
8-
public const string NeedsReactionInCI = "NeedsReactionInCI";
7+
public const string SkipInCI = "SkipInCI";
98
}
109
}

GVFS/GVFS.FunctionalTests/Program.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,11 @@ public static void Main(string[] args)
8484
new object[] { validateMode },
8585
};
8686

87-
if (runner.HasCustomArg("--extra-only"))
88-
{
89-
Console.WriteLine("Running only the tests marked as ExtraCoverage");
90-
includeCategories.Add(Categories.ExtraCoverage);
91-
}
92-
else
93-
{
94-
excludeCategories.Add(Categories.ExtraCoverage);
95-
}
96-
9787
// If we're running in CI exclude tests that are currently
9888
// flakey or broken when run in a CI environment.
9989
if (runner.HasCustomArg("--ci"))
10090
{
101-
excludeCategories.Add(Categories.NeedsReactionInCI);
91+
excludeCategories.Add(Categories.SkipInCI);
10292
}
10393

10494
GVFSTestConfig.FileSystemRunners = FileSystemRunners.FileSystemRunner.DefaultRunners;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using NUnit.Framework;
2+
3+
namespace GVFS.FunctionalTests
4+
{
5+
/// <summary>
6+
/// Marks a test or fixture to be skipped in CI (when --ci is passed).
7+
/// Use the <see cref="Reason"/> property to document why the test is
8+
/// skipped so it can be triaged and fixed later.
9+
/// </summary>
10+
public class SkipInCIAttribute : CategoryAttribute
11+
{
12+
public SkipInCIAttribute(string reason)
13+
: base("SkipInCI")
14+
{
15+
this.Reason = reason;
16+
}
17+
18+
public string Reason { get; }
19+
}
20+
}

GVFS/GVFS.FunctionalTests/Tests/DiskLayoutVersionTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
namespace GVFS.FunctionalTests.Tests
88
{
99
[TestFixture]
10-
[Category(Categories.ExtraCoverage)]
1110
public class DiskLayoutVersionTests : TestsWithEnlistmentPerTestCase
1211
{
1312
private const int CurrentDiskLayoutMinorVersion = 0;

GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/CacheServerTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture
66
{
77
[TestFixture]
8-
[Category(Categories.ExtraCoverage)]
98
public class CacheServerTests : TestsWithEnlistmentPerFixture
109
{
1110
private const string CustomUrl = "https://myCache";

GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/DehydrateTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture
1515
{
1616
[TestFixture]
17-
[Category(Categories.ExtraCoverage)]
17+
[SkipInCI("Atrophied: folder dehydrate behavior changed, expectations need updating")]
1818
public class DehydrateTests : TestsWithEnlistmentPerFixture
1919
{
2020
private const string FolderDehydrateSuccessfulMessage = "folder dehydrate successful.";

0 commit comments

Comments
 (0)