<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/src/catch2/internal/catch_run_context.hpp, branch v3.7.0</title>
<subtitle>Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.</subtitle>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/'/>
<entry>
<title>Large output redirect refactor</title>
<updated>2024-08-13T21:32:24+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2024-08-09T22:28:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=f24569a1b4af70352d454ca46eb3be45a0ba51ef'/>
<id>f24569a1b4af70352d454ca46eb3be45a0ba51ef</id>
<content type='text'>
This rework changes two important things

1) the output redirect is deactivated while control is given to the reporters.
   This means that combining reporters that write to stdout with capturing
   reporters, e.g. `./tests -s -r console -r junit::out=junit.xml`, no
   longer leads to the capturing reporter seeing all the output from
   the other reporter captured.

Trying this with the `SelfTest` binary would previously lead to JUnit
spending **hours** trying to escape all of ConsoleReporter's output and
write it to the output file. I actually ended up killing the process
after 3 hours, during which the JUnit reporter wrote something like 50 MBs
of output to a file.

2) The redirect object's lifetime is tied to the `RunContext`, instead
  of being constructed for every partial test case run separately.

This has no effect on the basic StreamRedirect, but improves the FileRedirect
significantly. Previously, running many tests in single process with this
redirect (e.g. running `SelfTest -r junit`) would cause later tests to
always fail before starting, due to exceeding the limit of temporary files.

For the current `SelfTest` binary, the old implementation would lead to
**295** test failures from not being able to initiate the redirect. The
new implementation completely eliminates them.

----

There is one downside to the new implementation of FileRedirect, specific
to Linux. Running the `SelfTest` binary on Linux causes 3-4 tests to have
no captured stdout/stderr, even though the tests were supposed to be
writing there (there was no output to the actual stdout/stderr either,
the output was just completely lost).

Since this never happen for smaller test case sets, nor does it reproduce
on other platforms, this implementation is still strictly better than
the old one, and thus it can get reasonably merged.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This rework changes two important things

1) the output redirect is deactivated while control is given to the reporters.
   This means that combining reporters that write to stdout with capturing
   reporters, e.g. `./tests -s -r console -r junit::out=junit.xml`, no
   longer leads to the capturing reporter seeing all the output from
   the other reporter captured.

Trying this with the `SelfTest` binary would previously lead to JUnit
spending **hours** trying to escape all of ConsoleReporter's output and
write it to the output file. I actually ended up killing the process
after 3 hours, during which the JUnit reporter wrote something like 50 MBs
of output to a file.

2) The redirect object's lifetime is tied to the `RunContext`, instead
  of being constructed for every partial test case run separately.

This has no effect on the basic StreamRedirect, but improves the FileRedirect
significantly. Previously, running many tests in single process with this
redirect (e.g. running `SelfTest -r junit`) would cause later tests to
always fail before starting, due to exceeding the limit of temporary files.

For the current `SelfTest` binary, the old implementation would lead to
**295** test failures from not being able to initiate the redirect. The
new implementation completely eliminates them.

----

There is one downside to the new implementation of FileRedirect, specific
to Linux. Running the `SelfTest` binary on Linux causes 3-4 tests to have
no captured stdout/stderr, even though the tests were supposed to be
writing there (there was no output to the actual stdout/stderr either,
the output was just completely lost).

Since this never happen for smaller test case sets, nor does it reproduce
on other platforms, this implementation is still strictly better than
the old one, and thus it can get reasonably merged.
</pre>
</div>
</content>
</entry>
<entry>
<title>Move AssertionResult when passing it inside RunContext</title>
<updated>2023-05-06T21:58:48+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-05-06T19:45:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=8ca504cbc956d566ea77a8d59928146ad4cc3844'/>
<id>8ca504cbc956d566ea77a8d59928146ad4cc3844</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix assertionStarting events being sent after the expr is evaluated</title>
<updated>2023-05-06T09:48:41+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-05-06T09:48:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=d84777c9cbf5b1b7d0e9ef2e14606ece254adf7a'/>
<id>d84777c9cbf5b1b7d0e9ef2e14606ece254adf7a</id>
<content type='text'>
Closes #2678
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes #2678
</pre>
</div>
</content>
</entry>
<entry>
<title>Cleanup internal includes by splitting out some event structs</title>
<updated>2023-03-31T17:31:51+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-03-31T08:44:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=9f08097f55eb29a61efcdb4af41952a67e155215'/>
<id>9f08097f55eb29a61efcdb4af41952a67e155215</id>
<content type='text'>
* Split out BenchmarkInfo and BenchmarkStats to their own header
* Outline BenchmarkStats&lt;&gt; declaration to separate header
* Split out TestRunInfo into its own header

These changes let us remove the large `interfaces_reporter.hpp`
include from `benchmark.hpp`, and replace it with
`interfaces_capture.hpp` in `run_context.hpp`.

I also cleaned out `interfaces_repoter.hpp` from reporter headers
that depend on `reporter_common_base.hpp`. This will not change
anything in the actual inclusion set, but makes it logically
more consistent.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Split out BenchmarkInfo and BenchmarkStats to their own header
* Outline BenchmarkStats&lt;&gt; declaration to separate header
* Split out TestRunInfo into its own header

These changes let us remove the large `interfaces_reporter.hpp`
include from `benchmark.hpp`, and replace it with
`interfaces_capture.hpp` in `run_context.hpp`.

I also cleaned out `interfaces_repoter.hpp` from reporter headers
that depend on `reporter_common_base.hpp`. This will not change
anything in the actual inclusion set, but makes it logically
more consistent.
</pre>
</div>
</content>
</entry>
<entry>
<title>Mark various anonymous classes final</title>
<updated>2023-03-20T21:56:43+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-03-20T21:56:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=2598116aa640b012d42900bb565a7f1bfae5152e'/>
<id>2598116aa640b012d42900bb565a7f1bfae5152e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove pointless member variable from RunContext</title>
<updated>2023-03-20T19:34:58+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-03-20T19:34:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=28437e1214fec5ffc4d744c75a894f9cddf8d635'/>
<id>28437e1214fec5ffc4d744c75a894f9cddf8d635</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Move exception's translation into AssertionResultData message</title>
<updated>2023-03-11T15:14:06+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-03-11T15:14:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=13fae1e2ff9939d03bb8a5a6f3341538d4127dc5'/>
<id>13fae1e2ff9939d03bb8a5a6f3341538d4127dc5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't take ownership of SECTION's name for inactive sections</title>
<updated>2023-01-29T09:44:20+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-01-27T23:35:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=65ffee518944372b35a885aa521ac28406f8b8fb'/>
<id>65ffee518944372b35a885aa521ac28406f8b8fb</id>
<content type='text'>
This eliminates 1945 (432709 -&gt; 430764) allocations from running
`./tests/SelfTest -o /dev/null`. In general terms, this saves
an allocation every time an unvisited `SECTION` is passed, which
means that the saved allocations are quadratic in number of sibling
(same level) `SECTION`s in a test case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This eliminates 1945 (432709 -&gt; 430764) allocations from running
`./tests/SelfTest -o /dev/null`. In general terms, this saves
an allocation every time an unvisited `SECTION` is passed, which
means that the saved allocations are quadratic in number of sibling
(same level) `SECTION`s in a test case.
</pre>
</div>
</content>
</entry>
<entry>
<title>Clean up extraneous copies in Messages</title>
<updated>2023-01-28T21:14:37+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-01-28T21:01:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=906552f8c831d0dd1917484b53dd080537f19acd'/>
<id>906552f8c831d0dd1917484b53dd080537f19acd</id>
<content type='text'>
This removes 109 allocations from running `tests/SelfTest`
(437057 -&gt; 436948).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes 109 allocations from running `tests/SelfTest`
(437057 -&gt; 436948).
</pre>
</div>
</content>
</entry>
<entry>
<title>Move SectionEndInfo into sectionEnded call in SECTION's destructor</title>
<updated>2023-01-28T12:00:30+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-01-28T12:00:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=2403f5620e60b41d84e35a88bacbb8bd8e1d92a8'/>
<id>2403f5620e60b41d84e35a88bacbb8bd8e1d92a8</id>
<content type='text'>
When running `./tests/SelfTest -o /dev/null`, this saves 1272
allocations (437439 -&gt; 437167). In general, this saves multiple
allocations per end of an entered `SECTION`, if the section name
was too long for SSO, because `RunContext::sectionEnded` can then
move the section's name further down the callstack.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When running `./tests/SelfTest -o /dev/null`, this saves 1272
allocations (437439 -&gt; 437167). In general, this saves multiple
allocations per end of an entered `SECTION`, if the section name
was too long for SSO, because `RunContext::sectionEnded` can then
move the section's name further down the callstack.
</pre>
</div>
</content>
</entry>
</feed>
