From c4452f06c76ceb70073c6a3ec92dcaed1e84a938 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 27 Nov 2018 18:48:13 -0800 Subject: [PATCH] Disable tests for ARM legs --- eng/build.yml | 22 +++++++++++++++++----- eng/setcitestinfo.bat | 15 +++++++++++++++ eng/setcitestinfo.sh | 14 ++++++++++++++ 3 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 eng/setcitestinfo.bat create mode 100755 eng/setcitestinfo.sh diff --git a/eng/build.yml b/eng/build.yml index d5cfea175..8475fdaac 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -25,9 +25,20 @@ phases: AdditionalBuildParameters: $(_AdditionalBuildParameters) steps: + - script: 'eng\setcitestinfo.bat $(BuildArchitecture)' + condition: eq(variables['_AgentOSName'], 'Windows_NT') + displayName: Set test info (Windows) + - script: 'eng/setcitestinfo.sh $(BuildArchitecture)' + condition: ne(variables['_AgentOSName'], 'Windows_NT') + displayName: Set test info (Non-Windows) + - script: 'echo TestParameter: $(TestParameter)' + displayName: Show TestParameter + - script: 'echo RunTests: $(RunTests)' + displayName: Show RunTests - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - script: build.cmd - -test -pack -publish + $(TestParameter) + -pack -publish -Configuration $(BuildConfig) -Architecture $(BuildArchitecture) $(AdditionalBuildParameters) @@ -38,7 +49,8 @@ phases: - ${{ if eq(parameters.agentOs, 'Linux') }}: - script: ./build.sh - --test --pack --publish + $(TestParameter) + --pack --publish --noprettyprint --configuration $(BuildConfig) $(DockerParameter) @@ -52,7 +64,8 @@ phases: - ${{ if eq(parameters.agentOs, 'Darwin') }}: - script: ./build.sh - --test --pack --publish + $(TestParameter) + --pack --publish --noprettyprint --configuration $(BuildConfig) displayName: Build @@ -65,8 +78,7 @@ phases: testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' platform: '$(BuildPlatform)' configuration: '$(_BuildConfig)' - condition: and(succeededOrFailed(), ne(variables['PB_SkipTests'], 'true')) - + condition: and(succeededOrFailed(), ne(variables['PB_SkipTests'], 'true'), ne(variables['RunTests'], 'false')) - task: CopyFiles@2 displayName: Gather Logs inputs: diff --git a/eng/setcitestinfo.bat b/eng/setcitestinfo.bat new file mode 100644 index 000000000..ce8d9c28f --- /dev/null +++ b/eng/setcitestinfo.bat @@ -0,0 +1,15 @@ +@echo off + +setlocal + +set Architecture=%1 + +IF /I "%Architecture:~0,3%"=="ARM" ( + ECHO ARM + ECHO ##vso[task.setvariable variable=TestParameter] + ECHO ##vso[task.setvariable variable=RunTests]false +) ELSE ( + ECHO NOT ARM + ECHO ##vso[task.setvariable variable=TestParameter]-test + ECHO ##vso[task.setvariable variable=RunTests]true +) \ No newline at end of file diff --git a/eng/setcitestinfo.sh b/eng/setcitestinfo.sh new file mode 100755 index 000000000..d4a6609be --- /dev/null +++ b/eng/setcitestinfo.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +shopt -s nocasematch + +if [[ "$1" == ARM* ]] +then + echo "ARM" + echo "##vso[task.setvariable variable=TestParameter]" + echo "##vso[task.setvariable variable=RunTests]false" +else + echo "NOT ARM" + echo "##vso[task.setvariable variable=TestParameter]--test" + echo "##vso[task.setvariable variable=RunTests]true" +fi \ No newline at end of file