Unverified Commit b7174dde by Edward Thomson Committed by GitHub

Merge pull request #4867 from libgit2/ethomson/ci

ci: Fix some minor issues
parents 623647af f195c385
...@@ -7,7 +7,7 @@ jobs: ...@@ -7,7 +7,7 @@ jobs:
pool: pool:
vmImage: 'Ubuntu 16.04' vmImage: 'Ubuntu 16.04'
steps: steps:
- template: azure-pipelines/docker.yml - template: docker.yml
parameters: parameters:
imageName: 'libgit2/trusty-amd64:latest' imageName: 'libgit2/trusty-amd64:latest'
environmentVariables: | environmentVariables: |
...@@ -20,7 +20,7 @@ jobs: ...@@ -20,7 +20,7 @@ jobs:
pool: pool:
vmImage: 'Ubuntu 16.04' vmImage: 'Ubuntu 16.04'
steps: steps:
- template: azure-pipelines/docker.yml - template: docker.yml
parameters: parameters:
imageName: 'libgit2/trusty-amd64:latest' imageName: 'libgit2/trusty-amd64:latest'
environmentVariables: | environmentVariables: |
...@@ -33,7 +33,7 @@ jobs: ...@@ -33,7 +33,7 @@ jobs:
pool: pool:
vmImage: 'Ubuntu 16.04' vmImage: 'Ubuntu 16.04'
steps: steps:
- template: azure-pipelines/docker.yml - template: docker.yml
parameters: parameters:
imageName: 'libgit2/trusty-amd64:latest' imageName: 'libgit2/trusty-amd64:latest'
environmentVariables: | environmentVariables: |
...@@ -46,7 +46,7 @@ jobs: ...@@ -46,7 +46,7 @@ jobs:
pool: pool:
vmImage: 'Ubuntu 16.04' vmImage: 'Ubuntu 16.04'
steps: steps:
- template: azure-pipelines/docker.yml - template: docker.yml
parameters: parameters:
imageName: 'libgit2/trusty-amd64:latest' imageName: 'libgit2/trusty-amd64:latest'
environmentVariables: | environmentVariables: |
...@@ -61,7 +61,7 @@ jobs: ...@@ -61,7 +61,7 @@ jobs:
steps: steps:
- bash: . '$(Build.SourcesDirectory)/ci/setup-osx.sh' - bash: . '$(Build.SourcesDirectory)/ci/setup-osx.sh'
displayName: Setup displayName: Setup
- template: azure-pipelines/bash.yml - template: bash.yml
parameters: parameters:
environmentVariables: environmentVariables:
TMPDIR: $(Agent.TempDirectory) TMPDIR: $(Agent.TempDirectory)
...@@ -73,7 +73,7 @@ jobs: ...@@ -73,7 +73,7 @@ jobs:
displayName: 'Windows (amd64; Visual Studio)' displayName: 'Windows (amd64; Visual Studio)'
pool: Hosted pool: Hosted
steps: steps:
- template: azure-pipelines/powershell.yml - template: powershell.yml
parameters: parameters:
environmentVariables: environmentVariables:
CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013 Win64" CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013 Win64"
...@@ -82,7 +82,7 @@ jobs: ...@@ -82,7 +82,7 @@ jobs:
displayName: 'Windows (x86; Visual Studio)' displayName: 'Windows (x86; Visual Studio)'
pool: Hosted pool: Hosted
steps: steps:
- template: azure-pipelines/powershell.yml - template: powershell.yml
parameters: parameters:
environmentVariables: environmentVariables:
CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013" CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013"
...@@ -96,7 +96,7 @@ jobs: ...@@ -96,7 +96,7 @@ jobs:
env: env:
TEMP: $(Agent.TempDirectory) TEMP: $(Agent.TempDirectory)
ARCH: amd64 ARCH: amd64
- template: azure-pipelines/powershell.yml - template: powershell.yml
parameters: parameters:
environmentVariables: environmentVariables:
CMAKE_OPTIONS: -G"MinGW Makefiles" CMAKE_OPTIONS: -G"MinGW Makefiles"
...@@ -112,7 +112,7 @@ jobs: ...@@ -112,7 +112,7 @@ jobs:
env: env:
TEMP: $(Agent.TempDirectory) TEMP: $(Agent.TempDirectory)
ARCH: x86 ARCH: x86
- template: azure-pipelines/powershell.yml - template: powershell.yml
parameters: parameters:
environmentVariables: environmentVariables:
CMAKE_OPTIONS: -G"MinGW Makefiles" CMAKE_OPTIONS: -G"MinGW Makefiles"
......
...@@ -19,12 +19,17 @@ if ($Env:SKIP_TESTS) { exit } ...@@ -19,12 +19,17 @@ if ($Env:SKIP_TESTS) { exit }
function run_test { function run_test {
$TestName = $args[0] $TestName = $args[0]
$TestCommand = (ctest -N -V -R "^$TestName$") -join "`n"
if (-Not ($TestCommand -match "(?ms).*\n^[0-9]*: Test command: ")) {
echo "Could not find tests: $TestName"
exit
}
$TestCommand = (ctest -N -V -R "^$TestName$") -join "`n" -replace "(?ms).*\n^[0-9]*: Test command: ","" -replace "\n.*","" $TestCommand = (ctest -N -V -R "^$TestName$") -join "`n" -replace "(?ms).*\n^[0-9]*: Test command: ","" -replace "\n.*",""
$TestCommand += " -r${BuildDir}\results_${TestName}.xml" $TestCommand += " -r${BuildDir}\results_${TestName}.xml"
Write-Host $TestCommand
Invoke-Expression $TestCommand Invoke-Expression $TestCommand
if ($LastExitCode -ne 0) { $global:Success = $false } if ($LastExitCode -ne 0) { $global:Success = $false }
} }
......
...@@ -44,6 +44,12 @@ failure() { ...@@ -44,6 +44,12 @@ failure() {
# JUnit-style XML files. # JUnit-style XML files.
run_test() { run_test() {
TEST_CMD=$(ctest -N -V -R "^${1}$" | sed -n 's/^[0-9]*: Test command: //p') TEST_CMD=$(ctest -N -V -R "^${1}$" | sed -n 's/^[0-9]*: Test command: //p')
if [ -z "$TEST_CMD" ]; then
echo "Could not find tests: $1"
exit 1
fi
TEST_CMD="${TEST_CMD} -r${BUILD_DIR}/results_${1}.xml" TEST_CMD="${TEST_CMD} -r${BUILD_DIR}/results_${1}.xml"
if [ "$LEAK_CHECK" = "valgrind" ]; then if [ "$LEAK_CHECK" = "valgrind" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment