summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Rex <julian.rex@gmail.com>2018-09-25 13:31:47 -0400
committerGitHub <noreply@github.com>2018-09-25 13:31:47 -0400
commit66e95ac2ab6260654ba09b26e83591e3d4334c02 (patch)
tree784f736a003f26a04696f58a0b91bf93221f9c55
parent125c628981bcc38a87498bf5f6c72e2c506dd99f (diff)
downloadqtlocation-mapboxgl-66e95ac2ab6260654ba09b26e83591e3d4334c02.tar.gz
[ios] Move pending test check into `invokeTest` (#12964)
-rw-r--r--platform/ios/Integration Tests/MGLCameraTransitionTests.mm3
-rw-r--r--platform/ios/Integration Tests/MGLMapViewIntegrationTest.m15
-rw-r--r--platform/ios/Integration Tests/Snapshotter Tests/MGLMapSnapshotterTest.m2
-rw-r--r--platform/ios/ios.xcodeproj/project.pbxproj2
4 files changed, 17 insertions, 5 deletions
diff --git a/platform/ios/Integration Tests/MGLCameraTransitionTests.mm b/platform/ios/Integration Tests/MGLCameraTransitionTests.mm
index f29fa5e64c..32acf6a1fe 100644
--- a/platform/ios/Integration Tests/MGLCameraTransitionTests.mm
+++ b/platform/ios/Integration Tests/MGLCameraTransitionTests.mm
@@ -334,8 +334,6 @@
#pragma mark - Pending tests
- (void)testContinuallyResettingNorthInIsChangingPENDING {
- MGL_CHECK_IF_PENDING_TEST_SHOULD_RUN();
-
// See https://github.com/mapbox/mapbox-gl-native/pull/11614
// This test currently fails, unsurprisingly, since we're continually
// setting the camera to the same parameters during its update.
@@ -369,7 +367,6 @@
- (void)testContinuallySettingCoordinateInIsChangingPENDING {
// See above comment in `-testContinuallyResettingNorthInIsChangingPENDING`
- MGL_CHECK_IF_PENDING_TEST_SHOULD_RUN();
// Reset to non-zero, prior to testing
[self.mapView setCenterCoordinate:CLLocationCoordinate2DMake(0.0, 0.0) animated:NO];
diff --git a/platform/ios/Integration Tests/MGLMapViewIntegrationTest.m b/platform/ios/Integration Tests/MGLMapViewIntegrationTest.m
index 8235945676..c427a7842f 100644
--- a/platform/ios/Integration Tests/MGLMapViewIntegrationTest.m
+++ b/platform/ios/Integration Tests/MGLMapViewIntegrationTest.m
@@ -6,6 +6,21 @@
@implementation MGLMapViewIntegrationTest
+- (void)invokeTest {
+ NSString *selector = NSStringFromSelector(self.invocation.selector);
+ BOOL isPendingTest = [selector hasSuffix:@"PENDING"];
+
+ if (isPendingTest) {
+ NSString *runPendingTests = [[NSProcessInfo processInfo] environment][@"MAPBOX_RUN_PENDING_TESTS"];
+ if (![runPendingTests boolValue]) {
+ printf("warning: '%s' is a pending test - skipping\n", selector.UTF8String);
+ return;
+ }
+ }
+
+ [super invokeTest];
+}
+
- (NSString*)validAccessToken {
NSString *accessToken = [[NSProcessInfo processInfo] environment][@"MAPBOX_ACCESS_TOKEN"];
if (!accessToken) {
diff --git a/platform/ios/Integration Tests/Snapshotter Tests/MGLMapSnapshotterTest.m b/platform/ios/Integration Tests/Snapshotter Tests/MGLMapSnapshotterTest.m
index fd5b3db978..ca7462f160 100644
--- a/platform/ios/Integration Tests/Snapshotter Tests/MGLMapSnapshotterTest.m
+++ b/platform/ios/Integration Tests/Snapshotter Tests/MGLMapSnapshotterTest.m
@@ -282,7 +282,7 @@ MGLMapSnapshotter* snapshotterWithCoordinates(CLLocationCoordinate2D coordinates
}
- (void)testMultipleSnapshottersPENDING {
- MGL_CHECK_IF_PENDING_TEST_SHOULD_RUN();
+
if (![self validAccessToken]) {
return;
}
diff --git a/platform/ios/ios.xcodeproj/project.pbxproj b/platform/ios/ios.xcodeproj/project.pbxproj
index 7d448a5d91..0951a94218 100644
--- a/platform/ios/ios.xcodeproj/project.pbxproj
+++ b/platform/ios/ios.xcodeproj/project.pbxproj
@@ -1027,7 +1027,7 @@
ACA65F552140696B00537748 /* MMEDispatchManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MMEDispatchManager.h; path = "vendor/mapbox-events-ios/MapboxMobileEvents/MMEDispatchManager.h"; sourceTree = SOURCE_ROOT; };
ACA65F562140697100537748 /* MMEDispatchManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MMEDispatchManager.m; path = "vendor/mapbox-events-ios/MapboxMobileEvents/MMEDispatchManager.m"; sourceTree = SOURCE_ROOT; };
CA0C27912076C804001CE5B7 /* MGLShapeSourceTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MGLShapeSourceTests.m; sourceTree = "<group>"; };
- CA0C27932076CA19001CE5B7 /* MGLMapViewIntegrationTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MGLMapViewIntegrationTest.m; sourceTree = "<group>"; };
+ CA0C27932076CA19001CE5B7 /* MGLMapViewIntegrationTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MGLMapViewIntegrationTest.m; sourceTree = "<group>"; wrapsLines = 0; };
CA0C27952076CA50001CE5B7 /* MGLMapViewIntegrationTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLMapViewIntegrationTest.h; sourceTree = "<group>"; };
CA1B4A502099FB2200EDD491 /* MGLMapSnapshotterTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MGLMapSnapshotterTest.m; sourceTree = "<group>"; };
CA34C9C2207FD272005C1A06 /* MGLCameraTransitionTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLCameraTransitionTests.mm; sourceTree = "<group>"; };