Skip to content

Commit

Permalink
Remove boolean operator prefix requirement for AdditionalTestFilter v…
Browse files Browse the repository at this point in the history
…ariable
  • Loading branch information
benbp committed Aug 3, 2022
1 parent fad7a95 commit cf7eb12
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion eng/pipelines/templates/jobs/ci.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
NuGetCacheKey: Test
- script: >-
dotnet test eng/service.proj
--filter "(TestCategory!=Manually) & (TestCategory!=Live) $(AdditionalTestFilters)"
--filter "(TestCategory!=Manually) & (TestCategory!=Live) & ($(AdditionalTestFilters))"
--framework $(TestTargetFramework)
--logger "trx;LogFileName=$(TestTargetFramework).trx" --logger:"console;verbosity=normal"
--blame-crash-dump-type full --blame-hang-dump-type full --blame-hang-timeout ${{parameters.TestTimeoutInMinutes}}minutes
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/jobs/live.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
- pwsh: >
dotnet test eng/service.proj
--framework $(TestTargetFramework)
--filter "TestCategory!=Manually $(AdditionalTestFilters)"
--filter "TestCategory!=Manually & ($(AdditionalTestFilters))"
--logger "trx"
--logger:"console;verbosity=normal"
--blame-crash-dump-type full --blame-hang-dump-type full --blame-hang-timeout ${{parameters.TimeoutInMinutes}}minutes
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/variables/globals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ variables:
# Define optional AdditionalTestFilters via pipeline runtime variables or matrix config variables
# Variable value must start with either & or | to join conditions.
# See https://docs.microsoft.com/en-us/dotnet/core/testing/selective-unit-tests?pivots=nunit
AdditionalTestFilters: ""
AdditionalTestFilters: "Placeholder!=DefaultIgnoreMe"
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ private TemplateClient CreateClient()
}

[RecordedTest]
[Category("FooBar")]
public async Task CanGetSecret()
{
TemplateClient client = CreateClient();
Expand Down

0 comments on commit cf7eb12

Please sign in to comment.