2021-04-08 14:09:19 +05:30
|
|
|
#define CATCH_CONFIG_RUNNER
|
2023-07-18 09:23:27 +02:00
|
|
|
#include <cmd_options.hh>
|
2021-04-08 14:09:19 +05:30
|
|
|
#include <hip_test_common.hh>
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
2023-07-18 09:23:27 +02:00
|
|
|
CmdOptions cmd_options;
|
|
|
|
|
|
2021-04-08 14:09:19 +05:30
|
|
|
int main(int argc, char** argv) {
|
|
|
|
|
auto& context = TestContext::get(argc, argv);
|
|
|
|
|
if (context.skipTest()) {
|
|
|
|
|
// CTest uses this regex to figure out if the test has been skipped
|
2021-05-21 02:31:28 -07:00
|
|
|
std::cout << "HIP_SKIP_THIS_TEST" << std::endl;
|
2021-04-08 14:09:19 +05:30
|
|
|
return 0;
|
|
|
|
|
}
|
2023-07-18 09:23:27 +02:00
|
|
|
|
|
|
|
|
Catch::Session session;
|
|
|
|
|
|
|
|
|
|
using namespace Catch::clara;
|
|
|
|
|
// clang-format off
|
|
|
|
|
auto cli = session.cli()
|
|
|
|
|
| Opt(cmd_options.iterations, "iterations")
|
|
|
|
|
["-I"]["--iterations"]
|
|
|
|
|
("Number of iterations used for performance tests (default: 1000)")
|
|
|
|
|
| Opt(cmd_options.warmups, "warmups")
|
|
|
|
|
["-W"]["--warmups"]
|
|
|
|
|
("Number of warmup iterations used for performance tests (default: 100)")
|
|
|
|
|
| Opt(cmd_options.no_display)
|
|
|
|
|
["-S"]["--no-display"]
|
|
|
|
|
("Do not display the output of performance tests")
|
|
|
|
|
| Opt(cmd_options.progress)
|
|
|
|
|
["-P"]["--progress"]
|
|
|
|
|
("Show progress bar when running performance tests")
|
|
|
|
|
| Opt(cmd_options.extended_run)
|
|
|
|
|
["-E"]["--extended-run"]
|
|
|
|
|
("TODO: Description goes here")
|
|
|
|
|
;
|
|
|
|
|
// clang-format on
|
|
|
|
|
|
|
|
|
|
session.cli(cli);
|
|
|
|
|
|
|
|
|
|
int out = session.run(argc, argv);
|
2022-06-28 04:30:37 +01:00
|
|
|
TestContext::get().cleanContext();
|
|
|
|
|
return out;
|
2021-04-08 14:09:19 +05:30
|
|
|
}
|