@@ -284,8 +284,10 @@ case "$product-$method-$platform" in
284
284
test
285
285
;;
286
286
287
- Firestore-xcodebuild-iOS )
287
+ Firestore-xcodebuild-* )
288
288
" ${firestore_emulator} " start
289
+ trap ' "${firestore_emulator}" stop' ERR EXIT
290
+
289
291
RunXcodebuild \
290
292
-workspace ' Firestore/Example/Firestore.xcworkspace' \
291
293
-scheme " Firestore_Tests_$platform " \
@@ -294,10 +296,10 @@ case "$product-$method-$platform" in
294
296
test
295
297
296
298
# Firestore_SwiftTests_iOS require Swift 4, which needs Xcode 9
297
- if [[ " $xcode_major " -ge 9 ]]; then
299
+ if [[ " $platform " == ' iOS ' && " $ xcode_major" -ge 9 ]]; then
298
300
RunXcodebuild \
299
301
-workspace ' Firestore/Example/Firestore.xcworkspace' \
300
- -scheme " Firestore_SwiftTests_ $platform " \
302
+ -scheme " Firestore_SwiftTests_iOS " \
301
303
" ${xcb_flags[@]} " \
302
304
build \
303
305
test
@@ -309,28 +311,6 @@ case "$product-$method-$platform" in
309
311
" ${xcb_flags[@]} " \
310
312
build \
311
313
test
312
-
313
- " ${firestore_emulator} " stop
314
- ;;
315
-
316
- Firestore-xcodebuild-macOS | Firestore-xcodebuild-tvOS)
317
- # TODO(wilhuff): Combine with above once all targets exist
318
- " ${firestore_emulator} " start
319
- RunXcodebuild \
320
- -workspace ' Firestore/Example/Firestore.xcworkspace' \
321
- -scheme " Firestore_Tests_$platform " \
322
- " ${xcb_flags[@]} " \
323
- build \
324
- test
325
-
326
- RunXcodebuild \
327
- -workspace ' Firestore/Example/Firestore.xcworkspace' \
328
- -scheme " Firestore_IntegrationTests_$platform " \
329
- " ${xcb_flags[@]} " \
330
- build \
331
- test
332
-
333
- " ${firestore_emulator} " stop
334
314
;;
335
315
336
316
Firestore-cmake-macOS)
0 commit comments