summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-10-26 14:59:50 +0100
committerGitHub <noreply@github.com>2018-10-26 14:59:50 +0100
commitb7174dde7cd819fb0c956f368e8eb09656906dd0 (patch)
treeb5fed137610aff72bb65fe656f9448fb2a03cdbf
parent623647af9959e0ce8d265ef0060a01b0da6b5fd4 (diff)
parentf195c385fb525b9855b41bd4fb6c54f38942abb0 (diff)
downloadlibgit2-b7174dde7cd819fb0c956f368e8eb09656906dd0.tar.gz
Merge pull request #4867 from libgit2/ethomson/ci
ci: Fix some minor issues
-rw-r--r--azure-pipelines/nightly.yml18
-rw-r--r--ci/test.ps19
-rwxr-xr-xci/test.sh6
3 files changed, 22 insertions, 11 deletions
diff --git a/azure-pipelines/nightly.yml b/azure-pipelines/nightly.yml
index 098ea145d..5de949ac7 100644
--- a/azure-pipelines/nightly.yml
+++ b/azure-pipelines/nightly.yml
@@ -7,7 +7,7 @@ jobs:
pool:
vmImage: 'Ubuntu 16.04'
steps:
- - template: azure-pipelines/docker.yml
+ - template: docker.yml
parameters:
imageName: 'libgit2/trusty-amd64:latest'
environmentVariables: |
@@ -20,7 +20,7 @@ jobs:
pool:
vmImage: 'Ubuntu 16.04'
steps:
- - template: azure-pipelines/docker.yml
+ - template: docker.yml
parameters:
imageName: 'libgit2/trusty-amd64:latest'
environmentVariables: |
@@ -33,7 +33,7 @@ jobs:
pool:
vmImage: 'Ubuntu 16.04'
steps:
- - template: azure-pipelines/docker.yml
+ - template: docker.yml
parameters:
imageName: 'libgit2/trusty-amd64:latest'
environmentVariables: |
@@ -46,7 +46,7 @@ jobs:
pool:
vmImage: 'Ubuntu 16.04'
steps:
- - template: azure-pipelines/docker.yml
+ - template: docker.yml
parameters:
imageName: 'libgit2/trusty-amd64:latest'
environmentVariables: |
@@ -61,7 +61,7 @@ jobs:
steps:
- bash: . '$(Build.SourcesDirectory)/ci/setup-osx.sh'
displayName: Setup
- - template: azure-pipelines/bash.yml
+ - template: bash.yml
parameters:
environmentVariables:
TMPDIR: $(Agent.TempDirectory)
@@ -73,7 +73,7 @@ jobs:
displayName: 'Windows (amd64; Visual Studio)'
pool: Hosted
steps:
- - template: azure-pipelines/powershell.yml
+ - template: powershell.yml
parameters:
environmentVariables:
CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013 Win64"
@@ -82,7 +82,7 @@ jobs:
displayName: 'Windows (x86; Visual Studio)'
pool: Hosted
steps:
- - template: azure-pipelines/powershell.yml
+ - template: powershell.yml
parameters:
environmentVariables:
CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013"
@@ -96,7 +96,7 @@ jobs:
env:
TEMP: $(Agent.TempDirectory)
ARCH: amd64
- - template: azure-pipelines/powershell.yml
+ - template: powershell.yml
parameters:
environmentVariables:
CMAKE_OPTIONS: -G"MinGW Makefiles"
@@ -112,7 +112,7 @@ jobs:
env:
TEMP: $(Agent.TempDirectory)
ARCH: x86
- - template: azure-pipelines/powershell.yml
+ - template: powershell.yml
parameters:
environmentVariables:
CMAKE_OPTIONS: -G"MinGW Makefiles"
diff --git a/ci/test.ps1 b/ci/test.ps1
index 1cf02118f..fdfa1fec7 100644
--- a/ci/test.ps1
+++ b/ci/test.ps1
@@ -19,12 +19,17 @@ if ($Env:SKIP_TESTS) { exit }
function run_test {
$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 += " -r${BuildDir}\results_${TestName}.xml"
- Write-Host $TestCommand
Invoke-Expression $TestCommand
-
if ($LastExitCode -ne 0) { $global:Success = $false }
}
diff --git a/ci/test.sh b/ci/test.sh
index 5d7c913c8..1bc710a73 100755
--- a/ci/test.sh
+++ b/ci/test.sh
@@ -44,6 +44,12 @@ failure() {
# JUnit-style XML files.
run_test() {
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"
if [ "$LEAK_CHECK" = "valgrind" ]; then