mirror of
https://github.com/Smaug123/unofficial-nunit-runner
synced 2025-10-05 17:38:40 +00:00
Compare commits
42 Commits
WoofWare.N
...
WoofWare.N
Author | SHA1 | Date | |
---|---|---|---|
|
fda4e7ba60 | ||
|
dfdfa84733 | ||
|
c218110749 | ||
|
309968721c | ||
|
876ca9e625 | ||
|
59f9789cdc | ||
|
c8c28b9a32 | ||
|
6d87610017 | ||
|
9f28334b7f | ||
|
5cf2261d7f | ||
|
c3589820c3 | ||
|
5d0c205f21 | ||
|
16135fbd56 | ||
|
cbc51cde14 | ||
|
6a4b900aa9 | ||
|
4169289ded | ||
|
7df58d5309 | ||
|
ac4c8c245e | ||
|
3e79e79978 | ||
|
c16e7dd1ee | ||
|
cd66617ce7 | ||
|
144f71a417 | ||
|
3673fc56ee | ||
|
5f74b41825 | ||
|
2068007da0 | ||
|
6fd824c065 | ||
|
0480d5c151 | ||
|
9107b1b502 | ||
|
6583b9e025 | ||
|
48f7302391 | ||
|
d1fa66a2e8 | ||
|
e75c584a43 | ||
|
d7bdd38253 | ||
|
b7d87459d9 | ||
|
992679d8ca | ||
|
011a5129cc | ||
|
46a13d1583 | ||
|
1a291a2ac7 | ||
|
fd34215461 | ||
|
eda120332a | ||
|
799e5c8c3a | ||
|
172865b2a1 |
@@ -3,13 +3,13 @@
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"fantomas": {
|
||||
"version": "7.0.0",
|
||||
"version": "7.0.3",
|
||||
"commands": [
|
||||
"fantomas"
|
||||
]
|
||||
},
|
||||
"fsharp-analyzers": {
|
||||
"version": "0.29.0",
|
||||
"version": "0.32.0",
|
||||
"commands": [
|
||||
"fsharp-analyzers"
|
||||
]
|
||||
|
28
.github/workflows/dotnet.yaml
vendored
28
.github/workflows/dotnet.yaml
vendored
@@ -29,7 +29,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0 # so that NerdBank.GitVersioning has access to history
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v30
|
||||
uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
extra_nix_config: |
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0 # so that NerdBank.GitVersioning has access to history
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v30
|
||||
uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
extra_nix_config: |
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -85,7 +85,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0 # so that NerdBank.GitVersioning has access to history
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v30
|
||||
uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
extra_nix_config: |
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -113,7 +113,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0 # so that NerdBank.GitVersioning has access to history
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v30
|
||||
uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
extra_nix_config: |
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -130,7 +130,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v30
|
||||
uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
extra_nix_config: |
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -145,7 +145,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v30
|
||||
uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
extra_nix_config: |
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -158,7 +158,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v30
|
||||
uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
extra_nix_config: |
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -171,7 +171,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v30
|
||||
uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
extra_nix_config: |
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -184,7 +184,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v30
|
||||
uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
extra_nix_config: |
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -198,7 +198,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0 # so that NerdBank.GitVersioning has access to history
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v30
|
||||
uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
extra_nix_config: |
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -264,7 +264,7 @@ jobs:
|
||||
name: nuget-package-lib
|
||||
path: packed
|
||||
- name: Attest Build Provenance
|
||||
uses: actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # v2.2.0
|
||||
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2.4.0
|
||||
with:
|
||||
subject-path: "packed/*.nupkg"
|
||||
|
||||
@@ -283,7 +283,7 @@ jobs:
|
||||
name: nuget-package-tool
|
||||
path: packed
|
||||
- name: Attest Build Provenance
|
||||
uses: actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # v2.2.0
|
||||
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2.4.0
|
||||
with:
|
||||
subject-path: "packed/*.nupkg"
|
||||
|
||||
@@ -299,7 +299,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v30
|
||||
uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
extra_nix_config: |
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -331,7 +331,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v30
|
||||
uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
extra_nix_config: |
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
|
2
.github/workflows/flake_update.yaml
vendored
2
.github/workflows/flake_update.yaml
vendored
@@ -32,7 +32,7 @@ jobs:
|
||||
|
||||
- name: Create token
|
||||
id: generate-token
|
||||
uses: actions/create-github-app-token@v1
|
||||
uses: actions/create-github-app-token@v2
|
||||
with:
|
||||
# https://github.com/actions/create-github-app-token/issues/136
|
||||
app-id: ${{ secrets.APP_ID }}
|
||||
|
@@ -10,6 +10,7 @@
|
||||
<Compile Include="NoAttribute.fs" />
|
||||
<Compile Include="Inconclusive.fs" />
|
||||
<Compile Include="RunSubProcess.fs" />
|
||||
<Compile Include="TestExplicit.fs" />
|
||||
<Compile Include="TestNonParallel.fs" />
|
||||
<Compile Include="TestParallel.fs" />
|
||||
<Compile Include="TestParallelIndividualTest.fs" />
|
||||
@@ -26,8 +27,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FsUnit" Version="7.0.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0"/>
|
||||
<PackageReference Include="FsUnit" Version="7.1.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1"/>
|
||||
<PackageReference Include="NUnit" Version="4.3.2"/>
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0"/>
|
||||
</ItemGroup>
|
||||
|
24
Consumer/TestExplicit.fs
Normal file
24
Consumer/TestExplicit.fs
Normal file
@@ -0,0 +1,24 @@
|
||||
namespace Consumer
|
||||
|
||||
open NUnit.Framework
|
||||
|
||||
[<TestFixture>]
|
||||
module TestExplicitIndividual =
|
||||
|
||||
[<Explicit>]
|
||||
[<Test>]
|
||||
let ``This test should not be run`` () = failwith<unit> "should not call"
|
||||
|
||||
[<Explicit>]
|
||||
[<TestFixture>]
|
||||
module TestExplicitModule =
|
||||
|
||||
[<OneTimeSetUp>]
|
||||
let setUp () = failwith<unit> "should not call: setup"
|
||||
|
||||
[<OneTimeTearDown>]
|
||||
let tearDown () =
|
||||
failwith<unit> "should not call: teardown"
|
||||
|
||||
[<Test>]
|
||||
let ``This test should not be run because its module is explicit`` () = failwith<unit> "should not call: test"
|
@@ -10,7 +10,7 @@
|
||||
<WarnOn>FS3388,FS3559</WarnOn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.7.115" PrivateAssets="all"/>
|
||||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.8.38-alpha" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Condition="'$(GITHUB_ACTION)' != ''">
|
||||
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
@@ -11,8 +11,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FsUnit" Version="7.0.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0"/>
|
||||
<PackageReference Include="FsUnit" Version="7.1.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1"/>
|
||||
<PackageReference Include="NUnit" Version="4.3.2"/>
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0"/>
|
||||
</ItemGroup>
|
||||
|
@@ -138,10 +138,17 @@ type TestFixture =
|
||||
Tests : SingleTestMethod list
|
||||
/// If this fixture has declared a parallelisability, that goes here.
|
||||
Parallelize : Parallelizable<ClassParallelScope> option
|
||||
/// It is possible to mark a fixture as "Explicit" or "Ignored", for example.
|
||||
Modifiers : Modifier list
|
||||
}
|
||||
|
||||
/// A test fixture about which we know nothing. No tests, no setup/teardown.
|
||||
static member Empty (ty : Type) (par : Parallelizable<ClassParallelScope> option) (args : obj list list) =
|
||||
static member Empty
|
||||
(ty : Type)
|
||||
(par : Parallelizable<ClassParallelScope> option)
|
||||
(modifiers : Modifier list)
|
||||
(args : obj list list)
|
||||
=
|
||||
{
|
||||
ContainingAssembly = ty.Assembly
|
||||
Type = ty
|
||||
@@ -153,6 +160,7 @@ type TestFixture =
|
||||
Parameters = args
|
||||
Tests = []
|
||||
Parallelize = par
|
||||
Modifiers = modifiers
|
||||
}
|
||||
|
||||
/// User code in the unit under test has failed somehow.
|
||||
|
@@ -1,16 +1,15 @@
|
||||
namespace WoofWare.NUnitTestRunner
|
||||
|
||||
open System
|
||||
open WoofWare.Myriad.Plugins
|
||||
|
||||
[<JsonParse>]
|
||||
// Myriad runs the JsonParse generator on this
|
||||
type internal FrameworkDescription =
|
||||
{
|
||||
Name : string
|
||||
Version : string
|
||||
}
|
||||
|
||||
[<JsonParse>]
|
||||
// Myriad runs the JsonParse generator on this
|
||||
type internal RuntimeOptions =
|
||||
{
|
||||
Tfm : string
|
||||
@@ -21,7 +20,7 @@ type internal RuntimeOptions =
|
||||
RollForward : string option
|
||||
}
|
||||
|
||||
[<JsonParse>]
|
||||
// Myriad runs the JsonParse generator on this
|
||||
type internal RuntimeConfig =
|
||||
{
|
||||
RuntimeOptions : RuntimeOptions
|
||||
|
@@ -170,8 +170,9 @@ WoofWare.NUnitTestRunner.IndividualTestRunMetadata.StdOut [property]: [read-only
|
||||
WoofWare.NUnitTestRunner.IndividualTestRunMetadata.TestId [property]: [read-only] System.Guid
|
||||
WoofWare.NUnitTestRunner.IndividualTestRunMetadata.TestName [property]: [read-only] string
|
||||
WoofWare.NUnitTestRunner.IndividualTestRunMetadata.Total [property]: [read-only] System.TimeSpan
|
||||
WoofWare.NUnitTestRunner.ITestProgress - interface with 5 member(s)
|
||||
WoofWare.NUnitTestRunner.ITestProgress - interface with 6 member(s)
|
||||
WoofWare.NUnitTestRunner.ITestProgress.OnTestFailed [method]: string -> WoofWare.NUnitTestRunner.TestMemberFailure -> unit
|
||||
WoofWare.NUnitTestRunner.ITestProgress.OnTestFixtureSkipped [method]: string -> string -> unit
|
||||
WoofWare.NUnitTestRunner.ITestProgress.OnTestFixtureStart [method]: string -> int -> unit
|
||||
WoofWare.NUnitTestRunner.ITestProgress.OnTestMemberFinished [method]: string -> unit
|
||||
WoofWare.NUnitTestRunner.ITestProgress.OnTestMemberSkipped [method]: string -> unit
|
||||
@@ -346,11 +347,12 @@ WoofWare.NUnitTestRunner.TestFailure.NewTearDownFailed [static method]: WoofWare
|
||||
WoofWare.NUnitTestRunner.TestFailure.NewTestFailed [static method]: WoofWare.NUnitTestRunner.UserMethodFailure -> WoofWare.NUnitTestRunner.TestFailure
|
||||
WoofWare.NUnitTestRunner.TestFailure.Tag [property]: [read-only] int
|
||||
WoofWare.NUnitTestRunner.TestFixture inherit obj, implements WoofWare.NUnitTestRunner.TestFixture System.IEquatable, System.Collections.IStructuralEquatable
|
||||
WoofWare.NUnitTestRunner.TestFixture..ctor [constructor]: (System.Reflection.Assembly, string, System.Type, System.Reflection.MethodInfo option, System.Reflection.MethodInfo option, System.Reflection.MethodInfo list, System.Reflection.MethodInfo list, obj list list, WoofWare.NUnitTestRunner.SingleTestMethod list, WoofWare.NUnitTestRunner.ClassParallelScope WoofWare.NUnitTestRunner.Parallelizable option)
|
||||
WoofWare.NUnitTestRunner.TestFixture..ctor [constructor]: (System.Reflection.Assembly, string, System.Type, System.Reflection.MethodInfo option, System.Reflection.MethodInfo option, System.Reflection.MethodInfo list, System.Reflection.MethodInfo list, obj list list, WoofWare.NUnitTestRunner.SingleTestMethod list, WoofWare.NUnitTestRunner.ClassParallelScope WoofWare.NUnitTestRunner.Parallelizable option, WoofWare.NUnitTestRunner.Modifier list)
|
||||
WoofWare.NUnitTestRunner.TestFixture.ContainingAssembly [property]: [read-only] System.Reflection.Assembly
|
||||
WoofWare.NUnitTestRunner.TestFixture.Empty [static method]: System.Type -> WoofWare.NUnitTestRunner.ClassParallelScope WoofWare.NUnitTestRunner.Parallelizable option -> obj list list -> WoofWare.NUnitTestRunner.TestFixture
|
||||
WoofWare.NUnitTestRunner.TestFixture.Empty [static method]: System.Type -> WoofWare.NUnitTestRunner.ClassParallelScope WoofWare.NUnitTestRunner.Parallelizable option -> WoofWare.NUnitTestRunner.Modifier list -> obj list list -> WoofWare.NUnitTestRunner.TestFixture
|
||||
WoofWare.NUnitTestRunner.TestFixture.Equals [method]: (WoofWare.NUnitTestRunner.TestFixture, System.Collections.IEqualityComparer) -> bool
|
||||
WoofWare.NUnitTestRunner.TestFixture.get_ContainingAssembly [method]: unit -> System.Reflection.Assembly
|
||||
WoofWare.NUnitTestRunner.TestFixture.get_Modifiers [method]: unit -> WoofWare.NUnitTestRunner.Modifier list
|
||||
WoofWare.NUnitTestRunner.TestFixture.get_Name [method]: unit -> string
|
||||
WoofWare.NUnitTestRunner.TestFixture.get_OneTimeSetUp [method]: unit -> System.Reflection.MethodInfo option
|
||||
WoofWare.NUnitTestRunner.TestFixture.get_OneTimeTearDown [method]: unit -> System.Reflection.MethodInfo option
|
||||
@@ -360,6 +362,7 @@ WoofWare.NUnitTestRunner.TestFixture.get_SetUp [method]: unit -> System.Reflecti
|
||||
WoofWare.NUnitTestRunner.TestFixture.get_TearDown [method]: unit -> System.Reflection.MethodInfo list
|
||||
WoofWare.NUnitTestRunner.TestFixture.get_Tests [method]: unit -> WoofWare.NUnitTestRunner.SingleTestMethod list
|
||||
WoofWare.NUnitTestRunner.TestFixture.get_Type [method]: unit -> System.Type
|
||||
WoofWare.NUnitTestRunner.TestFixture.Modifiers [property]: [read-only] WoofWare.NUnitTestRunner.Modifier list
|
||||
WoofWare.NUnitTestRunner.TestFixture.Name [property]: [read-only] string
|
||||
WoofWare.NUnitTestRunner.TestFixture.OneTimeSetUp [property]: [read-only] System.Reflection.MethodInfo option
|
||||
WoofWare.NUnitTestRunner.TestFixture.OneTimeTearDown [property]: [read-only] System.Reflection.MethodInfo option
|
||||
|
@@ -597,15 +597,15 @@ module TestFixture =
|
||||
/// Interpret this type as a [<TestFixture>], extracting the test members from it and annotating them with all
|
||||
/// relevant information about how we should run them.
|
||||
let parse (parentType : Type) : TestFixture =
|
||||
let categories, args, par =
|
||||
(([], [], None), parentType.CustomAttributes)
|
||||
||> Seq.fold (fun (categories, args, par) attr ->
|
||||
let categories, args, mods, par =
|
||||
(([], [], [], None), parentType.CustomAttributes)
|
||||
||> Seq.fold (fun (categories, args, mods, par) attr ->
|
||||
match attr.AttributeType.FullName with
|
||||
| "NUnit.Framework.SetUpFixtureAttribute" ->
|
||||
failwith "This test runner does not support SetUpFixture. Please shout if you want this."
|
||||
| "NUnit.Framework.CategoryAttribute" ->
|
||||
let cat = attr.ConstructorArguments |> Seq.exactlyOne |> _.Value |> unbox<string>
|
||||
cat :: categories, args, par
|
||||
cat :: categories, args, mods, par
|
||||
| "NUnit.Framework.TestFixtureAttribute" ->
|
||||
let newArgs =
|
||||
match attr.ConstructorArguments |> Seq.map _.Value |> Seq.toList with
|
||||
@@ -613,38 +613,52 @@ module TestFixture =
|
||||
x |> Seq.cast<CustomAttributeTypedArgument> |> Seq.map _.Value |> Seq.toList
|
||||
| xs -> xs
|
||||
|
||||
categories, newArgs :: args, par
|
||||
categories, newArgs :: args, mods, par
|
||||
| "NUnit.Framework.NonParallelizableAttribute" ->
|
||||
match par with
|
||||
| Some _ -> failwith $"Got multiple parallelism attributes on %s{parentType.FullName}"
|
||||
| None -> categories, args, Some Parallelizable.No
|
||||
| None -> categories, args, mods, Some Parallelizable.No
|
||||
| "NUnit.Framework.ParallelizableAttribute" ->
|
||||
match par with
|
||||
| Some _ -> failwith $"Got multiple parallelism attributes on %s{parentType.FullName}"
|
||||
| None ->
|
||||
match attr.ConstructorArguments |> Seq.toList with
|
||||
| [] -> categories, args, Some (Parallelizable.Yes ClassParallelScope.Self)
|
||||
| [] -> categories, args, mods, Some (Parallelizable.Yes ClassParallelScope.Self)
|
||||
| [ v ] ->
|
||||
match v.Value with
|
||||
| :? int as v ->
|
||||
match ParallelScope.ofInt v with
|
||||
| ParallelScope.Fixtures ->
|
||||
categories, args, Some (Parallelizable.Yes ClassParallelScope.Fixtures)
|
||||
categories, args, mods, Some (Parallelizable.Yes ClassParallelScope.Fixtures)
|
||||
| ParallelScope.Children ->
|
||||
categories, args, Some (Parallelizable.Yes ClassParallelScope.Children)
|
||||
categories, args, mods, Some (Parallelizable.Yes ClassParallelScope.Children)
|
||||
| ParallelScope.All ->
|
||||
categories, args, Some (Parallelizable.Yes ClassParallelScope.All)
|
||||
categories, args, mods, Some (Parallelizable.Yes ClassParallelScope.All)
|
||||
| ParallelScope.Self ->
|
||||
categories, args, Some (Parallelizable.Yes ClassParallelScope.Self)
|
||||
| ParallelScope.None -> categories, args, Some Parallelizable.No
|
||||
categories, args, mods, Some (Parallelizable.Yes ClassParallelScope.Self)
|
||||
| ParallelScope.None -> categories, args, mods, Some Parallelizable.No
|
||||
| v ->
|
||||
failwith
|
||||
$"Unexpectedly non-int value %O{v} of parallel scope in %s{parentType.FullName}"
|
||||
| _ -> failwith $"unexpectedly got multiple args to Parallelizable on %s{parentType.FullName}"
|
||||
| _ -> categories, args, par
|
||||
| "NUnit.Framework.ExplicitAttribute" ->
|
||||
let reason =
|
||||
attr.ConstructorArguments
|
||||
|> Seq.tryHead
|
||||
|> Option.map (_.Value >> unbox<string>)
|
||||
|
||||
categories, args, Modifier.Explicit reason :: mods, par
|
||||
| "NUnit.Framework.IgnoreAttribute" ->
|
||||
let reason =
|
||||
attr.ConstructorArguments
|
||||
|> Seq.tryHead
|
||||
|> Option.map (_.Value >> unbox<string>)
|
||||
|
||||
categories, args, Modifier.Ignored reason :: mods, par
|
||||
| _ -> categories, args, mods, par
|
||||
)
|
||||
|
||||
(TestFixture.Empty parentType par args, parentType.GetRuntimeMethods ())
|
||||
(TestFixture.Empty parentType par mods args, parentType.GetRuntimeMethods ())
|
||||
||> Seq.fold (fun state mi ->
|
||||
((state, []), mi.CustomAttributes)
|
||||
||> Seq.fold (fun (state, unrecognisedAttrs) attr ->
|
||||
@@ -717,6 +731,8 @@ module TestFixture =
|
||||
|
||||
/// Run every test (except those which fail the `filter`) in this test fixture, as well as the
|
||||
/// appropriate setup and tear-down logic.
|
||||
///
|
||||
/// If the TestFixture has modifiers that specify no tests should be run, we don't run any tests.
|
||||
let run
|
||||
(contexts : TestContexts)
|
||||
(par : ParallelQueue)
|
||||
@@ -725,6 +741,26 @@ module TestFixture =
|
||||
(tests : TestFixture)
|
||||
: FixtureRunResults list Task
|
||||
=
|
||||
match
|
||||
tests.Modifiers
|
||||
|> List.tryFind (
|
||||
function
|
||||
| Modifier.Explicit _
|
||||
| Modifier.Ignored _ -> true
|
||||
)
|
||||
with
|
||||
| Some modifier ->
|
||||
let reason =
|
||||
match modifier with
|
||||
| Modifier.Explicit (Some reason) -> reason
|
||||
| Modifier.Ignored (Some reason) -> reason
|
||||
| Modifier.Ignored None -> "test fixture marked Ignore"
|
||||
| Modifier.Explicit None -> "test fixture marked Explicit"
|
||||
|
||||
progress.OnTestFixtureSkipped tests.Name reason
|
||||
Task.FromResult []
|
||||
| None ->
|
||||
|
||||
match tests.Parameters with
|
||||
| [] -> [ null ]
|
||||
| args -> args |> List.map List.toArray
|
||||
|
@@ -10,6 +10,8 @@ type ITestProgress =
|
||||
/// Called just before we start executing the setup logic for the given test fixture.
|
||||
/// We tell you how many test methods there are in the fixture.
|
||||
abstract OnTestFixtureStart : name : string -> testCount : int -> unit
|
||||
/// Called when skipping the test fixture with the given name, e.g. because it's `[<Explicit>]`.
|
||||
abstract OnTestFixtureSkipped : name : string -> reason : string -> unit
|
||||
/// Called just before we start executing the test(s) indicated by a particular method.
|
||||
abstract OnTestMemberStart : name : string -> unit
|
||||
/// Called when a test fails. (This may be called repeatedly with the same `name`, e.g. if the test
|
||||
@@ -32,6 +34,9 @@ module TestProgress =
|
||||
let plural = if testCount = 1 then "" else "s"
|
||||
writer.WriteLine $"Running test fixture: %s{name} (%i{testCount} test%s{plural} to run)"
|
||||
|
||||
member _.OnTestFixtureSkipped name reason =
|
||||
writer.WriteLine $"Skipping test fixture (%s{reason}): %s{name}"
|
||||
|
||||
member _.OnTestMemberStart name =
|
||||
writer.WriteLine $"Running test: %s{name}"
|
||||
|
||||
|
@@ -14,7 +14,7 @@
|
||||
<PackageId>WoofWare.NUnitTestRunner.Lib</PackageId>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<WarnOn>FS3559</WarnOn>
|
||||
<WoofWareMyriadPluginVersion>4.0.12</WoofWareMyriadPluginVersion>
|
||||
<WoofWareMyriadPluginVersion>8.0.5</WoofWareMyriadPluginVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -22,6 +22,11 @@
|
||||
<Compile Include="RuntimeConfig.fs" />
|
||||
<Compile Include="GeneratedRuntimeConfig.fs">
|
||||
<MyriadFile>RuntimeConfig.fs</MyriadFile>
|
||||
<MyriadParams>
|
||||
<RuntimeOptions>JsonParse</RuntimeOptions>
|
||||
<RuntimeConfig>JsonParse</RuntimeConfig>
|
||||
<FrameworkDescription>JsonParse</FrameworkDescription>
|
||||
</MyriadParams>
|
||||
</Compile>
|
||||
<Compile Include="ParallelScope.fs" />
|
||||
<Compile Include="DotnetRuntime.fs" />
|
||||
@@ -48,10 +53,9 @@
|
||||
<EmbeddedResource Include="version.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="WoofWare.PrattParser" Version="0.2.3" />
|
||||
<PackageReference Include="WoofWare.PrattParser" Version="0.2.4" />
|
||||
<PackageReference Update="FSharp.Core" Version="6.0.1" />
|
||||
<PackageReference Include="WoofWare.DotnetRuntimeLocator" Version="0.1.11" />
|
||||
<PackageReference Include="WoofWare.Myriad.Plugins.Attributes" Version="3.6.7" />
|
||||
<PackageReference Include="WoofWare.DotnetRuntimeLocator" Version="0.1.12" />
|
||||
<PackageReference Include="Myriad.SDK" Version="0.8.3" PrivateAssets="all" />
|
||||
<PackageReference Include="WoofWare.Myriad.Plugins" Version="$(WoofWareMyriadPluginVersion)" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "0.20",
|
||||
"version": "0.21",
|
||||
"publicReleaseRefSpec": [
|
||||
"^refs/heads/main$"
|
||||
],
|
||||
|
@@ -13,6 +13,10 @@ module Progress =
|
||||
member _.OnTestFixtureStart name testCount =
|
||||
console.MarkupLine $"[white]Running tests: %s{Markup.Escape name}[/]"
|
||||
|
||||
member _.OnTestFixtureSkipped name reason =
|
||||
console.MarkupLine
|
||||
$"[yellow]Skipping test fixture (%s{Markup.Escape reason}): %s{Markup.Escape name}[/]"
|
||||
|
||||
member _.OnTestMemberFinished name =
|
||||
console.MarkupLine $"[gray]Finished test: %s{Markup.Escape name}[/]"
|
||||
|
||||
|
@@ -16,10 +16,10 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ApiSurface" Version="4.1.17" />
|
||||
<PackageReference Include="FsCheck" Version="3.1.0" />
|
||||
<PackageReference Include="FsUnit" Version="7.0.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
|
||||
<PackageReference Include="ApiSurface" Version="4.1.22" />
|
||||
<PackageReference Include="FsCheck" Version="3.3.0" />
|
||||
<PackageReference Include="FsUnit" Version="7.1.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
|
||||
<PackageReference Include="NUnit" Version="4.3.2" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0"/>
|
||||
</ItemGroup>
|
||||
|
@@ -35,7 +35,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Spectre.Console" Version="0.49.1" />
|
||||
<PackageReference Include="Spectre.Console" Version="0.50.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@@ -10,7 +10,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageDownload Include="G-Research.FSharp.Analyzers" Version="[0.13.0]" />
|
||||
<PackageDownload Include="G-Research.FSharp.Analyzers" Version="[0.17.0]" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
6
flake.lock
generated
6
flake.lock
generated
@@ -20,11 +20,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1739451785,
|
||||
"narHash": "sha256-3ebRdThRic9bHMuNi2IAA/ek9b32bsy8F5R4SvGTIog=",
|
||||
"lastModified": 1753432016,
|
||||
"narHash": "sha256-cnL5WWn/xkZoyH/03NNUS7QgW5vI7D1i74g48qplCvg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1128e89fd5e11bb25aedbfc287733c6502202ea9",
|
||||
"rev": "6027c30c8e9810896b92429f0092f624f7b1aace",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
107
nix/deps.json
107
nix/deps.json
@@ -1,13 +1,13 @@
|
||||
[
|
||||
{
|
||||
"pname": "ApiSurface",
|
||||
"version": "4.1.17",
|
||||
"hash": "sha256-ZYIW++7vXYV/7TTNUkV36QDN6yJbHymsKcxTUscTnvA="
|
||||
"version": "4.1.22",
|
||||
"hash": "sha256-voj9m3YmyJ95FAMLV4sWzQMod3Em0mTjzf0LBUUFOso="
|
||||
},
|
||||
{
|
||||
"pname": "fantomas",
|
||||
"version": "7.0.0",
|
||||
"hash": "sha256-v4bXmvjZOYxl5RSIHuqVfDzBQdRz5SrmzZtD6SeEYTY="
|
||||
"version": "7.0.3",
|
||||
"hash": "sha256-0XlfV7SxXPDnk/CjkUesJSaH0cxlNHJ+Jj86zNUhkNA="
|
||||
},
|
||||
{
|
||||
"pname": "Fantomas.Core",
|
||||
@@ -21,13 +21,13 @@
|
||||
},
|
||||
{
|
||||
"pname": "FsCheck",
|
||||
"version": "3.1.0",
|
||||
"hash": "sha256-u0Ha94EjClJ8evNSHu8d6+Dx9qYM3kV3sl1PEq9gF8s="
|
||||
"version": "3.3.0",
|
||||
"hash": "sha256-TFDR/uAGv4OqrMX8/reQ4faaAhH9hxTHr1T/YkNPCCU="
|
||||
},
|
||||
{
|
||||
"pname": "fsharp-analyzers",
|
||||
"version": "0.29.0",
|
||||
"hash": "sha256-e4G7/5DwwSZYvVE9yy+g8n1easPLC6/fDszioIsT7Dw="
|
||||
"version": "0.32.0",
|
||||
"hash": "sha256-MnhsK5tOeexL6uQhsV4nTRz8CGbz2o8VyHwAK8x91pE="
|
||||
},
|
||||
{
|
||||
"pname": "FSharp.Core",
|
||||
@@ -41,8 +41,8 @@
|
||||
},
|
||||
{
|
||||
"pname": "FsUnit",
|
||||
"version": "7.0.1",
|
||||
"hash": "sha256-K85CIdxMeFSHEKZk6heIXp/oFjWAn7dBILKrw49pJUY="
|
||||
"version": "7.1.1",
|
||||
"hash": "sha256-UMCEGKxQ4ytjmPuVpiNaAPbi3RQH9gqa61JJIUS/6hg="
|
||||
},
|
||||
{
|
||||
"pname": "Microsoft.ApplicationInsights",
|
||||
@@ -76,13 +76,13 @@
|
||||
},
|
||||
{
|
||||
"pname": "Microsoft.CodeCoverage",
|
||||
"version": "17.13.0",
|
||||
"hash": "sha256-GKrIxeyQo5Az1mztfQgea1kGtJwonnNOrXK/0ULfu8o="
|
||||
"version": "17.14.1",
|
||||
"hash": "sha256-f8QytG8GvRoP47rO2KEmnDLxIpyesaq26TFjDdW40Gs="
|
||||
},
|
||||
{
|
||||
"pname": "Microsoft.NET.Test.Sdk",
|
||||
"version": "17.13.0",
|
||||
"hash": "sha256-sc2wvyV8cGm1FrNP2GGHEI584RCvRPu15erYCsgw5QY="
|
||||
"version": "17.14.1",
|
||||
"hash": "sha256-mZUzDFvFp7x1nKrcnRd0hhbNu5g8EQYt8SKnRgdhT/A="
|
||||
},
|
||||
{
|
||||
"pname": "Microsoft.NETCore.App.Host.linux-arm64",
|
||||
@@ -176,13 +176,13 @@
|
||||
},
|
||||
{
|
||||
"pname": "Microsoft.TestPlatform.ObjectModel",
|
||||
"version": "17.13.0",
|
||||
"hash": "sha256-6S0fjfj8vA+h6dJVNwLi6oZhYDO/I/6hBZaq2VTW+Uk="
|
||||
"version": "17.14.1",
|
||||
"hash": "sha256-QMf6O+w0IT+16Mrzo7wn+N20f3L1/mDhs/qjmEo1rYs="
|
||||
},
|
||||
{
|
||||
"pname": "Microsoft.TestPlatform.TestHost",
|
||||
"version": "17.13.0",
|
||||
"hash": "sha256-L/CJzou7dhmShUgXq3aXL3CaLTJll17Q+JY2DBdUUpo="
|
||||
"version": "17.14.1",
|
||||
"hash": "sha256-1cxHWcvHRD7orQ3EEEPPxVGEkTpxom1/zoICC9SInJs="
|
||||
},
|
||||
{
|
||||
"pname": "Myriad.Core",
|
||||
@@ -196,13 +196,8 @@
|
||||
},
|
||||
{
|
||||
"pname": "Nerdbank.GitVersioning",
|
||||
"version": "3.7.115",
|
||||
"hash": "sha256-sqn+i7vvBgBUtm7j82mH+SpApgI2hsmL5DYfLm1Z7gw="
|
||||
},
|
||||
{
|
||||
"pname": "Newtonsoft.Json",
|
||||
"version": "13.0.1",
|
||||
"hash": "sha256-K2tSVW4n4beRPzPu3rlVaBEMdGvWSv/3Q1fxaDh4Mjo="
|
||||
"version": "3.8.38-alpha",
|
||||
"hash": "sha256-gPMrVbjOZxXoofczF/pn6eVkLhjVSJIyQrLO2oljrDc="
|
||||
},
|
||||
{
|
||||
"pname": "Newtonsoft.Json",
|
||||
@@ -211,33 +206,33 @@
|
||||
},
|
||||
{
|
||||
"pname": "NuGet.Common",
|
||||
"version": "6.13.1",
|
||||
"hash": "sha256-uDSZzCzMETKJE2pYAh9n110YrLPVs83+cxcyNCv9V/o="
|
||||
"version": "6.14.0",
|
||||
"hash": "sha256-jDOwt3veI1GSG8CfBnf2+dJxD3E/Nmlc+vHtD4J76Ms="
|
||||
},
|
||||
{
|
||||
"pname": "NuGet.Configuration",
|
||||
"version": "6.13.1",
|
||||
"hash": "sha256-fjit3Qhqu+egLgxvJRD6zQ6U2H+OxsLoy7HYcbXJgBY="
|
||||
"version": "6.14.0",
|
||||
"hash": "sha256-1PN9s6fhCw3wd2260U6hQ4vG3jIvcG8GIn1oQgxMXA0="
|
||||
},
|
||||
{
|
||||
"pname": "NuGet.Frameworks",
|
||||
"version": "6.13.1",
|
||||
"hash": "sha256-upL6cboghOYed6acdlVljMa9nCSExYoBgQlD5QcJ+ek="
|
||||
"version": "6.14.0",
|
||||
"hash": "sha256-3ViM3R1ucQMEL2hQYsivT86kI6veMQK2xDsiAcFcVQk="
|
||||
},
|
||||
{
|
||||
"pname": "NuGet.Packaging",
|
||||
"version": "6.13.1",
|
||||
"hash": "sha256-khq+grMovEsO95wAhCHmauL60LB83NkWnDY5zcImXT4="
|
||||
"version": "6.14.0",
|
||||
"hash": "sha256-Yafbnxs3maj55bJ1oKQiZ0QkntFUzXdhorL94YEUOhY="
|
||||
},
|
||||
{
|
||||
"pname": "NuGet.Protocol",
|
||||
"version": "6.13.1",
|
||||
"hash": "sha256-0zqowx5iNMMzTSF0HO2Zzc1qqyCB/nEhNHFH8Z0jxzc="
|
||||
"version": "6.14.0",
|
||||
"hash": "sha256-uLDKfs+QN1MdnuQtTES8qfNzzsmYKM6XB9pwJc4G+eo="
|
||||
},
|
||||
{
|
||||
"pname": "NuGet.Versioning",
|
||||
"version": "6.13.1",
|
||||
"hash": "sha256-NymrrcVZUoc78elPHYIoBFG2NpdIEZYEeqk6FTdvZug="
|
||||
"version": "6.14.0",
|
||||
"hash": "sha256-DqdOJgsphKxSvqB8b60zNPCaiLfbiu3WnUJ/90feLrY="
|
||||
},
|
||||
{
|
||||
"pname": "NUnit",
|
||||
@@ -266,8 +261,8 @@
|
||||
},
|
||||
{
|
||||
"pname": "Spectre.Console",
|
||||
"version": "0.49.1",
|
||||
"hash": "sha256-tqSVojyuQjuB34lXo759NOcyLgNIw815mKXJPq5JFDo="
|
||||
"version": "0.50.0",
|
||||
"hash": "sha256-3MNgumQSXzuXVGj7kLb5FMkTH/LoFohMvUjAZ7nyHfo="
|
||||
},
|
||||
{
|
||||
"pname": "System.Collections.Immutable",
|
||||
@@ -286,8 +281,8 @@
|
||||
},
|
||||
{
|
||||
"pname": "System.Formats.Asn1",
|
||||
"version": "8.0.1",
|
||||
"hash": "sha256-may/Wg+esmm1N14kQTG4ESMBi+GQKPp0ZrrBo/o6OXM="
|
||||
"version": "6.0.0",
|
||||
"hash": "sha256-KaMHgIRBF7Nf3VwOo+gJS1DcD+41cJDPWFh+TDQ8ee8="
|
||||
},
|
||||
{
|
||||
"pname": "System.IO.Abstractions",
|
||||
@@ -304,6 +299,11 @@
|
||||
"version": "4.5.5",
|
||||
"hash": "sha256-EPQ9o1Kin7KzGI5O3U3PUQAZTItSbk9h/i4rViN3WiI="
|
||||
},
|
||||
{
|
||||
"pname": "System.Memory",
|
||||
"version": "4.6.3",
|
||||
"hash": "sha256-JgeK63WMmumF6L+FH5cwJgYdpqXrSDcgTQwtIgTHKVU="
|
||||
},
|
||||
{
|
||||
"pname": "System.Private.Uri",
|
||||
"version": "4.3.0",
|
||||
@@ -314,6 +314,11 @@
|
||||
"version": "1.6.0",
|
||||
"hash": "sha256-JJfgaPav7UfEh4yRAQdGhLZF1brr0tUWPl6qmfNWq/E="
|
||||
},
|
||||
{
|
||||
"pname": "System.Reflection.Metadata",
|
||||
"version": "8.0.0",
|
||||
"hash": "sha256-dQGC30JauIDWNWXMrSNOJncVa1umR1sijazYwUDdSIE="
|
||||
},
|
||||
{
|
||||
"pname": "System.Runtime",
|
||||
"version": "4.3.1",
|
||||
@@ -356,27 +361,27 @@
|
||||
},
|
||||
{
|
||||
"pname": "WoofWare.DotnetRuntimeLocator",
|
||||
"version": "0.1.11",
|
||||
"hash": "sha256-btWYnXxZzAnEcAE3Ufvz+Z3cJqtW7EGXs5OZMEHIWr8="
|
||||
"version": "0.1.12",
|
||||
"hash": "sha256-6pNZs0/R2LnLKSODq9DyHhGo2C+SDyz9k7D/13/78so="
|
||||
},
|
||||
{
|
||||
"pname": "WoofWare.Myriad.Plugins",
|
||||
"version": "4.0.12",
|
||||
"hash": "sha256-6o8oE5loEpKFVMRXf/rmY0YDW/iRF2Zic1lkfsOXcSo="
|
||||
"version": "8.0.5",
|
||||
"hash": "sha256-IfTT2GM9ktUW5BQoKQGFKK39BAKeziJJnrOIL7Vs19o="
|
||||
},
|
||||
{
|
||||
"pname": "WoofWare.Myriad.Plugins.Attributes",
|
||||
"version": "3.6.7",
|
||||
"hash": "sha256-YvrXS2ZMoMZkWgGxxcumyoqQkg4cSjGQzCrMbBCCtXM="
|
||||
"version": "3.6.12",
|
||||
"hash": "sha256-90uiVtc5exCbkcdS8DgTmlEZZT8/AdrY0QuFzy+FHUo="
|
||||
},
|
||||
{
|
||||
"pname": "WoofWare.PrattParser",
|
||||
"version": "0.2.3",
|
||||
"hash": "sha256-PsfU33BFsaA8LwlZMkSwmoA4hLb7Vkm2gYm48MglqxY="
|
||||
"version": "0.2.4",
|
||||
"hash": "sha256-aNTa2C300jUCsQ+iVSoothbCvBWdg7OzCJknwG5HV6g="
|
||||
},
|
||||
{
|
||||
"pname": "WoofWare.Whippet.Fantomas",
|
||||
"version": "0.3.1",
|
||||
"hash": "sha256-i5oiqcrxzM90Ocuq5MIu2Ha5lV0aYu5nCvuwmFqp6NA="
|
||||
"version": "0.6.3",
|
||||
"hash": "sha256-FkW/HtVp8/HE2k6d7yFpnJcnP3FNNe9kGlkoIWmNgDw="
|
||||
}
|
||||
]
|
||||
|
Reference in New Issue
Block a user