Skip to content

Commit b7174dd

Browse files
authored
Merge pull request libgit2#4867 from libgit2/ethomson/ci
ci: Fix some minor issues
2 parents 623647a + f195c38 commit b7174dd

File tree

3 files changed

+22
-11
lines changed

3 files changed

+22
-11
lines changed

azure-pipelines/nightly.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
pool:
88
vmImage: 'Ubuntu 16.04'
99
steps:
10-
- template: azure-pipelines/docker.yml
10+
- template: docker.yml
1111
parameters:
1212
imageName: 'libgit2/trusty-amd64:latest'
1313
environmentVariables: |
@@ -20,7 +20,7 @@ jobs:
2020
pool:
2121
vmImage: 'Ubuntu 16.04'
2222
steps:
23-
- template: azure-pipelines/docker.yml
23+
- template: docker.yml
2424
parameters:
2525
imageName: 'libgit2/trusty-amd64:latest'
2626
environmentVariables: |
@@ -33,7 +33,7 @@ jobs:
3333
pool:
3434
vmImage: 'Ubuntu 16.04'
3535
steps:
36-
- template: azure-pipelines/docker.yml
36+
- template: docker.yml
3737
parameters:
3838
imageName: 'libgit2/trusty-amd64:latest'
3939
environmentVariables: |
@@ -46,7 +46,7 @@ jobs:
4646
pool:
4747
vmImage: 'Ubuntu 16.04'
4848
steps:
49-
- template: azure-pipelines/docker.yml
49+
- template: docker.yml
5050
parameters:
5151
imageName: 'libgit2/trusty-amd64:latest'
5252
environmentVariables: |
@@ -61,7 +61,7 @@ jobs:
6161
steps:
6262
- bash: . '$(Build.SourcesDirectory)/ci/setup-osx.sh'
6363
displayName: Setup
64-
- template: azure-pipelines/bash.yml
64+
- template: bash.yml
6565
parameters:
6666
environmentVariables:
6767
TMPDIR: $(Agent.TempDirectory)
@@ -73,7 +73,7 @@ jobs:
7373
displayName: 'Windows (amd64; Visual Studio)'
7474
pool: Hosted
7575
steps:
76-
- template: azure-pipelines/powershell.yml
76+
- template: powershell.yml
7777
parameters:
7878
environmentVariables:
7979
CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013 Win64"
@@ -82,7 +82,7 @@ jobs:
8282
displayName: 'Windows (x86; Visual Studio)'
8383
pool: Hosted
8484
steps:
85-
- template: azure-pipelines/powershell.yml
85+
- template: powershell.yml
8686
parameters:
8787
environmentVariables:
8888
CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013"
@@ -96,7 +96,7 @@ jobs:
9696
env:
9797
TEMP: $(Agent.TempDirectory)
9898
ARCH: amd64
99-
- template: azure-pipelines/powershell.yml
99+
- template: powershell.yml
100100
parameters:
101101
environmentVariables:
102102
CMAKE_OPTIONS: -G"MinGW Makefiles"
@@ -112,7 +112,7 @@ jobs:
112112
env:
113113
TEMP: $(Agent.TempDirectory)
114114
ARCH: x86
115-
- template: azure-pipelines/powershell.yml
115+
- template: powershell.yml
116116
parameters:
117117
environmentVariables:
118118
CMAKE_OPTIONS: -G"MinGW Makefiles"

ci/test.ps1

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,17 @@ if ($Env:SKIP_TESTS) { exit }
1919
function run_test {
2020
$TestName = $args[0]
2121

22+
$TestCommand = (ctest -N -V -R "^$TestName$") -join "`n"
23+
24+
if (-Not ($TestCommand -match "(?ms).*\n^[0-9]*: Test command: ")) {
25+
echo "Could not find tests: $TestName"
26+
exit
27+
}
28+
2229
$TestCommand = (ctest -N -V -R "^$TestName$") -join "`n" -replace "(?ms).*\n^[0-9]*: Test command: ","" -replace "\n.*",""
2330
$TestCommand += " -r${BuildDir}\results_${TestName}.xml"
2431

25-
Write-Host $TestCommand
2632
Invoke-Expression $TestCommand
27-
2833
if ($LastExitCode -ne 0) { $global:Success = $false }
2934
}
3035

ci/test.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ failure() {
4444
# JUnit-style XML files.
4545
run_test() {
4646
TEST_CMD=$(ctest -N -V -R "^${1}$" | sed -n 's/^[0-9]*: Test command: //p')
47+
48+
if [ -z "$TEST_CMD" ]; then
49+
echo "Could not find tests: $1"
50+
exit 1
51+
fi
52+
4753
TEST_CMD="${TEST_CMD} -r${BUILD_DIR}/results_${1}.xml"
4854

4955
if [ "$LEAK_CHECK" = "valgrind" ]; then

0 commit comments

Comments
 (0)