From 2b5f0f2574551f59970bb9d710bafad2bc4bbd4a Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Wed, 10 Jan 2018 14:08:50 +0000 Subject: COMPMID-782 Port examples to the new format Change-Id: Ib178a97c080ff650094d02ee49e2a0aa22376dd0 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/115717 Reviewed-by: Anthony Barbier Tested-by: Jenkins --- utils/Utils.cpp | 35 ----------------------------------- utils/Utils.h | 17 ----------------- 2 files changed, 52 deletions(-) (limited to 'utils') diff --git a/utils/Utils.cpp b/utils/Utils.cpp index c2f5449a28..32d5e3a6c0 100644 --- a/utils/Utils.cpp +++ b/utils/Utils.cpp @@ -66,41 +66,6 @@ void discard_comments_and_spaces(std::ifstream &fs) } } // namespace -//FIXME: Delete once tests have been ported (COMPMID-782) -int run_example(int argc, char **argv, example &func) -{ - std::cout << "\n" - << argv[0] << "\n\n"; - - try - { - func(argc, argv); - - std::cout << "\nTest passed\n"; - return 0; - } -#ifdef ARM_COMPUTE_CL - catch(cl::Error &err) - { - std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; - std::cerr << std::endl - << "ERROR " << err.what() << "(" << err.err() << ")" << std::endl; - std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; - } -#endif /* ARM_COMPUTE_CL */ - catch(std::runtime_error &err) - { - std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; - std::cerr << std::endl - << "ERROR " << err.what() << " " << (errno ? strerror(errno) : "") << std::endl; - std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; - } - - std::cout << "\nTest FAILED\n"; - - return -1; -} - #ifndef BENCHMARK_EXAMPLES int run_example(int argc, char **argv, Example &example) { diff --git a/utils/Utils.h b/utils/Utils.h index 9b5d0c4aa9..01e5137669 100644 --- a/utils/Utils.h +++ b/utils/Utils.h @@ -55,23 +55,6 @@ namespace arm_compute { namespace utils { -//FIXME: Delete once tests have been ported (COMPMID-782) -/** Signature of an example to run - * - * @param[in] argc Number of command line arguments - * @param[in] argv Command line arguments - */ -using example = void(int argc, char **argv); - -//FIXME: Delete once tests have been ported (COMPMID-782) -/** Run an example and handle the potential exceptions it throws - * - * @param[in] argc Number of command line arguments - * @param[in] argv Command line arguments - * @param[in] func Pointer to the function containing the code to run - */ -int run_example(int argc, char **argv, example &func); - /** Abstract Example class. * * All examples have to inherit from this class. -- cgit v1.2.1