mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 05:16:10 +01:00
Report Catch2's version in the xml reporter output
This commit is contained in:
parent
40c8909a49
commit
d9b0a38f81
@ -14,6 +14,7 @@
|
||||
#include <catch2/internal/catch_list.hpp>
|
||||
#include <catch2/catch_test_case_info.hpp>
|
||||
#include <catch2/internal/catch_move_and_forward.hpp>
|
||||
#include <catch2/catch_version.hpp>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(push)
|
||||
@ -54,7 +55,8 @@ namespace Catch {
|
||||
m_xml.writeStylesheetRef( stylesheetRef );
|
||||
m_xml.startElement("Catch2TestRun")
|
||||
.writeAttribute("name"_sr, m_config->name())
|
||||
.writeAttribute("rng-seed"_sr, m_config->rngSeed());
|
||||
.writeAttribute("rng-seed"_sr, m_config->rngSeed())
|
||||
.writeAttribute("catch2-version"_sr, libraryVersion());
|
||||
if (m_config->testSpec().hasFilters())
|
||||
m_xml.writeAttribute( "filters"_sr, serializeFilters( m_config->getTestsOrTags() ) );
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ Filters: ~[!nonportable]~[!benchmark]~[approvals] *
|
||||
Randomness seeded to: 1
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
<exe-name> is a <version> host application.
|
||||
<exe-name> is a Catch2 v<version> host application.
|
||||
Run with -? for options
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
@ -2,7 +2,7 @@ Filters: ~[!nonportable]~[!benchmark]~[approvals] *
|
||||
Randomness seeded to: 1
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
<exe-name> is a <version> host application.
|
||||
<exe-name> is a Catch2 v<version> host application.
|
||||
Run with -? for options
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
@ -2,7 +2,7 @@ Filters: ~[!nonportable]~[!benchmark]~[approvals] *
|
||||
Randomness seeded to: 1
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
<exe-name> is a <version> host application.
|
||||
<exe-name> is a Catch2 v<version> host application.
|
||||
Run with -? for options
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
@ -2,7 +2,7 @@ Filters: ~[!nonportable]~[!benchmark]~[approvals] *
|
||||
Randomness seeded to: 1
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
<exe-name> is a <version> host application.
|
||||
<exe-name> is a Catch2 v<version> host application.
|
||||
Run with -? for options
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Catch2TestRun name="<exe-name>" rng-seed="1" filters="~[!nonportable]~[!benchmark]~[approvals] *">
|
||||
<Catch2TestRun name="<exe-name>" rng-seed="1" catch2-version="<version>" filters="~[!nonportable]~[!benchmark]~[approvals] *">
|
||||
<TestCase name="# A test name that starts with a #" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" >
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Catch2TestRun name="<exe-name>" rng-seed="1" filters="~[!nonportable]~[!benchmark]~[approvals] *">
|
||||
<Catch2TestRun name="<exe-name>" rng-seed="1" catch2-version="<version>" filters="~[!nonportable]~[!benchmark]~[approvals] *">
|
||||
<TestCase name="# A test name that starts with a #" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" >
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
|
@ -34,7 +34,7 @@ hexParser = re.compile(r'\b(0[xX][0-9a-fA-F]+)\b')
|
||||
junitDurationsParser = re.compile(r' time="[0-9]+\.[0-9]{3}"')
|
||||
durationParser = re.compile(r''' duration=['"][0-9]+['"]''')
|
||||
timestampsParser = re.compile(r'\d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2}Z')
|
||||
versionParser = re.compile(r'Catch2 v[0-9]+\.[0-9]+\.[0-9]+(-\w*\.[0-9]+)?')
|
||||
versionParser = re.compile(r'[0-9]+\.[0-9]+\.[0-9]+(-\w*\.[0-9]+)?')
|
||||
nullParser = re.compile(r'\b(__null|nullptr)\b')
|
||||
exeNameParser = re.compile(r'''
|
||||
\b
|
||||
|
Loading…
Reference in New Issue
Block a user