@@ -7,6 +7,7 @@ VERSION_PREFIX=3.1
7
7
# needs to be compatible with the runtime produced from source-build
8
8
DEV_CERTS_VERSION_DEFAULT=3.0.0-preview8-28405-07
9
9
__ROOT_REPO=$( cat " $SCRIPT_ROOT /artifacts/obj/rootrepo.txt" | sed ' s/\r$//' ) # remove CR if mounted repo on Windows drive
10
+ targetRid=$( cat " $SCRIPT_ROOT /artifacts/obj/x64/Release/TargetInfo.props" | grep -i targetrid | sed -E ' s|\s*</?TargetRid>\s*||g' )
10
11
11
12
export DOTNET_CLI_TELEMETRY_OPTOUT=1
12
13
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
@@ -38,6 +39,7 @@ function usage() {
38
39
echo " usage:"
39
40
echo " --dotnetDir the directory from which to run dotnet"
40
41
echo " --configuration the configuration being tested (default=Release)"
42
+ echo " --targetRid override the target rid to use when needed (e.g. for self-contained publish tests)"
41
43
echo " --projectOutput echo dotnet's output to console"
42
44
echo " --keepProjects keep projects after tests are complete"
43
45
echo " --minimal run minimal set of tests - local sources only, no web"
@@ -74,6 +76,10 @@ while :; do
74
76
shift
75
77
configuration=" $1 "
76
78
;;
79
+ --targetrid)
80
+ shift
81
+ targetRid=" $1 "
82
+ ;;
77
83
--projectoutput)
78
84
projectOutput=true
79
85
;;
@@ -167,7 +173,8 @@ function doCommand() {
167
173
binlogHttpsPart=" https"
168
174
fi
169
175
170
- binlog=" $testingDir /${lang} _${proj} _${binlogOnlinePart} _${binlogHttpsPart} _$1 .binlog"
176
+ binlogPrefix=" $testingDir /${lang} _${proj} _${binlogOnlinePart} _${binlogHttpsPart} _"
177
+ binlog=" ${binlogPrefix} $1 .binlog"
171
178
echo " running $1 " | tee -a " $logFile "
172
179
173
180
if [ " $1 " == " new" ]; then
@@ -197,6 +204,17 @@ function doCommand() {
197
204
$killCommand
198
205
wait $!
199
206
echo " terminated with exit code $? " | tee -a " $logFile "
207
+ elif [ " $1 " == " publish" ]; then
208
+ runPublishScenarios () {
209
+ " ${dotnetCmd} " publish --self-contained false /bl:" ${binlogPrefix} publish-fx-dep.binlog"
210
+ " ${dotnetCmd} " publish --self-contained true -r $targetRid /bl:" ${binlogPrefix} publish-self-contained-${targetRid} .binlog"
211
+ " ${dotnetCmd} " publish --self-contained true -r linux-x64 /bl:" ${binlogPrefix} publish-self-contained-portable.binlog"
212
+ }
213
+ if [ " $projectOutput " == " true" ]; then
214
+ runPublishScenarios | tee -a " $logFile "
215
+ else
216
+ runPublishScenarios >> " $logFile " 2>&1
217
+ fi
200
218
else
201
219
if [ " $projectOutput " == " true" ]; then
202
220
" ${dotnetCmd} " $1 /bl:" $binlog " | tee -a " $logFile "
@@ -235,18 +253,18 @@ function setupDevCerts() {
235
253
function runAllTests() {
236
254
# Run tests for each language and template
237
255
if [ " $excludeNonWebTests " == " false" ]; then
238
- doCommand C# console new restore build run
239
- doCommand C# classlib new restore build
256
+ doCommand C# console new restore build run publish
257
+ doCommand C# classlib new restore build publish
240
258
doCommand C# xunit new restore test
241
259
doCommand C# mstest new restore test
242
260
243
- doCommand VB console new restore build run
244
- doCommand VB classlib new restore build
261
+ doCommand VB console new restore build run publish
262
+ doCommand VB classlib new restore build publish
245
263
doCommand VB xunit new restore test
246
264
doCommand VB mstest new restore test
247
265
248
- doCommand F# console new restore build run
249
- doCommand F# classlib new restore build
266
+ doCommand F# console new restore build run publish
267
+ doCommand F# classlib new restore build publish
250
268
doCommand F# xunit new restore test
251
269
doCommand F# mstest new restore test
252
270
fi
@@ -276,14 +294,14 @@ function resetCaches() {
276
294
}
277
295
278
296
function runWebTests() {
279
- doCommand C# web " $@ " new restore build run
280
- doCommand C# mvc " $@ " new restore build run
281
- doCommand C# webapi " $@ " new restore build run
282
- doCommand C# razor " $@ " new restore build run
283
-
284
- doCommand F# web " $@ " new restore build run
285
- doCommand F# mvc " $@ " new restore build run
286
- doCommand F# webapi " $@ " new restore build run
297
+ doCommand C# web " $@ " new restore build run publish
298
+ doCommand C# mvc " $@ " new restore build run publish
299
+ doCommand C# webapi " $@ " new restore build run publish
300
+ doCommand C# razor " $@ " new restore build run publish
301
+
302
+ doCommand F# web " $@ " new restore build run publish
303
+ doCommand F# mvc " $@ " new restore build run publish
304
+ doCommand F# webapi " $@ " new restore build run publish
287
305
}
288
306
289
307
function resetCaches() {
0 commit comments