-
Notifications
You must be signed in to change notification settings - Fork 432
/
FBIDBXCTestReporter.h
66 lines (51 loc) · 1.85 KB
/
FBIDBXCTestReporter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <Foundation/Foundation.h>
#import <idbGRPC/idb.grpc.pb.h>
#import <XCTestBootstrap/FBXCTestReporter.h>
#import <FBControlCore/FBControlCore.h>
using idb::CompanionService;
using grpc::Status;
using grpc::ServerContext;
NS_ASSUME_NONNULL_BEGIN
/**
Bridges from the FBXCTestReporter protocol to a GRPC result writer.
This also keeps track of the terminal condition of the reporter, so this can be used to know when reporting has fully terminated.
*/
@interface FBIDBXCTestReporter : NSObject <FBXCTestReporter, FBXCTestReporterWithFiles, FBDataConsumer>
#pragma mark Initializers
/**
The Designated Initializer
@param writer the response writer to use.
@param queue the queue to serialize work on.
@param reportAttachments whether to return activity attachments
@param logger the logger to log to.
*/
- (instancetype)initWithResponseWriter:(grpc::ServerWriter<idb::XctestRunResponse> *)writer reportAttachments:(BOOL)reportAttachments queue:(dispatch_queue_t)queue logger:(id<FBControlCoreLogger>)logger;
#pragma mark Properties
/**
A Future that resolves with an integer representation of XctestRunResponse_TestRunInfo_Status upon termination.
*/
@property (nonatomic, strong, readonly) FBFuture<NSNumber *> *reportingTerminated;
/**
The Result Bundle Path (if any)
*/
@property (nonatomic, copy, nullable, readwrite) NSString *resultBundlePath;
/**
Coverage file path
*/
@property (nonatomic, copy, nullable, readwrite) NSString *coveragePath;
/**
Log directory path
*/
@property (nonatomic, copy, nullable, readwrite) NSString *logDirectoryPath;
/**
App binary path
*/
@property (nonatomic, copy, nullable, readwrite) NSString *binaryPath;
@end
NS_ASSUME_NONNULL_END