Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
26 changes: 16 additions & 10 deletions eng/pipelines/stress/stress-tests-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ parameters:
- name: jobNameSuffix
type: string

# True to fail the job when stress tests fail. When false, test failures produce warnings
# (SucceededWithIssues) but do not fail the job.
- name: failOnTestFailure
# When true, test failures produce warnings (SucceededWithIssues) but do not fail the job.
# When false, test failures fail the job. All test steps always run regardless of this setting.
- name: warnOnTestFailure
type: boolean
default: false

# The list of .NET Framework runtimes to test against.
- name: netFrameworkTestRuntimes
Expand Down Expand Up @@ -116,6 +117,7 @@ jobs:
value: >-
--verbosity ${{ parameters.dotnetVerbosity }}
--configuration ${{ parameters.buildConfiguration }}
--no-build

# The contents of the config file to use for all tests. We will write this to a JSON file and
# then point to it via the STRESS_CONFIG_FILE environment variable.
Expand Down Expand Up @@ -194,29 +196,33 @@ jobs:
# - eq(variables['buildSucceeded'], 'true') gates on the flag set above, so tests are
# skipped entirely if the build or any setup step failed (since there's nothing to run).
#
# continueOnError: ${{ not(parameters.failOnTestFailure) }}
# - When failOnTestFailure is false, continueOnError is true: a test failure marks the
# continueOnError: ${{ parameters.warnOnTestFailure }}
# - When warnOnTestFailure is true, continueOnError is true: a test failure marks the
# step and job as SucceededWithIssues (orange warning) rather than Failed.
# - When failOnTestFailure is true, continueOnError is false: a test failure fails the
# - When warnOnTestFailure is false, continueOnError is false: a test failure fails the
# job (red), though subsequent runtimes still run due to the condition above.
#
- ${{ each runtime in parameters.netTestRuntimes }}:
- task: DotNetCoreCLI@2
displayName: Test [${{ runtime }}]
condition: and(succeededOrFailed(), eq(variables['buildSucceeded'], 'true'))
continueOnError: ${{ not(parameters.failOnTestFailure) }}
continueOnError: ${{ parameters.warnOnTestFailure }}
env:
Comment thread
paulmedynski marked this conversation as resolved.
STRESS_CONFIG_FILE: config.json
inputs:
command: run
projects: $(project)
arguments: $(runArguments) --no-build -f ${{ runtime }} -e STRESS_CONFIG_FILE=config.json -- $(testArguments)
arguments: $(runArguments) -f ${{ runtime }} -- $(testArguments)

# Run the stress tests for each .NET Framework runtime.
- ${{ each runtime in parameters.netFrameworkTestRuntimes }}:
- task: DotNetCoreCLI@2
displayName: Test [${{ runtime }}]
condition: and(succeededOrFailed(), eq(variables['buildSucceeded'], 'true'))
continueOnError: ${{ not(parameters.failOnTestFailure) }}
continueOnError: ${{ parameters.warnOnTestFailure }}
env:
STRESS_CONFIG_FILE: config.json
inputs:
command: run
projects: $(project)
arguments: $(runArguments) --no-build -f ${{ runtime }} -e STRESS_CONFIG_FILE=config.json -- $(testArguments)
arguments: $(runArguments) -f ${{ runtime }} -- $(testArguments)
10 changes: 5 additions & 5 deletions eng/pipelines/stress/stress-tests-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ parameters:
type: boolean
default: false

# True to fail the pipeline when stress tests fail. When false (default), test failures produce
# warnings but do not fail the overall pipeline run.
- name: failOnTestFailure
displayName: Fail pipeline on test failure
# When true, test failures produce warnings (SucceededWithIssues) but do not fail the pipeline.
Comment thread
paulmedynski marked this conversation as resolved.
# When false (default), test failures fail the pipeline.
- name: warnOnTestFailure
displayName: Warn (not fail) on test failure
type: boolean
default: false

Expand Down Expand Up @@ -105,5 +105,5 @@ stages:
parameters:
buildConfiguration: ${{ parameters.buildConfiguration }}
debug: ${{ parameters.debug }}
failOnTestFailure: ${{ parameters.failOnTestFailure }}
warnOnTestFailure: ${{ parameters.warnOnTestFailure }}
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
12 changes: 7 additions & 5 deletions eng/pipelines/stress/stress-tests-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ parameters:
type: boolean
default: false

# True to fail the job when stress tests fail. When false, test failures produce warnings.
- name: failOnTestFailure
# When true, test failures produce warnings (SucceededWithIssues) but do not fail the job.
# When false, test failures fail the job. All test steps always run regardless of this setting.
- name: warnOnTestFailure
type: boolean
default: false

# The verbosity level for the dotnet CLI commands.
- name: dotnetVerbosity
Expand Down Expand Up @@ -80,7 +82,7 @@ stages:
debug: ${{ parameters.debug }}
displayNamePrefix: Linux
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
failOnTestFailure: ${{ parameters.failOnTestFailure }}
warnOnTestFailure: ${{ parameters.warnOnTestFailure }}
jobNameSuffix: linux
netTestRuntimes: ${{ parameters.netTestRuntimes }}
poolName: ADO-CI-1ES-Pool
Expand All @@ -100,7 +102,7 @@ stages:
debug: ${{ parameters.debug }}
displayNamePrefix: Win
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
failOnTestFailure: ${{ parameters.failOnTestFailure }}
warnOnTestFailure: ${{ parameters.warnOnTestFailure }}
jobNameSuffix: windows
# Note that we include the .NET Framework runtimes for test runs on Windows.
netFrameworkTestRuntimes: ${{ parameters.netFrameworkTestRuntimes }}
Expand All @@ -124,7 +126,7 @@ stages:
debug: ${{ parameters.debug }}
displayNamePrefix: macOS
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
failOnTestFailure: ${{ parameters.failOnTestFailure }}
warnOnTestFailure: ${{ parameters.warnOnTestFailure }}
jobNameSuffix: macos
netTestRuntimes: ${{ parameters.netTestRuntimes }}
# We don't have any 1ES Hosted Pool images for macOS, so we use a generic one from Azure
Expand Down
Loading