aboutsummaryrefslogtreecommitdiff
path: root/tests/validate_examples/ValidateExample.h
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2018-04-20 15:46:21 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:49:54 +0000
commit9fb0cac961f70d1937c5fa3eafeaee1385c89768 (patch)
tree9a8847053f65631e050c231645549adb48c92fb8 /tests/validate_examples/ValidateExample.h
parentfda901f0485371e8b6a807c8dd9614560a924793 (diff)
downloadComputeLibrary-9fb0cac961f70d1937c5fa3eafeaee1385c89768.tar.gz
COMPMID-1081: Introduced test-wide instruments
Change-Id: I5831241f3fc503717cc51136453c2bf96d4b420b Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/128484 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'tests/validate_examples/ValidateExample.h')
-rw-r--r--tests/validate_examples/ValidateExample.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/validate_examples/ValidateExample.h b/tests/validate_examples/ValidateExample.h
index cedbe3d0d9..4dd552ab10 100644
--- a/tests/validate_examples/ValidateExample.h
+++ b/tests/validate_examples/ValidateExample.h
@@ -40,14 +40,24 @@ namespace utils
*
* All examples with a validation stage have to inherit from this class.
*/
-class ValidateExample : public Example
+class ValidateExample
{
public:
+ /** Setup the example.
+ *
+ * @param[in] argc Argument count.
+ * @param[in] argv Argument values.
+ */
+ virtual void do_setup(int argc, char **argv) {};
+ /** Run the example. */
+ virtual void do_run() {};
/** Run reference implementation and validate against the target output
*/
virtual void do_validate()
{
}
+ /** Teardown the example. */
+ virtual void do_teardown() {};
/** Print the example parameters
*
* @param[in,out] printer Printer to use to print the parameters
@@ -65,7 +75,7 @@ public:
* @param[in] argv Command line arguments
* @param[in] example Example to run
*/
-int run_example(int argc, char **argv, ValidateExample &example);
+int run_example(int argc, char **argv, std::unique_ptr<ValidateExample> example);
} // namespace utils
} // namespace arm_compute