Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Restore macOS unit tests on CI - #5996

Merged
boundsj merged 3 commits into
masterfrom
1ec5-macos-test-ci-5991
Sep 28, 2016
Merged

boundsj merged 3 commits into
masterfrom
1ec5-macos-test-ci-5991

Conversation

@1ec5

@1ec5 1ec5 commented Aug 13, 2016 •

Copy link
Copy Markdown
Contributor

Restored the make rule for running macOS SDK unit tests. Invoke that rule on Bitrise. Note that the tests will fail to build until #5994 is merged.

Fixes #5991.

/cc @kkaefer

@1ec5 1ec5 added build macOS Mapbox Maps SDK for macOS tests labels Aug 13, 2016
@1ec5 1ec5 self-assigned this Aug 13, 2016
@mention-bot

Copy link
Copy Markdown

@1ec5, thanks for your PR! By analyzing this pull request, we identified @jfirebaugh, @tmpsantos and @springmeyer to be potential reviewers.

@kkaefer
kkaefer force-pushed the 1ec5-macos-test-ci-5991 branch from e3a1808 to 7aebf42 Compare August 23, 2016 11:03
@1ec5
1ec5 force-pushed the 1ec5-macos-test-ci-5991 branch 2 times, most recently from 15c77d8 to 45e4852 Compare August 27, 2016 21:42
@kkaefer
kkaefer force-pushed the 1ec5-macos-test-ci-5991 branch from 45e4852 to 2f63659 Compare August 31, 2016 09:35
@1ec5
1ec5 force-pushed the 1ec5-macos-test-ci-5991 branch from 2f63659 to eeb5b48 Compare September 21, 2016 07:34
@jfirebaugh
jfirebaugh force-pushed the 1ec5-macos-test-ci-5991 branch from eeb5b48 to 677b0dc Compare September 21, 2016 23:43
@jfirebaugh

Copy link
Copy Markdown
Contributor

#5994 is merged. I rebased on master.

Failing tests:
    -[MGLOfflineStorageTests testAddPack]
    -[MGLOfflineStorageTests testBackupExclusion]
    -[MGLOfflineStorageTests testCountOfBytesCompleted]
    -[MGLOfflineStorageTests testRemovePack]
    -[MGLOfflineStorageTests testSharedObject]
** TEST FAILED **

I don't see any indication as to what the actual failure was, however.

@1ec5

1ec5 commented Sep 22, 2016

Copy link
Copy Markdown
Contributor Author

The failure doesn't reproduce locally. On the 1ec5-bitrise-deploy-logs branch, I'm working on exporting the raw xcodebuild output and prettified test results to Bitrise's interface, which will make it easier to diagnose this issue.

@1ec5

1ec5 commented Sep 22, 2016

Copy link
Copy Markdown
Contributor Author
2016-09-22 00:04:48.075 xctest[4490:16794] *** Terminating app due to uncaught exception 'NSRangeException', reason: 'Cannot remove an observer <MGLOfflineStorage 0x7f96a14a7c30> for the key path "accessToken" from <MGLAccountManager 0x7f96a1535ec0> because it is not registered as an observer.'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff93b5a4f2 __exceptionPreprocess + 178
    1   libobjc.A.dylib                     0x00007fff9626e73c objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff93bc14bd +[NSException raise:format:] + 205
    3   Foundation                          0x00007fff8de29786 -[NSObject(NSKeyValueObserverRegistration) _removeObserver:forProperty:] + 504
    4   Foundation                          0x00007fff8de29533 -[NSObject(NSKeyValueObserverRegistration) removeObserver:forKeyPath:] + 108
    5   Mapbox                              0x0000000111f8ca72 -[MGLOfflineStorage dealloc] + 130
    6   Mapbox                              0x0000000111f8c9dd -[MGLOfflineStorage init] + 2909
    7   Mapbox                              0x0000000111f8b632 __41+[MGLOfflineStorage sharedOfflineStorage]_block_invoke + 50

@1ec5
1ec5 force-pushed the 1ec5-macos-test-ci-5991 branch from 677b0dc to 91d7814 Compare September 22, 2016 22:58
Restored the make rule for running macOS SDK unit tests. Invoke that rule on Bitrise.

Fixes #5991.
Broke up the iOS and macOS Bitrise scripts into several steps each for more granular progress and failure reporting and to take advantage of better error reporting in the built-in Bitrise steps. Added a step to deploy Xcode test results and (in the event of a failure) raw xcodebuild output to Bitrise.io, with a handy link from the Bitrise UI.
@boundsj

boundsj commented Sep 28, 2016 •

Copy link
Copy Markdown
Contributor

74f9671 fixes the consistent failure noted in #5996 (comment). The issue could be reproduced locally if ~/Library/Application Support/com.mapbox.MapboxGL/.mapbox/ was cleared and the tests were run. The problem was that, on macOS, the legacy cache wrangling code was attempting URLByAppendingPathComponent: with a nil [NSBundle mainBundle].bundleIdentifier.

iOS does not require [NSBundle mainBundle].bundleIdentifier and uses NSSearchPathForDirectoriesInDomains() in any case.

I think we should merge this and move on to restoring core tests for #6423. Unfortunately, I'm not hopeful that the fix here will solve the spurious failures noted in #6385

cc @1ec5

@boundsj
boundsj merged commit 9a41b8a into master Sep 28, 2016
@boundsj
boundsj deleted the 1ec5-macos-test-ci-5991 branch September 28, 2016 16:44
@1ec5 1ec5 modified the milestone: macos-v0.3.0 Jan 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

build macOS Mapbox Maps SDK for macOS tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants