@@ -10,7 +10,7 @@ phases:
10
10
name : Hosted Ubuntu 1604
11
11
steps :
12
12
- bash : |
13
- test -z "$GITFILESHAREPWD" || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
13
+ test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
14
14
15
15
sudo apt-get update &&
16
16
sudo rm /var/lib/apt/lists/lock &&
@@ -24,7 +24,7 @@ phases:
24
24
exit 1
25
25
}
26
26
27
- test -z "$GITFILESHAREPWD" || sudo umount "$HOME/test-cache" || exit 1
27
+ test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1
28
28
displayName: 'ci/run-build-and-tests.sh'
29
29
env:
30
30
GITFILESHAREPWD: $(gitfileshare.pwd)
@@ -44,7 +44,7 @@ phases:
44
44
name : Hosted Ubuntu 1604
45
45
steps :
46
46
- bash : |
47
- test -z "$GITFILESHAREPWD" || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
47
+ test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
48
48
49
49
sudo apt-get update &&
50
50
sudo rm /var/lib/apt/lists/lock &&
@@ -56,7 +56,7 @@ phases:
56
56
exit 1
57
57
}
58
58
59
- test -z "$GITFILESHAREPWD" || sudo umount "$HOME/test-cache" || exit 1
59
+ test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1
60
60
displayName: 'ci/run-build-and-tests.sh'
61
61
env:
62
62
GITFILESHAREPWD: $(gitfileshare.pwd)
@@ -76,7 +76,7 @@ phases:
76
76
name : Hosted macOS
77
77
steps :
78
78
- bash : |
79
- test -z "$GITFILESHAREPWD" || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
79
+ test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
80
80
81
81
export CC=clang
82
82
@@ -86,7 +86,7 @@ phases:
86
86
exit 1
87
87
}
88
88
89
- test -z "$GITFILESHAREPWD" || umount "$HOME/test-cache" || exit 1
89
+ test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || umount "$HOME/test-cache" || exit 1
90
90
displayName: 'ci/run-build-and-tests.sh'
91
91
env:
92
92
GITFILESHAREPWD: $(gitfileshare.pwd)
@@ -106,15 +106,15 @@ phases:
106
106
name : Hosted macOS
107
107
steps :
108
108
- bash : |
109
- test -z "$GITFILESHAREPWD" || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
109
+ test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
110
110
111
111
ci/install-dependencies.sh
112
112
ci/run-build-and-tests.sh || {
113
113
ci/print-test-failures.sh
114
114
exit 1
115
115
}
116
116
117
- test -z "$GITFILESHAREPWD" || umount "$HOME/test-cache" || exit 1
117
+ test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || umount "$HOME/test-cache" || exit 1
118
118
displayName: 'ci/run-build-and-tests.sh'
119
119
env:
120
120
GITFILESHAREPWD: $(gitfileshare.pwd)
@@ -134,7 +134,7 @@ phases:
134
134
name : Hosted Ubuntu 1604
135
135
steps :
136
136
- bash : |
137
- test -z "$GITFILESHAREPWD" || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
137
+ test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
138
138
139
139
sudo apt-get update &&
140
140
sudo rm /var/lib/apt/lists/lock &&
@@ -147,7 +147,7 @@ phases:
147
147
exit 1
148
148
}
149
149
150
- test -z "$GITFILESHAREPWD" || sudo umount "$HOME/test-cache" || exit 1
150
+ test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1
151
151
displayName: 'ci/run-build-and-tests.sh'
152
152
env:
153
153
GITFILESHAREPWD: $(gitfileshare.pwd)
@@ -171,7 +171,7 @@ phases:
171
171
# Helper to check the error level of the latest command (exit with error when appropriate)
172
172
function c() { if (!$?) { exit(1) } }
173
173
174
- if ("$GITFILESHAREPWD" -ne "") {
174
+ if ("$GITFILESHAREPWD" -ne "" -and "$GITFILESHAREPWD" -ne "`$`(gitfileshare.pwd)" ) {
175
175
net use s: \\gitfileshare.file.core.windows.net\test-cache "$GITFILESHAREPWD" /user:AZURE\gitfileshare /persistent:no; c
176
176
cmd /c mklink /d "$(Build.SourcesDirectory)\test-cache" S:\; c
177
177
}
@@ -223,7 +223,7 @@ phases:
223
223
"@
224
224
c
225
225
226
- if ("$GITFILESHAREPWD" -ne "") {
226
+ if ("$GITFILESHAREPWD" -ne "" -and "$GITFILESHAREPWD" -ne "`$`(gitfileshare.pwd)" ) {
227
227
cmd /c rmdir "$(Build.SourcesDirectory)\test-cache"
228
228
}
229
229
displayName: 'build & test'
@@ -245,7 +245,7 @@ phases:
245
245
name : Hosted Ubuntu 1604
246
246
steps :
247
247
- bash : |
248
- test -z "$GITFILESHAREPWD" || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
248
+ test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
249
249
250
250
sudo apt-get update &&
251
251
sudo rm /var/lib/apt/lists/lock &&
@@ -266,7 +266,7 @@ phases:
266
266
267
267
sudo chmod a+r t/out/TEST-*.xml
268
268
269
- test -z "$GITFILESHAREPWD" || sudo umount "$HOME/test-cache" || exit 1
269
+ test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1
270
270
displayName: 'ci/run-linux32-docker.sh'
271
271
env:
272
272
GITFILESHAREPWD: $(gitfileshare.pwd)
@@ -286,7 +286,7 @@ phases:
286
286
name : Hosted Ubuntu 1604
287
287
steps :
288
288
- bash : |
289
- test -z "$GITFILESHAREPWD" || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
289
+ test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
290
290
291
291
sudo apt-get update &&
292
292
sudo rm /var/lib/apt/lists/lock &&
@@ -296,7 +296,7 @@ phases:
296
296
297
297
ci/run-static-analysis.sh || exit 1
298
298
299
- test -z "$GITFILESHAREPWD" || sudo umount "$HOME/test-cache" || exit 1
299
+ test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1
300
300
displayName: 'ci/run-static-analysis.sh'
301
301
env:
302
302
GITFILESHAREPWD: $(gitfileshare.pwd)
@@ -308,7 +308,7 @@ phases:
308
308
name : Hosted Ubuntu 1604
309
309
steps :
310
310
- bash : |
311
- test -z "$GITFILESHAREPWD" || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
311
+ test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
312
312
313
313
sudo apt-get update &&
314
314
sudo rm /var/lib/apt/lists/lock &&
@@ -319,7 +319,7 @@ phases:
319
319
320
320
ci/test-documentation.sh || exit 1
321
321
322
- test -z "$GITFILESHAREPWD" || sudo umount "$HOME/test-cache" || exit 1
322
+ test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || exit 1
323
323
displayName: 'ci/test-documentation.sh'
324
324
env:
325
325
GITFILESHAREPWD: $(gitfileshare.pwd)
0 commit comments