[ci] Improve netcore build telemetry by running nupkg and tests through build.sh...
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Wed, 16 Oct 2019 16:52:13 +0000 (18:52 +0200)
committerGitHub <noreply@github.com>
Wed, 16 Oct 2019 16:52:13 +0000 (18:52 +0200)
Follow-up to https://github.com/mono/mono/pull/17331.

We were running nuget pack and tests explicitly in the Azure Pipelines
config so we weren't capturing failure telemetry.

Commit migrated from https://github.com/mono/mono/commit/cd6e574b87b4746afa980165a52e0eb0a95be58e

src/mono/netcore/build.sh

index 128fd7b..4e57916 100755 (executable)
@@ -133,13 +133,19 @@ fi
 
 # create a nupkg with runtime and System.Private.CoreLib
 if [ "$pack" = "true" ]; then
-  make nupkg || (Write-PipelineTelemetryError -c "nupkg" -e 1 "Error packing NuGet package" && exit 1)
+  if [ "$llvm" = "true" ]; then
+    make nupkg-llvm || (Write-PipelineTelemetryError -c "nupkg" -e 1 "Error packing NuGet package" && exit 1)
+  else
+    make nupkg || (Write-PipelineTelemetryError -c "nupkg" -e 1 "Error packing NuGet package" && exit 1)
+  fi
 fi
 
 # run all xunit tests
 if [ "$test" = "true" ]; then
-  make update-tests-corefx
-  for testdir in corefx/tests/extracted/*; do
-    ../scripts/ci/./run-step.sh --label=$(basename $testdir) --timeout=15m make run-tests-corefx-$(basename $testdir) || (Write-PipelineTelemetryError -c "tests" -e 1 "Error running tests from ${testdir}" && exit 1)
-  done
+  make update-tests-corefx || (Write-PipelineTelemetryError -c "tests-download" -e 1 "Error downloading tests" && exit 1)
+  if [ "$ci" = "true" ]; then
+    make run-tests-corefx USE_TIMEOUT=1 || (Write-PipelineTelemetryError -c "tests" -e 1 "Error running tests" && exit 1)
+  else
+    make run-tests-corefx
+  fi
 fi