[Tizen] Add skiprestore option to skip restore of packages
authorGleb Balykov <g.balykov@samsung.com>
Wed, 15 Jul 2020 10:29:10 +0000 (13:29 +0300)
committerAlexander Soldatov/AI Compiler Lab /SRR/Staff Engineer/Samsung Electronics <soldatov.a@samsung.com>
Thu, 23 Jul 2020 13:00:54 +0000 (16:00 +0300)
Partial cherry-pick of https://github.com/dotnet/coreclr/pull/27633

build-test.sh

index 538f0c3..94c9a4b 100755 (executable)
@@ -320,6 +320,11 @@ build_Tests()
 
     if [ ${__SkipRestorePackages} != 1 ]; then
         build_MSBuild_projects "Restore_Product" "${__ProjectDir}/tests/build.proj" "Restore product binaries (build tests)" "/t:BatchRestorePackages"
+
+        if [ $? -ne 0 ]; then
+            echo "${__ErrMsgPrefix}${__MsgPrefix}Error: package restoration failed. Refer to the build log files for details (above)"
+            exit 1
+        fi
     fi
 
     if [ $__SkipNative != 1 ]; then
@@ -418,6 +423,7 @@ build_MSBuild_projects()
             buildArgs+=("${extraBuildParameters[@]}")
             buildArgs+=("${__CommonMSBuildArgs[@]}")
             buildArgs+=("${__UnprocessedBuildArgs[@]}")
+            buildArgs+=("/p:__SkipPackageRestore=true");
 
             nextCommand="\"$__ProjectRoot/dotnet.sh\" msbuild ${buildArgs[@]}"
             echo "Building step '$stepName' testGroupToBuild=$testGroupToBuild via $nextCommand"