Skip to content

Commit 98f3575

Browse files
committed
Replace dotnet run with dotnet exec to bypass SDK argument parsing regression
dotnet run in SDK 10.0.300 incorrectly forwards its own options (--verbosity, --configuration, --no-build) as application arguments on the CI agent (Ubuntu 22.04). This cannot be reproduced locally with the same SDK version but manifests consistently on hosted agents. Since we build separately anyway (--no-build), switch to dotnet exec which directly invokes the built DLL without any argument parsing ambiguity.
1 parent 315f878 commit 98f3575

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

eng/pipelines/stress/stress-tests-job.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,9 @@ jobs:
112112
--verbosity ${{ parameters.dotnetVerbosity }}
113113
-p:Configuration=${{ parameters.buildConfiguration }}
114114
115-
# dotnet CLI arguments for run.
116-
- name: runArguments
117-
value: >-
118-
--verbosity ${{ parameters.dotnetVerbosity }}
119-
--configuration ${{ parameters.buildConfiguration }}
120-
--no-build
115+
# The output directory where the built stress test binaries are placed.
116+
- name: outputDir
117+
value: $(Build.SourcesDirectory)/src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Runner/bin/${{ parameters.buildConfiguration }}
121118

122119
# The contents of the config file to use for all tests. We will write this to a JSON file and
123120
# then point to it via the STRESS_CONFIG_FILE environment variable.
@@ -211,8 +208,8 @@ jobs:
211208
STRESS_CONFIG_FILE: config.json
212209
inputs:
213210
command: custom
214-
custom: run
215-
arguments: --project $(project) $(runArguments) -f ${{ runtime }} -- $(testArguments)
211+
custom: exec
212+
arguments: $(outputDir)/${{ runtime }}/stresstest.dll $(testArguments)
216213

217214
# Run the stress tests for each .NET Framework runtime.
218215
- ${{ each runtime in parameters.netFrameworkTestRuntimes }}:
@@ -224,5 +221,5 @@ jobs:
224221
STRESS_CONFIG_FILE: config.json
225222
inputs:
226223
command: custom
227-
custom: run
228-
arguments: --project $(project) $(runArguments) -f ${{ runtime }} -- $(testArguments)
224+
custom: exec
225+
arguments: $(outputDir)/${{ runtime }}/stresstest.dll $(testArguments)

0 commit comments

Comments
 (0)