COMPMID-415: Add --stop-on-error

Change-Id: I557934e8f065d8877344c945980b33139c2a5c97
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/81831
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
diff --git a/framework/Framework.h b/framework/Framework.h
index 0929b4a..671e4e4 100644
--- a/framework/Framework.h
+++ b/framework/Framework.h
@@ -213,6 +213,18 @@
      */
     void set_throw_errors(bool throw_errors);
 
+    /** Indicates if test execution is stopped after the first failed test.
+     *
+     * @return True if the execution is going to be aborted after the first failed test.
+     */
+    bool stop_on_error() const;
+
+    /** Set whether to abort execution after the first failed test.
+     *
+     * @param[in] stop_on_error True if execution is going to be aborted after first failed test.
+     */
+    void set_stop_on_error(bool stop_on_error);
+
     /** Check if a test case is selected to be executed.
      *
      * @param[in] info Test case info.
@@ -289,6 +301,7 @@
     std::map<TestInfo, TestResult> _test_results{};
     int      _num_iterations{ 1 };
     bool     _throw_errors{ false };
+    bool     _stop_on_error{ false };
     Printer *_printer{ nullptr };
 
     using create_function = std::unique_ptr<Instrument>();