julhal01 | 3ec4c32 | 2021-02-05 17:30:49 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #ifndef REMOTE_TEST_RUNNER_H |
| 8 | #define REMOTE_TEST_RUNNER_H |
| 9 | |
| 10 | #include <service/test_runner/client/cpp/test_runner_client.h> |
| 11 | #include <service/test_runner/common/test_runner.h> |
| 12 | |
| 13 | /* |
| 14 | * Provides a command line interface for running remote tests. |
| 15 | */ |
| 16 | class remote_test_runner |
| 17 | { |
| 18 | public: |
| 19 | remote_test_runner(); |
| 20 | remote_test_runner(test_runner_client *client); |
| 21 | virtual ~remote_test_runner(); |
| 22 | |
| 23 | void set_client(test_runner_client *client); |
| 24 | |
| 25 | int execute(int argc, char *argv[]); |
| 26 | |
| 27 | private: |
| 28 | |
| 29 | void parse_test_spec_params(int argc, char *argv[], struct test_spec &spec) const; |
| 30 | std::string parse_option(const char *option_switch, int argc, char *argv[]) const; |
| 31 | bool option_selected(const char *option_switch, int argc, char *argv[]) const; |
| 32 | |
| 33 | void output_summary(const struct test_summary &summary); |
| 34 | void output_list(const struct test_summary &summary, const std::vector<struct test_result> &results); |
| 35 | void output_results(const struct test_summary &summary, const std::vector<struct test_result> &results); |
| 36 | |
| 37 | test_runner_client *m_client; |
| 38 | }; |
| 39 | |
| 40 | #endif /* REMOTE_TEST_RUNNER_H */ |