forked from facebookarchive/WebDriverAgent
-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Make sure the test is never going to be unexpectedly interrupt…
…ed (#664)
- Loading branch information
1 parent
2b9c5bf
commit cafe47e
Showing
7 changed files
with
85 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* Copyright (c) 2015-present, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
*/ | ||
|
||
#import <XCTest/XCTest.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface XCTIssue (AMPatcher) | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* Copyright (c) 2015-present, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
*/ | ||
|
||
#import "XCTIssue+FBPatcher.h" | ||
|
||
#import <objc/runtime.h> | ||
|
||
static _Bool swizzledShouldInterruptTest(id self, SEL _cmd) | ||
{ | ||
return NO; | ||
} | ||
|
||
@implementation XCTIssue (AMPatcher) | ||
|
||
#pragma clang diagnostic push | ||
#pragma clang diagnostic ignored "-Wobjc-load-method" | ||
+ (void)load | ||
{ | ||
SEL originalShouldInterruptTest = NSSelectorFromString(@"shouldInterruptTest"); | ||
if (nil == originalShouldInterruptTest) return; | ||
Method originalShouldInterruptTestMethod = class_getInstanceMethod(self.class, originalShouldInterruptTest); | ||
if (nil == originalShouldInterruptTestMethod) return; | ||
method_setImplementation(originalShouldInterruptTestMethod, (IMP)swizzledShouldInterruptTest); | ||
} | ||
#pragma clang diagnostic pop | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
WebDriverAgentLib/Utilities/FBXCTestCaseImplementationFailureHoldingProxy.h
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
WebDriverAgentLib/Utilities/FBXCTestCaseImplementationFailureHoldingProxy.m
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters