From f6705ec6ed137233680929e941c674af6baae1dc Mon Sep 17 00:00:00 2001 From: Anthony Barbier Date: Thu, 28 Sep 2017 12:01:10 +0100 Subject: COMPMID-417 Allow the tests to run even when assets are not present Change-Id: Ief165b1d583a70cbe35aae93f05ddfe962196323 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/89503 Reviewed-by: Georgios Pinitas Tested-by: Kaizen --- tests/main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/main.cpp') diff --git a/tests/main.cpp b/tests/main.cpp index 9cd2895e1b..ee12a38d1a 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -120,20 +120,21 @@ int main(int argc, char **argv) auto log_file = parser.add_option>("log-file"); log_file->set_help("Write output to file instead of to the console"); auto log_level = parser.add_option>("log-level", supported_log_levels, framework::LogLevel::ALL); - log_file->set_help("Verbosity of the output"); + log_level->set_help("Verbosity of the output"); auto throw_errors = parser.add_option("throw-errors"); throw_errors->set_help("Don't catch fatal errors (useful for debugging)"); auto stop_on_error = parser.add_option("stop-on-error"); - throw_errors->set_help("Abort execution after the first failed test (useful for debugging)"); + stop_on_error->set_help("Abort execution after the first failed test (useful for debugging)"); auto seed = parser.add_option>("seed", std::random_device()()); seed->set_help("Global seed for random number generation"); auto color_output = parser.add_option("color-output", true); color_output->set_help("Produce colored output on the console"); auto list_tests = parser.add_option("list-tests", false); list_tests->set_help("List all test names"); + auto error_on_missing_assets = parser.add_option("error-on-missing-assets", false); + error_on_missing_assets->set_help("Mark a test as failed instead of skipping it when assets are missing"); auto assets = parser.add_positional_option>("assets"); assets->set_help("Path to the assets directory"); - assets->set_required(true); try { @@ -196,6 +197,7 @@ int main(int argc, char **argv) framework.set_printer(printer.get()); framework.set_throw_errors(throw_errors->value()); framework.set_stop_on_error(stop_on_error->value()); + framework.set_error_on_missing_assets(error_on_missing_assets->value()); bool success = true; -- cgit v1.2.1