Line |
Branch |
Exec |
Source |
1 |
|
|
// Copyright (c) 2021-2025 ChilliBits. All rights reserved. |
2 |
|
|
|
3 |
|
|
#pragma once |
4 |
|
|
|
5 |
|
|
#include "../../lib/cli11/CLI11.hpp" |
6 |
|
|
|
7 |
|
|
// Undef conflicting macros (only problematic on Windows) |
8 |
|
|
#undef TRUE |
9 |
|
|
#undef FALSE |
10 |
|
|
#undef CONST |
11 |
|
|
|
12 |
|
|
// GCOV_EXCL_START |
13 |
|
|
namespace spice::testing { |
14 |
|
|
|
15 |
|
|
struct TestDriverCliOptions { |
16 |
|
|
bool updateRefs = false; |
17 |
|
|
bool runBenchmarks = false; |
18 |
|
|
bool enableLeakDetection = false; |
19 |
|
|
bool isGitHubActions = false; |
20 |
|
|
bool isVerbose = false; |
21 |
|
|
}; |
22 |
|
|
|
23 |
|
|
/** |
24 |
|
|
* Helper class to set up the cli interface and command line parser |
25 |
|
|
*/ |
26 |
|
|
class Driver { |
27 |
|
|
public: |
28 |
|
|
// Constructors |
29 |
|
− |
explicit Driver() = default; |
30 |
|
|
|
31 |
|
|
// Public methods |
32 |
|
|
void createInterface(); |
33 |
|
|
void addOptions(); |
34 |
|
|
int parse(int argc, char **argv); |
35 |
|
|
|
36 |
|
|
private: |
37 |
|
|
// Private members |
38 |
|
|
CLI::App app = CLI::App{"Spice Test Runner", "spice"}; |
39 |
|
|
}; |
40 |
|
|
|
41 |
|
|
} // namespace spice::testing |
42 |
|
|
// GCOV_EXCL_STOP |
43 |
|
|
|