@@ -126,10 +126,10 @@ function test_rlocation_abs_path() {
126
126
source " $runfiles_lib_path "
127
127
128
128
if is_windows; then
129
- [[ " $( rlocation " c:/Foo" ) " == " c:/Foo" ]] || fail
130
- [[ " $( rlocation " c:\\ Foo" ) " == " c:\\ Foo" ]] || fail
129
+ [[ " $( rlocation " c:/Foo" || echo failed ) " == " c:/Foo" ]] || fail
130
+ [[ " $( rlocation " c:\\ Foo" || echo failed ) " == " c:\\ Foo" ]] || fail
131
131
else
132
- [[ " $( rlocation " /Foo" ) " == " /Foo" ]] || fail
132
+ [[ " $( rlocation " /Foo" || echo failed ) " == " /Foo" ]] || fail
133
133
fi
134
134
}
135
135
@@ -140,35 +140,40 @@ a/b $tmpdir/c/d
140
140
e/f $tmpdir /g h
141
141
y $tmpdir /y
142
142
c/dir $tmpdir /dir
143
+ unresolved $tmpdir /unresolved
143
144
EOF
144
145
mkdir " ${tmpdir} /c"
145
146
mkdir " ${tmpdir} /y"
146
147
mkdir -p " ${tmpdir} /dir/deeply/nested"
147
148
touch " ${tmpdir} /c/d" " ${tmpdir} /g h"
148
149
touch " ${tmpdir} /dir/file"
150
+ ln -s /does/not/exist " ${tmpdir} /dir/unresolved"
149
151
touch " ${tmpdir} /dir/deeply/nested/file"
152
+ ln -s /does/not/exist " ${tmpdir} /unresolved"
150
153
151
154
export RUNFILES_DIR=
152
155
export RUNFILES_MANIFEST_FILE=$tmpdir /foo.runfiles_manifest
153
156
source " $runfiles_lib_path "
154
157
155
- [[ -z " $( rlocation a) " ]] || fail
156
- [[ -z " $( rlocation c/d) " ]] || fail
157
- [[ " $( rlocation a/b) " == " $tmpdir /c/d" ]] || fail
158
- [[ " $( rlocation e/f) " == " $tmpdir /g h" ]] || fail
159
- [[ " $( rlocation y) " == " $tmpdir /y" ]] || fail
160
- [[ " $( rlocation c) " == " " ]] || fail
161
- [[ " $( rlocation c/di) " == " " ]] || fail
162
- [[ " $( rlocation c/dir) " == " $tmpdir /dir" ]] || fail
163
- [[ " $( rlocation c/dir/file) " == " $tmpdir /dir/file" ]] || fail
164
- [[ " $( rlocation c/dir/deeply/nested/file) " == " $tmpdir /dir/deeply/nested/file" ]] || fail
165
- rm -r " $tmpdir /c/d" " $tmpdir /g h" " $tmpdir /y" " $tmpdir /dir"
166
- [[ -z " $( rlocation a/b) " ]] || fail
167
- [[ -z " $( rlocation e/f) " ]] || fail
168
- [[ -z " $( rlocation y) " ]] || fail
169
- [[ -z " $( rlocation c/dir) " ]] || fail
170
- [[ -z " $( rlocation c/dir/file) " ]] || fail
171
- [[ -z " $( rlocation c/dir/deeply/nested/file) " ]] || fail
158
+ [[ -z " $( rlocation a || echo failed) " ]] || fail
159
+ [[ -z " $( rlocation c/d || echo failed) " ]] || fail
160
+ [[ " $( rlocation a/b || echo failed) " == " $tmpdir /c/d" ]] || fail
161
+ [[ " $( rlocation e/f || echo failed) " == " $tmpdir /g h" ]] || fail
162
+ [[ " $( rlocation y || echo failed) " == " $tmpdir /y" ]] || fail
163
+ [[ -z " $( rlocation c || echo failed) " ]] || fail
164
+ [[ -z " $( rlocation c/di || echo failed) " ]] || fail
165
+ [[ " $( rlocation c/dir || echo failed) " == " $tmpdir /dir" ]] || fail
166
+ [[ " $( rlocation c/dir/file || echo failed) " == " $tmpdir /dir/file" ]] || fail
167
+ [[ -z " $( rlocation c/dir/unresolved || echo failed) " ]] || fail
168
+ [[ " $( rlocation c/dir/deeply/nested/file || echo failed) " == " $tmpdir /dir/deeply/nested/file" ]] || fail
169
+ [[ -z " $( rlocation unresolved || echo failed) " ]] || fail
170
+ rm -r " $tmpdir /c/d" " $tmpdir /g h" " $tmpdir /y" " $tmpdir /dir" " $tmpdir /unresolved"
171
+ [[ -z " $( rlocation a/b || echo failed) " ]] || fail
172
+ [[ -z " $( rlocation e/f || echo failed) " ]] || fail
173
+ [[ -z " $( rlocation y || echo failed) " ]] || fail
174
+ [[ -z " $( rlocation c/dir || echo failed) " ]] || fail
175
+ [[ -z " $( rlocation c/dir/file || echo failed) " ]] || fail
176
+ [[ -z " $( rlocation c/dir/deeply/nested/file || echo failed) " ]] || fail
172
177
}
173
178
174
179
function test_manifest_based_envvars() {
@@ -194,15 +199,15 @@ function test_init_directory_based_runfiles() {
194
199
195
200
mkdir -p " $RUNFILES_DIR /a"
196
201
touch " $RUNFILES_DIR /a/b" " $RUNFILES_DIR /c d"
197
- [[ " $( rlocation a) " == " $RUNFILES_DIR /a" ]] || fail
198
- [[ -z " $( rlocation c/d) " ]] || fail
199
- [[ " $( rlocation a/b) " == " $RUNFILES_DIR /a/b" ]] || fail
200
- [[ " $( rlocation " c d" ) " == " $RUNFILES_DIR /c d" ]] || fail
201
- [[ -z " $( rlocation " c" ) " ]] || fail
202
+ [[ " $( rlocation a || echo failed ) " == " $RUNFILES_DIR /a" ]] || fail
203
+ [[ " $( rlocation c/d || echo failed ) " == failed ]] || fail
204
+ [[ " $( rlocation a/b || echo failed ) " == " $RUNFILES_DIR /a/b" ]] || fail
205
+ [[ " $( rlocation " c d" || echo failed ) " == " $RUNFILES_DIR /c d" ]] || fail
206
+ [[ " $( rlocation " c" || echo failed ) " == failed ]] || fail
202
207
rm -r " $RUNFILES_DIR /a" " $RUNFILES_DIR /c d"
203
- [[ -z " $( rlocation a) " ]] || fail
204
- [[ -z " $( rlocation a/b) " ]] || fail
205
- [[ -z " $( rlocation " c d" ) " ]] || fail
208
+ [[ " $( rlocation a || echo failed ) " == failed ]] || fail
209
+ [[ " $( rlocation a/b || echo failed ) " == failed ]] || fail
210
+ [[ " $( rlocation " c d" || echo failed ) " == failed ]] || fail
206
211
}
207
212
208
213
function test_directory_based_runfiles_with_repo_mapping_from_main() {
@@ -228,23 +233,23 @@ EOF
228
233
touch " $RUNFILES_DIR /protobuf~3.19.2/foo/runfile"
229
234
touch " $RUNFILES_DIR /config.json"
230
235
231
- [[ " $( rlocation " my_module/bar/runfile" " " ) " == " $RUNFILES_DIR /_main/bar/runfile" ]] || fail
232
- [[ " $( rlocation " my_workspace/bar/runfile" " " ) " == " $RUNFILES_DIR /_main/bar/runfile" ]] || fail
233
- [[ " $( rlocation " my_protobuf/foo/runfile" " " ) " == " $RUNFILES_DIR /protobuf~3.19.2/foo/runfile" ]] || fail
234
- [[ " $( rlocation " my_protobuf/bar/dir" " " ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir" ]] || fail
235
- [[ " $( rlocation " my_protobuf/bar/dir/file" " " ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir/file" ]] || fail
236
- [[ " $( rlocation " my_protobuf/bar/dir/de eply/nes ted/fi~le" " " ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" ]] || fail
236
+ [[ " $( rlocation " my_module/bar/runfile" " " || echo failed ) " == " $RUNFILES_DIR /_main/bar/runfile" ]] || fail
237
+ [[ " $( rlocation " my_workspace/bar/runfile" " " || echo failed ) " == " $RUNFILES_DIR /_main/bar/runfile" ]] || fail
238
+ [[ " $( rlocation " my_protobuf/foo/runfile" " " || echo failed ) " == " $RUNFILES_DIR /protobuf~3.19.2/foo/runfile" ]] || fail
239
+ [[ " $( rlocation " my_protobuf/bar/dir" " " || echo failed ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir" ]] || fail
240
+ [[ " $( rlocation " my_protobuf/bar/dir/file" " " || echo failed ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir/file" ]] || fail
241
+ [[ " $( rlocation " my_protobuf/bar/dir/de eply/nes ted/fi~le" " " || echo failed ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" ]] || fail
237
242
238
- [[ -z " $( rlocation " protobuf/foo/runfile" " " ) " ]] || fail
239
- [[ -z " $( rlocation " protobuf/bar/dir/dir/de eply/nes ted/fi~le" " " ) " ]] || fail
243
+ [[ " $( rlocation " protobuf/foo/runfile" " " || echo failed ) " == failed ]] || fail
244
+ [[ " $( rlocation " protobuf/bar/dir/dir/de eply/nes ted/fi~le" " " || echo failed ) " == failed ]] || fail
240
245
241
- [[ " $( rlocation " _main/bar/runfile" " " ) " == " $RUNFILES_DIR /_main/bar/runfile" ]] || fail
242
- [[ " $( rlocation " protobuf~3.19.2/foo/runfile" " " ) " == " $RUNFILES_DIR /protobuf~3.19.2/foo/runfile" ]] || fail
243
- [[ " $( rlocation " protobuf~3.19.2/bar/dir" " " ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir" ]] || fail
244
- [[ " $( rlocation " protobuf~3.19.2/bar/dir/file" " " ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir/file" ]] || fail
245
- [[ " $( rlocation " protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" " " ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" ]] || fail
246
+ [[ " $( rlocation " _main/bar/runfile" " " || echo failed ) " == " $RUNFILES_DIR /_main/bar/runfile" ]] || fail
247
+ [[ " $( rlocation " protobuf~3.19.2/foo/runfile" " " || echo failed ) " == " $RUNFILES_DIR /protobuf~3.19.2/foo/runfile" ]] || fail
248
+ [[ " $( rlocation " protobuf~3.19.2/bar/dir" " " || echo failed ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir" ]] || fail
249
+ [[ " $( rlocation " protobuf~3.19.2/bar/dir/file" " " || echo failed ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir/file" ]] || fail
250
+ [[ " $( rlocation " protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" " " || echo failed ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" ]] || fail
246
251
247
- [[ " $( rlocation " config.json" " " ) " == " $RUNFILES_DIR /config.json" ]] || fail
252
+ [[ " $( rlocation " config.json" " " || echo failed ) " == " $RUNFILES_DIR /config.json" ]] || fail
248
253
}
249
254
250
255
function test_directory_based_runfiles_with_repo_mapping_from_other_repo() {
@@ -270,21 +275,21 @@ EOF
270
275
touch " $RUNFILES_DIR /protobuf~3.19.2/foo/runfile"
271
276
touch " $RUNFILES_DIR /config.json"
272
277
273
- [[ " $( rlocation " protobuf/foo/runfile" " protobuf~3.19.2" ) " == " $RUNFILES_DIR /protobuf~3.19.2/foo/runfile" ]] || fail
274
- [[ " $( rlocation " protobuf/bar/dir" " protobuf~3.19.2" ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir" ]] || fail
275
- [[ " $( rlocation " protobuf/bar/dir/file" " protobuf~3.19.2" ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir/file" ]] || fail
276
- [[ " $( rlocation " protobuf/bar/dir/de eply/nes ted/fi~le" " protobuf~3.19.2" ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" ]] || fail
278
+ [[ " $( rlocation " protobuf/foo/runfile" " protobuf~3.19.2" || echo failed ) " == " $RUNFILES_DIR /protobuf~3.19.2/foo/runfile" ]] || fail
279
+ [[ " $( rlocation " protobuf/bar/dir" " protobuf~3.19.2" || echo failed ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir" ]] || fail
280
+ [[ " $( rlocation " protobuf/bar/dir/file" " protobuf~3.19.2" || echo failed ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir/file" ]] || fail
281
+ [[ " $( rlocation " protobuf/bar/dir/de eply/nes ted/fi~le" " protobuf~3.19.2" || echo failed ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" ]] || fail
277
282
278
- [[ -z " $( rlocation " my_module/bar/runfile" " protobuf~3.19.2" ) " ]] || fail
279
- [[ -z " $( rlocation " my_protobuf/bar/dir/de eply/nes ted/fi~le" " protobuf~3.19.2" ) " ]] || fail
283
+ [[ " $( rlocation " my_module/bar/runfile" " protobuf~3.19.2" || echo failed ) " == failed ]] || fail
284
+ [[ " $( rlocation " my_protobuf/bar/dir/de eply/nes ted/fi~le" " protobuf~3.19.2" || echo failed ) " == failed ]] || fail
280
285
281
- [[ " $( rlocation " _main/bar/runfile" " protobuf~3.19.2" ) " == " $RUNFILES_DIR /_main/bar/runfile" ]] || fail
282
- [[ " $( rlocation " protobuf~3.19.2/foo/runfile" " protobuf~3.19.2" ) " == " $RUNFILES_DIR /protobuf~3.19.2/foo/runfile" ]] || fail
283
- [[ " $( rlocation " protobuf~3.19.2/bar/dir" " protobuf~3.19.2" ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir" ]] || fail
284
- [[ " $( rlocation " protobuf~3.19.2/bar/dir/file" " protobuf~3.19.2" ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir/file" ]] || fail
285
- [[ " $( rlocation " protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" " protobuf~3.19.2" ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" ]] || fail
286
+ [[ " $( rlocation " _main/bar/runfile" " protobuf~3.19.2" || echo failed ) " == " $RUNFILES_DIR /_main/bar/runfile" ]] || fail
287
+ [[ " $( rlocation " protobuf~3.19.2/foo/runfile" " protobuf~3.19.2" || echo failed ) " == " $RUNFILES_DIR /protobuf~3.19.2/foo/runfile" ]] || fail
288
+ [[ " $( rlocation " protobuf~3.19.2/bar/dir" " protobuf~3.19.2" || echo failed ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir" ]] || fail
289
+ [[ " $( rlocation " protobuf~3.19.2/bar/dir/file" " protobuf~3.19.2" || echo failed ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir/file" ]] || fail
290
+ [[ " $( rlocation " protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" " protobuf~3.19.2" || echo failed ) " == " $RUNFILES_DIR /protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" ]] || fail
286
291
287
- [[ " $( rlocation " config.json" " protobuf~3.19.2" ) " == " $RUNFILES_DIR /config.json" ]] || fail
292
+ [[ " $( rlocation " config.json" " protobuf~3.19.2" || echo failed ) " == " $RUNFILES_DIR /config.json" ]] || fail
288
293
}
289
294
290
295
function test_manifest_based_runfiles_with_repo_mapping_from_main() {
@@ -316,23 +321,23 @@ EOF
316
321
touch " $tmpdir /protobuf~3.19.2/foo/runfile"
317
322
touch " $tmpdir /config.json"
318
323
319
- [[ " $( rlocation " my_module/bar/runfile" " " ) " == " $tmpdir /_main/bar/runfile" ]] || fail
320
- [[ " $( rlocation " my_workspace/bar/runfile" " " ) " == " $tmpdir /_main/bar/runfile" ]] || fail
321
- [[ " $( rlocation " my_protobuf/foo/runfile" " " ) " == " $tmpdir /protobuf~3.19.2/foo/runfile" ]] || fail
322
- [[ " $( rlocation " my_protobuf/bar/dir" " " ) " == " $tmpdir /protobuf~3.19.2/bar/dir" ]] || fail
323
- [[ " $( rlocation " my_protobuf/bar/dir/file" " " ) " == " $tmpdir /protobuf~3.19.2/bar/dir/file" ]] || fail
324
- [[ " $( rlocation " my_protobuf/bar/dir/de eply/nes ted/fi~le" " " ) " == " $tmpdir /protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" ]] || fail
324
+ [[ " $( rlocation " my_module/bar/runfile" " " || echo failed ) " == " $tmpdir /_main/bar/runfile" ]] || fail
325
+ [[ " $( rlocation " my_workspace/bar/runfile" " " || echo failed ) " == " $tmpdir /_main/bar/runfile" ]] || fail
326
+ [[ " $( rlocation " my_protobuf/foo/runfile" " " || echo failed ) " == " $tmpdir /protobuf~3.19.2/foo/runfile" ]] || fail
327
+ [[ " $( rlocation " my_protobuf/bar/dir" " " || echo failed ) " == " $tmpdir /protobuf~3.19.2/bar/dir" ]] || fail
328
+ [[ " $( rlocation " my_protobuf/bar/dir/file" " " || echo failed ) " == " $tmpdir /protobuf~3.19.2/bar/dir/file" ]] || fail
329
+ [[ " $( rlocation " my_protobuf/bar/dir/de eply/nes ted/fi~le" " " || echo failed ) " == " $tmpdir /protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" ]] || fail
325
330
326
- [[ -z " $( rlocation " protobuf/foo/runfile" " " ) " ]] || fail
327
- [[ -z " $( rlocation " protobuf/bar/dir/dir/de eply/nes ted/fi~le" " " ) " ]] || fail
331
+ [[ -z " $( rlocation " protobuf/foo/runfile" " " || echo failed ) " ]] || fail
332
+ [[ -z " $( rlocation " protobuf/bar/dir/dir/de eply/nes ted/fi~le" " " || echo failed ) " ]] || fail
328
333
329
- [[ " $( rlocation " _main/bar/runfile" " " ) " == " $tmpdir /_main/bar/runfile" ]] || fail
330
- [[ " $( rlocation " protobuf~3.19.2/foo/runfile" " " ) " == " $tmpdir /protobuf~3.19.2/foo/runfile" ]] || fail
331
- [[ " $( rlocation " protobuf~3.19.2/bar/dir" " " ) " == " $tmpdir /protobuf~3.19.2/bar/dir" ]] || fail
332
- [[ " $( rlocation " protobuf~3.19.2/bar/dir/file" " " ) " == " $tmpdir /protobuf~3.19.2/bar/dir/file" ]] || fail
333
- [[ " $( rlocation " protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" " " ) " == " $tmpdir /protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" ]] || fail
334
+ [[ " $( rlocation " _main/bar/runfile" " " || echo failed ) " == " $tmpdir /_main/bar/runfile" ]] || fail
335
+ [[ " $( rlocation " protobuf~3.19.2/foo/runfile" " " || echo failed ) " == " $tmpdir /protobuf~3.19.2/foo/runfile" ]] || fail
336
+ [[ " $( rlocation " protobuf~3.19.2/bar/dir" " " || echo failed ) " == " $tmpdir /protobuf~3.19.2/bar/dir" ]] || fail
337
+ [[ " $( rlocation " protobuf~3.19.2/bar/dir/file" " " || echo failed ) " == " $tmpdir /protobuf~3.19.2/bar/dir/file" ]] || fail
338
+ [[ " $( rlocation " protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" " " || echo failed ) " == " $tmpdir /protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" ]] || fail
334
339
335
- [[ " $( rlocation " config.json" " " ) " == " $tmpdir /config.json" ]] || fail
340
+ [[ " $( rlocation " config.json" " " || echo failed ) " == " $tmpdir /config.json" ]] || fail
336
341
}
337
342
338
343
function test_manifest_based_runfiles_with_repo_mapping_from_other_repo() {
@@ -364,21 +369,21 @@ EOF
364
369
touch " $tmpdir /protobuf~3.19.2/foo/runfile"
365
370
touch " $tmpdir /config.json"
366
371
367
- [[ " $( rlocation " protobuf/foo/runfile" " protobuf~3.19.2" ) " == " $tmpdir /protobuf~3.19.2/foo/runfile" ]] || fail
368
- [[ " $( rlocation " protobuf/bar/dir" " protobuf~3.19.2" ) " == " $tmpdir /protobuf~3.19.2/bar/dir" ]] || fail
369
- [[ " $( rlocation " protobuf/bar/dir/file" " protobuf~3.19.2" ) " == " $tmpdir /protobuf~3.19.2/bar/dir/file" ]] || fail
370
- [[ " $( rlocation " protobuf/bar/dir/de eply/nes ted/fi~le" " protobuf~3.19.2" ) " == " $tmpdir /protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" ]] || fail
372
+ [[ " $( rlocation " protobuf/foo/runfile" " protobuf~3.19.2" || echo failed ) " == " $tmpdir /protobuf~3.19.2/foo/runfile" ]] || fail
373
+ [[ " $( rlocation " protobuf/bar/dir" " protobuf~3.19.2" || echo failed ) " == " $tmpdir /protobuf~3.19.2/bar/dir" ]] || fail
374
+ [[ " $( rlocation " protobuf/bar/dir/file" " protobuf~3.19.2" || echo failed ) " == " $tmpdir /protobuf~3.19.2/bar/dir/file" ]] || fail
375
+ [[ " $( rlocation " protobuf/bar/dir/de eply/nes ted/fi~le" " protobuf~3.19.2" || echo failed ) " == " $tmpdir /protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" ]] || fail
371
376
372
- [[ -z " $( rlocation " my_module/bar/runfile" " protobuf~3.19.2" ) " ]] || fail
373
- [[ -z " $( rlocation " my_protobuf/bar/dir/de eply/nes ted/fi~le" " protobuf~3.19.2" ) " ]] || fail
377
+ [[ -z " $( rlocation " my_module/bar/runfile" " protobuf~3.19.2" || echo failed ) " ]] || fail
378
+ [[ -z " $( rlocation " my_protobuf/bar/dir/de eply/nes ted/fi~le" " protobuf~3.19.2" || echo failed ) " ]] || fail
374
379
375
- [[ " $( rlocation " _main/bar/runfile" " protobuf~3.19.2" ) " == " $tmpdir /_main/bar/runfile" ]] || fail
376
- [[ " $( rlocation " protobuf~3.19.2/foo/runfile" " protobuf~3.19.2" ) " == " $tmpdir /protobuf~3.19.2/foo/runfile" ]] || fail
377
- [[ " $( rlocation " protobuf~3.19.2/bar/dir" " protobuf~3.19.2" ) " == " $tmpdir /protobuf~3.19.2/bar/dir" ]] || fail
378
- [[ " $( rlocation " protobuf~3.19.2/bar/dir/file" " protobuf~3.19.2" ) " == " $tmpdir /protobuf~3.19.2/bar/dir/file" ]] || fail
379
- [[ " $( rlocation " protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" " protobuf~3.19.2" ) " == " $tmpdir /protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" ]] || fail
380
+ [[ " $( rlocation " _main/bar/runfile" " protobuf~3.19.2" || echo failed ) " == " $tmpdir /_main/bar/runfile" ]] || fail
381
+ [[ " $( rlocation " protobuf~3.19.2/foo/runfile" " protobuf~3.19.2" || echo failed ) " == " $tmpdir /protobuf~3.19.2/foo/runfile" ]] || fail
382
+ [[ " $( rlocation " protobuf~3.19.2/bar/dir" " protobuf~3.19.2" || echo failed ) " == " $tmpdir /protobuf~3.19.2/bar/dir" ]] || fail
383
+ [[ " $( rlocation " protobuf~3.19.2/bar/dir/file" " protobuf~3.19.2" || echo failed ) " == " $tmpdir /protobuf~3.19.2/bar/dir/file" ]] || fail
384
+ [[ " $( rlocation " protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" " protobuf~3.19.2" || echo failed ) " == " $tmpdir /protobuf~3.19.2/bar/dir/de eply/nes ted/fi~le" ]] || fail
380
385
381
- [[ " $( rlocation " config.json" " protobuf~3.19.2" ) " == " $tmpdir /config.json" ]] || fail
386
+ [[ " $( rlocation " config.json" " protobuf~3.19.2" || echo failed ) " == " $tmpdir /config.json" ]] || fail
382
387
}
383
388
384
389
function test_directory_based_envvars() {
0 commit comments