@@ -119,20 +119,25 @@ build_test_wrappers()
119
119
export __Exclude=" ${__ProjectDir} /tests/issues.targets"
120
120
export __BuildLogRootName=" Tests_XunitWrapper"
121
121
122
- # Set up directories and file names
123
- __BuildLogRootName=$subDirectoryName
124
- __BuildLog=" $__LogsDir /${__BuildLogRootName} .${__BuildOS} .${__BuildArch} .${__BuildType} .log"
125
- __BuildWrn=" $__LogsDir /${__BuildLogRootName} .${__BuildOS} .${__BuildArch} .${__BuildType} .wrn"
126
- __BuildErr=" $__LogsDir /${__BuildLogRootName} .${__BuildOS} .${__BuildArch} .${__BuildType} .err"
127
-
128
122
buildVerbosity=" Summary"
129
123
130
124
if [ $__VerboseBuild == 1 ]; then
131
125
buildVerbosity=" Diag"
132
126
fi
133
127
134
- echo " ${__DotNetCli} " msbuild " ${__ProjectDir} /tests/runtest.proj" /p:RestoreAdditionalProjectSources=https://dotnet.myget.org/F/dotnet-core/ /p:BuildWrappers=true /p:TargetsWindows=false /fileloggerparameters:" \" Verbosity=normal;LogFile=${__BuildLog} \" " /fileloggerparameters1:" \" WarningsOnly;LogFile=${__BuildWrn} \" " /fileloggerparameters2:" \" ErrorsOnly;LogFile=${__BuildErr} \" " /consoleloggerparameters:$buildVerbosity /p:__BuildOS=$__BuildOS /p:__BuildType=$__BuildType /p:__BuildArch=$__BuildArch
135
- " ${__DotNetCli} " msbuild " ${__ProjectDir} /tests/runtest.proj" /p:RestoreAdditionalProjectSources=https://dotnet.myget.org/F/dotnet-core/ /p:BuildWrappers=true /p:TargetsWindows=false /fileloggerparameters:" \" Verbosity=normal;LogFile=${__BuildLog} \" " /fileloggerparameters1:" \" WarningsOnly;LogFile=${__BuildWrn} \" " /fileloggerparameters2:" \" ErrorsOnly;LogFile=${__BuildErr} \" " /consoleloggerparameters:$buildVerbosity /p:__BuildOS=$__BuildOS /p:__BuildType=$__BuildType /p:__BuildArch=$__BuildArch
128
+ # Set up directories and file names
129
+ __BuildLogRootName=$subDirectoryName
130
+ __BuildLog=" $__LogsDir /${__BuildLogRootName} .${__BuildOS} .${__BuildArch} .${__BuildType} .log"
131
+ __BuildWrn=" $__LogsDir /${__BuildLogRootName} .${__BuildOS} .${__BuildArch} .${__BuildType} .wrn"
132
+ __BuildErr=" $__LogsDir /${__BuildLogRootName} .${__BuildOS} .${__BuildArch} .${__BuildType} .err"
133
+ __MsbuildLog=" /fileloggerparameters:\" Verbosity=normal;LogFile=${__BuildLog} \" "
134
+ __MsbuildWrn=" /fileloggerparameters1:\" WarningsOnly;LogFile=${__BuildWrn} \" "
135
+ __MsbuildErr=" /fileloggerparameters2:\" ErrorsOnly;LogFile=${__BuildErr} \" "
136
+ __Logging=" $__MsbuildLog $__MsbuildWrn $__MsbuildErr /consoleloggerparameters:$buildVerbosity "
137
+
138
+ nextCommand=" \" ${__DotNetCli} \" msbuild \" ${__ProjectDir} /tests/runtest.proj\" /p:RestoreAdditionalProjectSources=https://dotnet.myget.org/F/dotnet-core/ /p:BuildWrappers=true /p:TargetsWindows=false $__Logging /p:__BuildOS=$__BuildOS /p:__BuildType=$__BuildType /p:__BuildArch=$__BuildArch "
139
+ echo " $nextCommand "
140
+ eval $nextCommand
136
141
137
142
if [ $? -ne 0 ]; then
138
143
echo " ${__MsgPrefix} Error: build failed. Refer to the build log files for details (above)"
@@ -147,6 +152,8 @@ build_test_wrappers()
147
152
148
153
generate_layout ()
149
154
{
155
+ echo " ${__MsgPrefix} Creating test overlay..."
156
+
150
157
__TestDir=$__ProjectDir /tests
151
158
__ProjectFilesDir=$__TestDir
152
159
__TestBinDir=$__TestWorkingDir
@@ -195,13 +202,13 @@ generate_layout()
195
202
echo " ${__MsgPrefix} Creating test overlay..."
196
203
197
204
if [ -z " $xUnitTestBinBase " ]; then
198
- xUnitTestBinBase=$__TestWorkingDir
205
+ xUnitTestBinBase=$__TestWorkingDir
199
206
fi
200
207
201
208
export CORE_ROOT=$xUnitTestBinBase /Tests/Core_Root
202
209
203
210
if [ -d " ${CORE_ROOT} " ]; then
204
- rm -rf $CORE_ROOT
211
+ rm -rf $CORE_ROOT
205
212
fi
206
213
207
214
mkdir -p $CORE_ROOT
@@ -213,18 +220,18 @@ generate_layout()
213
220
214
221
# Make sure to copy over the pulled down packages
215
222
cp -r $__BinDir /* $CORE_ROOT / > /dev/null
216
-
217
223
}
218
224
219
225
generate_testhost ()
220
226
{
227
+ echo " ${__MsgPrefix} Generating test host..."
228
+
221
229
export TEST_HOST=$xUnitTestBinBase /testhost
222
230
223
231
if [ -d " ${TEST_HOST} " ]; then
224
232
rm -rf $TEST_HOST
225
233
fi
226
234
227
- echo " ${__MsgPrefix} Creating test overlay..."
228
235
mkdir -p $TEST_HOST
229
236
230
237
build_MSBuild_projects " Tests_Generate_TestHost" " ${__ProjectDir} /tests/runtest.proj" " Creating test host" " -testHost"
@@ -233,6 +240,8 @@ generate_testhost()
233
240
234
241
build_Tests ()
235
242
{
243
+ echo " ${__MsgPrefix} Building Tests..."
244
+
236
245
__TestDir=$__ProjectDir /tests
237
246
__ProjectFilesDir=$__TestDir
238
247
__TestBinDir=$__TestWorkingDir
@@ -317,9 +326,9 @@ build_Tests()
317
326
echo " ${__MsgPrefix} Error: Check Test Build failed."
318
327
exit 1
319
328
fi
320
-
321
- echo " Managed tests build success!"
322
329
fi
330
+
331
+ echo " Managed tests build success!"
323
332
fi
324
333
325
334
build_test_wrappers
@@ -328,8 +337,6 @@ build_Tests()
328
337
__up=-updateinvalidpackageversion
329
338
fi
330
339
331
- echo " ${__MsgPrefix} Creating test overlay..."
332
-
333
340
generate_layout
334
341
335
342
if [ $__ZipTests -ne 0 ]; then
@@ -392,10 +399,9 @@ build_MSBuild_projects()
392
399
buildArgs+=(" ${__RunArgs[@]} " )
393
400
buildArgs+=(" ${__UnprocessedBuildArgs[@]} " )
394
401
395
- echo " Building step '$stepName ' slice=$slice via $buildCommand "
396
-
397
- # Invoke MSBuild
398
- " $__ProjectRoot /run.sh" build " ${buildArgs[@]} "
402
+ nextCommand=" \" $__ProjectRoot /run.sh\" build ${buildArgs[@]} "
403
+ echo " Building step '$stepName ' slice=$slice via $nextCommand "
404
+ eval $nextCommand
399
405
400
406
# Make sure everything is OK
401
407
if [ $? -ne 0 ]; then
@@ -421,10 +427,9 @@ build_MSBuild_projects()
421
427
buildArgs+=(" ${__RunArgs[@]} " )
422
428
buildArgs+=(" ${__UnprocessedBuildArgs[@]} " )
423
429
424
- echo " Building step '$stepName ' via $buildCommand "
425
-
426
- # Invoke MSBuild
427
- " $__ProjectRoot /run.sh" build " ${buildArgs[@]} "
430
+ nextCommand=" \" $__ProjectRoot /run.sh\" build ${buildArgs[@]} "
431
+ echo " Building step '$stepName ' via $nextCommand "
432
+ eval $nextCommand
428
433
429
434
# Make sure everything is OK
430
435
if [ $? -ne 0 ]; then
@@ -482,8 +487,9 @@ build_native_projects()
482
487
pushd " $intermediatesForBuild "
483
488
# Regenerate the CMake solution
484
489
# Force cross dir to point to project root cross dir, in case there is a cross build.
485
- echo " Invoking CONFIG_DIR=\" $__ProjectRoot /cross\" \" $__ProjectRoot /src/pal/tools/gen-buildsys-clang.sh\" \" $__TestDir \" $__ClangMajorVersion $__ClangMinorVersion $platformArch $__BuildType $__CodeCoverage $generator $extraCmakeArguments $__cmakeargs "
486
- CONFIG_DIR=" $__ProjectRoot /cross" " $__ProjectRoot /src/pal/tools/gen-buildsys-clang.sh" " $__TestDir " $__ClangMajorVersion $__ClangMinorVersion $platformArch $__BuildType $__CodeCoverage $generator " $extraCmakeArguments " " $__cmakeargs "
490
+ nextCommand=" CONFIG_DIR=\" $__ProjectRoot /cross\" \" $__ProjectRoot /src/pal/tools/gen-buildsys-clang.sh\" \" $__TestDir \" $__ClangMajorVersion $__ClangMinorVersion $platformArch $__BuildType $__CodeCoverage $generator $extraCmakeArguments $__cmakeargs "
491
+ echo " Invoking $nextCommand "
492
+ eval $nextCommand
487
493
popd
488
494
fi
489
495
@@ -733,8 +739,8 @@ while :; do
733
739
;;
734
740
735
741
verbose)
736
- __VerboseBuild=1
737
- ;;
742
+ __VerboseBuild=1
743
+ ;;
738
744
739
745
clang3.5|-clang3.5)
740
746
__ClangMajorVersion=3
@@ -808,9 +814,11 @@ while :; do
808
814
generatelayoutonly)
809
815
__GenerateLayoutOnly=1
810
816
;;
817
+
811
818
generatetesthostonly)
812
819
__GenerateTestHostOnly=1
813
820
;;
821
+
814
822
skiprestorepackages)
815
823
__SkipRestorePackages=1
816
824
;;
@@ -834,10 +842,12 @@ while :; do
834
842
msbuildonunsupportedplatform)
835
843
__msbuildonunsupportedplatform=1
836
844
;;
845
+
837
846
priority1)
838
847
__priority1=1
839
848
__UnprocessedBuildArgs+=(" -priority=1" )
840
849
;;
850
+
841
851
* )
842
852
__UnprocessedBuildArgs+=(" $1 " )
843
853
;;
@@ -934,15 +944,12 @@ __CoreClrVersion=1.1.0
934
944
__sharedFxDir=$__BuildToolsDir /dotnetcli/shared/Microsoft.NETCore.App/$__CoreClrVersion /
935
945
936
946
if [[ (-z " $__GenerateLayoutOnly " ) && (-z " $__GenerateTestHostOnly " ) && (-z " $__BuildTestWrappersOnly " ) ]]; then
937
- echo " Building Tests..."
938
947
build_Tests
939
948
elif [ ! -z " $__BuildTestWrappersOnly " ]; then
940
949
build_test_wrappers
941
950
else
942
- echo " Generating test layout..."
943
951
generate_layout
944
952
if [ ! -z " $__GenerateTestHostOnly " ]; then
945
- echo " Generating test host..."
946
953
generate_testhost
947
954
fi
948
955
fi
@@ -961,9 +968,9 @@ if [ $__RunTests -ne 0 ]; then
961
968
962
969
echo " Run Tests..."
963
970
964
- echo " ${ __TestDir} /runtest.sh --testRootDir=$__TestBinDir --coreClrBinDir=$__BinDir --coreFxBinDir=$__sharedFxDir --testNativeBinDir=$__testNativeBinDir "
965
-
966
- $__TestDir /runtest.sh --testRootDir= $__TestBinDir --coreClrBinDir= $__BinDir --coreFxBinDir= $CORE_ROOT --testNativeBinDir= $__testNativeBinDir
971
+ nextCommand= " $ __TestDir /runtest.sh --testRootDir=$__TestBinDir --coreClrBinDir=$__BinDir --coreFxBinDir=$CORE_ROOT --testNativeBinDir=$__testNativeBinDir "
972
+ echo " $nextCommand "
973
+ eval $nextCommand
967
974
968
975
echo " Tests run successful."
969
976
else
0 commit comments