@@ -9,6 +9,7 @@ VERSION_PREFIX=5.0
9
9
DEV_CERTS_VERSION_DEFAULT=5.0.0-preview.3
10
10
__ROOT_REPO=$( cat " $SCRIPT_ROOT /artifacts/obj/rootrepo.txt" | sed ' s/\r$//' ) # remove CR if mounted repo on Windows drive
11
11
executingUserHome=${HOME:- }
12
+ targetRid=$( cat " $SCRIPT_ROOT /artifacts/obj/x64/Release/TargetInfo.props" | grep -i targetrid | sed -E ' s|\s*</?TargetRid>\s*||g' )
12
13
13
14
export DOTNET_CLI_TELEMETRY_OPTOUT=1
14
15
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
@@ -66,6 +67,7 @@ function usage() {
66
67
echo " usage:"
67
68
echo " --dotnetDir the directory from which to run dotnet"
68
69
echo " --configuration the configuration being tested (default=Release)"
70
+ echo " --targetRid override the target rid to use when needed (e.g. for self-contained publish tests)"
69
71
echo " --projectOutput echo dotnet's output to console"
70
72
echo " --keepProjects keep projects after tests are complete"
71
73
echo " --minimal run minimal set of tests - local sources only, no web"
@@ -102,6 +104,10 @@ while :; do
102
104
shift
103
105
configuration=" $1 "
104
106
;;
107
+ --targetrid)
108
+ shift
109
+ targetRid=" $1 "
110
+ ;;
105
111
--projectoutput)
106
112
projectOutput=true
107
113
;;
@@ -195,7 +201,8 @@ function doCommand() {
195
201
binlogHttpsPart=" https"
196
202
fi
197
203
198
- binlog=" $testingDir /${lang} _${proj} _${binlogOnlinePart} _${binlogHttpsPart} _$1 .binlog"
204
+ binlogPrefix=" $testingDir /${lang} _${proj} _${binlogOnlinePart} _${binlogHttpsPart} _"
205
+ binlog=" ${binlogPrefix} $1 .binlog"
199
206
echo " running $1 " | tee -a " $logFile "
200
207
201
208
if [ " $1 " == " new" ]; then
@@ -225,6 +232,17 @@ function doCommand() {
225
232
$killCommand
226
233
wait $!
227
234
echo " terminated with exit code $? " | tee -a " $logFile "
235
+ elif [ " $1 " == " publish" ]; then
236
+ runPublishScenarios () {
237
+ " ${dotnetCmd} " publish --self-contained false /bl:" ${binlogPrefix} publish-fx-dep.binlog"
238
+ " ${dotnetCmd} " publish --self-contained true -r $targetRid /bl:" ${binlogPrefix} publish-self-contained-${targetRid} .binlog"
239
+ " ${dotnetCmd} " publish --self-contained true -r linux-x64 /bl:" ${binlogPrefix} publish-self-contained-portable.binlog"
240
+ }
241
+ if [ " $projectOutput " == " true" ]; then
242
+ runPublishScenarios | tee -a " $logFile "
243
+ else
244
+ runPublishScenarios >> " $logFile " 2>&1
245
+ fi
228
246
else
229
247
if [ " $projectOutput " == " true" ]; then
230
248
" ${dotnetCmd} " $1 /bl:" $binlog " | tee -a " $logFile "
@@ -263,18 +281,18 @@ function setupDevCerts() {
263
281
function runAllTests() {
264
282
# Run tests for each language and template
265
283
if [ " $excludeNonWebTests " == " false" ]; then
266
- doCommand C# console new restore build run
267
- doCommand C# classlib new restore build
284
+ doCommand C# console new restore build run publish
285
+ doCommand C# classlib new restore build publish
268
286
doCommand C# xunit new restore test
269
287
doCommand C# mstest new restore test
270
288
271
- doCommand VB console new restore build run
272
- doCommand VB classlib new restore build
289
+ doCommand VB console new restore build run publish
290
+ doCommand VB classlib new restore build publish
273
291
doCommand VB xunit new restore test
274
292
doCommand VB mstest new restore test
275
293
276
- doCommand F# console new restore build run
277
- doCommand F# classlib new restore build
294
+ doCommand F# console new restore build run publish
295
+ doCommand F# classlib new restore build publish
278
296
doCommand F# xunit new restore test
279
297
doCommand F# mstest new restore test
280
298
fi
0 commit comments