xref: /aosp_15_r20/external/webrtc/test/ios/test_support.h (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1 /*
2  *  Copyright 2017 The WebRTC Project Authors. All rights reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 #ifndef TEST_IOS_TEST_SUPPORT_H_
12 #define TEST_IOS_TEST_SUPPORT_H_
13 
14 #include <string>
15 #include <vector>
16 
17 #include "absl/types/optional.h"
18 
19 namespace rtc {
20 namespace test {
21 // Launches an iOS app that serves as a host for a test suite.
22 // This is necessary as iOS doesn't like processes without a gui
23 // running for longer than a few seconds.
24 void RunTestsFromIOSApp();
25 void InitTestSuite(int (*test_suite)(void),
26                    int argc,
27                    char* argv[],
28                    bool save_chartjson_result,
29                    bool export_perf_results_new_api,
30                    std::string webrtc_test_metrics_output_path,
31                    absl::optional<std::vector<std::string>> metrics_to_plot);
32 
33 // Returns true if unittests should be run by the XCTest runnner.
34 bool ShouldRunIOSUnittestsWithXCTest();
35 
36 }  // namespace test
37 }  // namespace rtc
38 
39 #endif  // TEST_IOS_TEST_SUPPORT_H_
40