diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2019-09-19 12:53:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-19 12:53:06 -0400 |
commit | 0e7d70b8f8a35c4c070774febcb544bd5248b864 (patch) | |
tree | c83cfc19882c610fc35fb7dc443af18caebc94b2 | |
parent | 616e7046c3cb5e3a96c7cafac9ae4f3e9ddfc6cc (diff) | |
parent | eda9139fabada527e04de9b9ac4542abd5ad01cc (diff) | |
download | sdl_ios-0e7d70b8f8a35c4c070774febcb544bd5248b864.tar.gz |
Merge pull request #1400 from smartdevicelink/bugfix/issue_1399_travis_fail
Updating travis.yml to use iOS 12.4
18 files changed, 34 insertions, 24 deletions
diff --git a/.travis.yml b/.travis.yml index a9201e483..7c09c4f82 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ language: objective-c -osx_image: xcode10.2 +osx_image: xcode10.3 xcode_project: SmartDeviceLink-iOS.xcodeproj xcode_scheme: SmartDeviceLink -xcode_sdk: iphonesimulator12.0 +xcode_sdk: iphonesimulator12.4 env: global: - FRAMEWORK_NAME=SmartDeviceLink @@ -18,8 +18,9 @@ before_script: - carthage bootstrap --platform ios script: -- xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink" -sdk "iphonesimulator11.0" -destination "OS=11.0,name=iPhone 7" -configuration Debug ONLY_ACTIVE_ARCH=NO RUN_CLANG_STATIC_ANALYZER=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ENABLE_TESTABILITY=YES test | xcpretty -c; -- xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink-Example" -sdk "iphonesimulator11.0" -destination "OS=11.0,name=iPhone 7" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c; +- set -o pipefail && xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink" -sdk "iphonesimulator12.4" -destination "OS=12.4,name=iPhone Xs" -configuration Debug ONLY_ACTIVE_ARCH=NO RUN_CLANG_STATIC_ANALYZER=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ENABLE_TESTABILITY=YES test | xcpretty -c; +- set -o pipefail && xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink-Example-ObjC" -sdk "iphonesimulator12.4" -destination "OS=12.4,name=iPhone Xs" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c; +- set -o pipefail && xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink-Example-Swift" -sdk "iphonesimulator12.4" -destination "OS=12.4,name=iPhone Xs" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c; after_script: - bash <(curl -s https://codecov.io/bash) diff --git a/SmartDeviceLink/SDLLockScreenConfiguration.m b/SmartDeviceLink/SDLLockScreenConfiguration.m index 47e4980de..c5cdfa8e6 100644 --- a/SmartDeviceLink/SDLLockScreenConfiguration.m +++ b/SmartDeviceLink/SDLLockScreenConfiguration.m @@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN _displayMode = mode; _enableAutomaticLockScreen = (mode == SDLLockScreenConfigurationDisplayModeNever) ? NO : YES; - _showInOptionalState = (mode == SDLLockScreenConfigurationDisplayModeOptionalOrRequired) ? NO : YES; + _showInOptionalState = (mode == SDLLockScreenConfigurationDisplayModeOptionalOrRequired) ? YES : NO; _enableDismissGesture = enableDismissGesture; _backgroundColor = backgroundColor; @@ -35,7 +35,7 @@ NS_ASSUME_NONNULL_BEGIN } + (instancetype)disabledConfiguration { - return [[self alloc] initWithDisplayMode:SDLLockScreenConfigurationDisplayModeNever enableDismissGesture:NO showDeviceLogo:YES backgroundColor:[self sdl_defaultBackgroundColor] appIcon:nil viewController:nil]; + return [[self alloc] initWithDisplayMode:SDLLockScreenConfigurationDisplayModeNever enableDismissGesture:NO showDeviceLogo:NO backgroundColor:[self sdl_defaultBackgroundColor] appIcon:nil viewController:nil]; } + (instancetype)enabledConfiguration { diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m index 5cb8377f4..ea80c0db6 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m @@ -875,7 +875,7 @@ describe(@"uploading/deleting multiple files in the file manager", ^{ [testFileManager uploadArtworks:testArtworks progressHandler:^BOOL(NSString * _Nonnull artworkName, float uploadPercentage, NSError * _Nullable error) { artworksDone++; expect(artworkName).to(equal(expectedArtworkNames[artworksDone - 1])); - expect(uploadPercentage).to(beCloseTo((float)artworksDone / 200.0)); + expect(uploadPercentage).to(beCloseTo((float)artworksDone / 200.0).within(0.1)); expect(error).to(beNil()); return YES; } completionHandler:^(NSArray<NSString *> * _Nonnull artworkNames, NSError * _Nullable error) { diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLLockScreenConfigurationSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLLockScreenConfigurationSpec.m index d35717658..2963efb96 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLLockScreenConfigurationSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLLockScreenConfigurationSpec.m @@ -14,8 +14,11 @@ describe(@"a lock screen configuration", ^{ }); it(@"should properly set properties", ^{ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" expect(testConfig.enableAutomaticLockScreen).to(beFalse()); expect(testConfig.showInOptionalState).to(beFalse()); +#pragma clang diagnostic pop expect(testConfig.enableDismissGesture).to(beFalse()); expect(testConfig.showDeviceLogo).to(beFalse()); expect(testConfig.backgroundColor).to(equal([UIColor colorWithRed:(57.0/255.0) green:(78.0/255.0) blue:(96.0/255.0) alpha:1.0])); @@ -30,8 +33,11 @@ describe(@"a lock screen configuration", ^{ }); it(@"should properly set properties", ^{ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" expect(testConfig.enableAutomaticLockScreen).to(beTrue()); expect(testConfig.showInOptionalState).to(beFalse()); +#pragma clang diagnostic pop expect(testConfig.enableDismissGesture).to(beTrue()); expect(testConfig.showDeviceLogo).to(beTrue()); expect(testConfig.backgroundColor).to(equal([UIColor colorWithRed:(57.0/255.0) green:(78.0/255.0) blue:(96.0/255.0) alpha:1.0])); @@ -52,8 +58,11 @@ describe(@"a lock screen configuration", ^{ }); it(@"should properly set properties", ^{ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" expect(testConfig.enableAutomaticLockScreen).to(beTrue()); expect(testConfig.showInOptionalState).to(beFalse()); +#pragma clang diagnostic pop expect(testConfig.enableDismissGesture).to(beTrue()); expect(testConfig.showDeviceLogo).to(beTrue()); expect(testConfig.backgroundColor).to(equal([UIColor blueColor])); @@ -72,8 +81,11 @@ describe(@"a lock screen configuration", ^{ }); it(@"should properly set properties", ^{ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" expect(testConfig.enableAutomaticLockScreen).to(beTrue()); expect(testConfig.showInOptionalState).to(beFalse()); +#pragma clang diagnostic pop expect(testConfig.enableDismissGesture).to(beTrue()); expect(testConfig.showDeviceLogo).to(beTrue()); expect(testConfig.backgroundColor).to(equal([UIColor colorWithRed:(57.0/255.0) green:(78.0/255.0) blue:(96.0/255.0) alpha:1.0])); diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m index db6217e02..6b677a0b5 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m @@ -149,7 +149,7 @@ describe(@"menu manager", ^{ }); }); - describe(@"Notificaiton Responses", ^{ + describe(@"Notification Responses", ^{ it(@"should set display capabilities when SDLDidReceiveSetDisplayLayoutResponse is received", ^{ testDisplayCapabilities = [[SDLDisplayCapabilities alloc] init]; @@ -157,10 +157,10 @@ describe(@"menu manager", ^{ testSetDisplayLayoutResponse.success = @YES; testSetDisplayLayoutResponse.displayCapabilities = testDisplayCapabilities; - SDLRPCResponseNotification *notification = [[SDLRPCResponseNotification alloc] initWithName:SDLDidReceiveRegisterAppInterfaceResponse object:self rpcResponse:testSetDisplayLayoutResponse]; + SDLRPCResponseNotification *notification = [[SDLRPCResponseNotification alloc] initWithName:SDLDidReceiveSetDisplayLayoutRequest object:self rpcResponse:testSetDisplayLayoutResponse]; [[NSNotificationCenter defaultCenter] postNotification:notification]; - expect(testManager.displayCapabilities).to(equal(testDisplayCapabilities)); + expect(testManager.displayCapabilities).withTimeout(3).toEventually(equal(testDisplayCapabilities)); }); it(@"should set display capabilities when SDLDidReceiveRegisterAppInterfaceResponse is received", ^{ diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLPresentKeyboardOperationSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLPresentKeyboardOperationSpec.m index 6d0b7e6cd..05e51aadf 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLPresentKeyboardOperationSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLPresentKeyboardOperationSpec.m @@ -35,6 +35,7 @@ describe(@"present keyboard operation", ^{ __block NSError *resultError = nil; beforeEach(^{ + testOp = nil; resultError = nil; hasCalledOperationCompletionHandler = NO; @@ -403,12 +404,10 @@ describe(@"present keyboard operation", ^{ [testOp dismissKeyboard]; }); - it(@"should not attempt to send a cancel interaction", ^{ + it(@"should not finish or send a cancel interaction", ^{ SDLCancelInteraction *lastRequest = testConnectionManager.receivedRequests.lastObject; expect(lastRequest).toNot(beAnInstanceOf([SDLCancelInteraction class])); - }); - it(@"should not finish", ^{ expect(hasCalledOperationCompletionHandler).toEventually(beFalse()); expect(testOp.isExecuting).toEventually(beTrue()); expect(testOp.isFinished).toEventually(beFalse()); diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m index 6dd0b2c2e..5a01c0c29 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m @@ -524,7 +524,7 @@ describe(@"the streaming video manager", ^{ it(@"should have set all the right properties", ^{ expect([[SDLGlobals sharedGlobals] mtuSizeForServiceType:SDLServiceTypeVideo]).to(equal(testMTU)); - expect(CGSizeEqualToSize(streamingLifecycleManager.screenSize, CGSizeMake(testVideoWidth, testVideoHeight))).to(equal(YES)); + expect(@(CGSizeEqualToSize(streamingLifecycleManager.screenSize, CGSizeMake(testVideoWidth, testVideoHeight)))).to(beTrue()); expect(streamingLifecycleManager.videoEncrypted).to(equal(YES)); expect(streamingLifecycleManager.videoFormat).to(equal([[SDLVideoStreamingFormat alloc] initWithCodec:testVideoCodec protocol:testVideoProtocol])); expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateReady)); @@ -539,7 +539,7 @@ describe(@"the streaming video manager", ^{ }); it(@"should fall back correctly", ^{ - expect(CGSizeEqualToSize(streamingLifecycleManager.screenSize, CGSizeMake(testVideoWidth, testVideoHeight))).to(equal(YES)); + expect(@(CGSizeEqualToSize(streamingLifecycleManager.screenSize, CGSizeMake(testVideoWidth, testVideoHeight)))).to(beTrue()); expect(streamingLifecycleManager.videoFormat).to(equal([[SDLVideoStreamingFormat alloc] initWithCodec:SDLVideoStreamingCodecH264 protocol:SDLVideoStreamingProtocolRAW])); expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateReady)); }); @@ -551,14 +551,8 @@ describe(@"the streaming video manager", ^{ beforeEach(^{ - preferredResolutionLow = [[SDLImageResolution alloc] initWithWidth:10 height:10]; - preferredResolutionHigh = [[SDLImageResolution alloc] initWithWidth:100 height:100]; - streamingLifecycleManager.preferredResolutions = @[preferredResolutionLow, preferredResolutionHigh]; - testVideoStartServicePayload = [[SDLControlFramePayloadVideoStartServiceAck alloc] initWithMTU:testMTU height:SDLControlFrameInt32NotFound width:SDLControlFrameInt32NotFound protocol:nil codec:nil]; testVideoMessage = [[SDLV2ProtocolMessage alloc] initWithHeader:testVideoHeader andPayload:testVideoStartServicePayload.data]; - - expect(CGSizeEqualToSize(streamingLifecycleManager.screenSize, CGSizeZero)); }); context(@"If the data source is nil", ^{ @@ -568,20 +562,24 @@ describe(@"the streaming video manager", ^{ }); it(@"should not replace the existing screen resolution", ^{ - expect(CGSizeEqualToSize(streamingLifecycleManager.screenSize, CGSizeZero)); + expect(@(CGSizeEqualToSize(streamingLifecycleManager.screenSize, CGSizeZero))).to(beTrue()); expect(streamingLifecycleManager.dataSource).to(beNil()); }); }); context(@"If the preferred resolution was set in the data source", ^{ beforeEach(^{ + preferredResolutionLow = [[SDLImageResolution alloc] initWithWidth:10 height:10]; + preferredResolutionHigh = [[SDLImageResolution alloc] initWithWidth:100 height:100]; + streamingLifecycleManager.preferredResolutions = @[preferredResolutionLow, preferredResolutionHigh]; + streamingLifecycleManager.dataSource = testDataSource; [streamingLifecycleManager handleProtocolStartServiceACKMessage:testVideoMessage]; }); it(@"should set the screen size using the first provided preferred resolution", ^{ CGSize preferredFormat = CGSizeMake(preferredResolutionLow.resolutionWidth.floatValue, preferredResolutionLow.resolutionHeight.floatValue); - expect(CGSizeEqualToSize(streamingLifecycleManager.screenSize, preferredFormat)); + expect(@(CGSizeEqualToSize(streamingLifecycleManager.screenSize, preferredFormat))).to(beTrue()); expect(streamingLifecycleManager.dataSource).toNot(beNil()); }); }); diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testAppAndVehicleIcons@2x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testAppAndVehicleIcons@2x.png Binary files differdeleted file mode 100644 index 935e31a1b..000000000 --- a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testAppAndVehicleIcons@2x.png +++ /dev/null diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testAppAndVehicleIcons_iPhone11_4_0x0@3x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testAppAndVehicleIcons_iPhone11_4_0x0@3x.png Binary files differdeleted file mode 100644 index 3b7684a62..000000000 --- a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testAppAndVehicleIcons_iPhone11_4_0x0@3x.png +++ /dev/null diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testLightBackgroundNoAppNoVehicleIcons@2x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testLightBackgroundNoAppNoVehicleIcons@2x.png Binary files differdeleted file mode 100644 index 935e31a1b..000000000 --- a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testLightBackgroundNoAppNoVehicleIcons@2x.png +++ /dev/null diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testLightBackgroundNoAppNoVehicleIcons_iPhone11_4_0x0@3x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testLightBackgroundNoAppNoVehicleIcons_iPhone11_4_0x0@3x.png Binary files differdeleted file mode 100644 index 3b7684a62..000000000 --- a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testLightBackgroundNoAppNoVehicleIcons_iPhone11_4_0x0@3x.png +++ /dev/null diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testNoAppNoVehicleIcons@2x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testNoAppNoVehicleIcons@2x.png Binary files differdeleted file mode 100644 index 935e31a1b..000000000 --- a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testNoAppNoVehicleIcons@2x.png +++ /dev/null diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testNoAppNoVehicleIcons_iPhone11_4_0x0@3x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testNoAppNoVehicleIcons_iPhone11_4_0x0@3x.png Binary files differdeleted file mode 100644 index 3b7684a62..000000000 --- a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testNoAppNoVehicleIcons_iPhone11_4_0x0@3x.png +++ /dev/null diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyAppIcon@2x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyAppIcon@2x.png Binary files differdeleted file mode 100644 index 935e31a1b..000000000 --- a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyAppIcon@2x.png +++ /dev/null diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyAppIcon_iPhone11_4_0x0@3x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyAppIcon_iPhone11_4_0x0@3x.png Binary files differdeleted file mode 100644 index 3b7684a62..000000000 --- a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyAppIcon_iPhone11_4_0x0@3x.png +++ /dev/null diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyVehicleIcon@2x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyVehicleIcon@2x.png Binary files differdeleted file mode 100644 index 935e31a1b..000000000 --- a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyVehicleIcon@2x.png +++ /dev/null diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyVehicleIcon_iPhone11_4_0x0@3x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyVehicleIcon_iPhone11_4_0x0@3x.png Binary files differdeleted file mode 100644 index 3b7684a62..000000000 --- a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyVehicleIcon_iPhone11_4_0x0@3x.png +++ /dev/null diff --git a/SmartDeviceLinkTests/SDLAsynchronousRPCOperationSpec.m b/SmartDeviceLinkTests/SDLAsynchronousRPCOperationSpec.m index 917756334..ad847378e 100644 --- a/SmartDeviceLinkTests/SDLAsynchronousRPCOperationSpec.m +++ b/SmartDeviceLinkTests/SDLAsynchronousRPCOperationSpec.m @@ -83,7 +83,7 @@ describe(@"sending responses and notifications", ^{ [testOperationQueue addOperation:testOperation]; [testOperationQueue cancelAllOperations]; - [NSThread sleepForTimeInterval:0.1]; + [NSThread sleepForTimeInterval:0.5]; expect(testConnectionManager.receivedRequests).toEventually(beEmpty()); }); |