Skip to content

Commit a5b8be6

Browse files
committed
test(nunit): enable parallel in assertion-only mode
1 parent 65aabc4 commit a5b8be6

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tests/Allure.NUnit.Tests/GlobalSetup.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22

33
[assembly: System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
44

5+
#if !ALLURE_TEST_ASSERT_ONLY
6+
57
[assembly: NotInParallel(["Allure.NUnit", "Allure.Net.Commons"])]
68

9+
#endif
10+
711
namespace Allure.NUnit.Tests;
812

913
public class GlobalHooks

tests/Directory.Build.targets

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131

3232
</PropertyGroup>
3333

34+
<PropertyGroup Condition=" '$(Allure_AssertionOnlyTesting)' == 'true' ">
35+
<DefineConstants>$(DefineConstants);ALLURE_TEST_ASSERT_ONLY</DefineConstants>
36+
</PropertyGroup>
37+
3438
<!-- At this point, all AllureSample items must be already defined.
3539
We're converting them to AdditionalFiles items to make them visible
3640
by the source generators. Only items with ProjectSuffix metadata set
@@ -59,6 +63,8 @@
5963
)</_Allure_BuildTasksProject>
6064
</PropertyGroup>
6165

66+
<Message Text="DefineConstants=$(DefineConstants)" Importance="high" />
67+
6268
<MSBuild
6369
Projects="$(_Allure_BuildTasksProject)"
6470
Targets="Restore;Build"

0 commit comments

Comments
 (0)