GCC Code Coverage Report


Directory: include/tts/
File: include/tts/engine/abort_report.hpp
Date: 2026-10-14 16:28:14
Exec Total Coverage
Lines: 0 10 0.0%
Functions: 0 1 0.0%
Branches: 0 5 0.0%

Line Branch Exec Source
1 //======================================================================================================================
2 //! @file
3 /*
4 TTS - Tiny Test System
5 Copyright : TTS Contributors & Maintainers
6 SPDX-License-Identifier: BSL-1.0
7 */
8 //======================================================================================================================
9 #pragma once
10
11 #include <tts/engine/abort.hpp>
12 #include <tts/engine/deps.hpp>
13 #include <tts/engine/environment.hpp>
14 #include <tts/engine/test.hpp>
15
16 namespace tts::_
17 {
18 inline std::size_t remaining_tests = 0; // NOSONAR - the loop updates it before each case
19
20 ✗ inline void report_abort(char const* headline, char const* reason)
21 {
22 using enum ::tts::expected_outcome;
23
24 // Without fatal() the Results: line reads 100% success on a run that died.
25 ✗ ::tts::global_runtime.fatal();
26
27 // A case tagged xfail or may_fail asked for this end, so the run is not surprised by it.
28 ✗ if(current_tag != xfail && current_tag != may_fail) ::tts::global_runtime.unexpected();
29
30 ✗ ::tts::output().writeln(headline);
31 ✗ ::tts::output().suite_aborted();
32 ✗ ::tts::output().writeln(
33 ✗ "@@ ABORTING DUE TO %s @@ - %d Tests not run", reason, static_cast<int>(remaining_tests));
34
35 ✗ abort_exit_code = ::tts::report(0, 0);
36 ✗ ::tts::output().finish();
37 ✗ }
38 }
39