Skip to content

Commit

Permalink
ut-v2.0. Output junit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
talisein committed Oct 15, 2023
1 parent 531fff9 commit 0c746ec
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 17 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
actions: read
contents: read
security-events: write
checks: write
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
Expand Down Expand Up @@ -193,6 +194,18 @@ jobs:
id: unittests
run: meson test -C build --print-errorlogs

- name: Test Reporter
uses: dorny/[email protected]
if: ${{ always() }}
continue-on-error: true
with:
name: Unit tests ${{ matrix.os }} ${{ matrix.compiler }}
path: |
'build/meson-logs/testlog.junit.xml'
'build/*junit.xml'
reporter: java-junit
fail-on-error: false

- if: ${{ steps.unittests.conclusion == 'failure' && failure() }}
name: Test backtrace
run: |
Expand Down Expand Up @@ -255,18 +268,14 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: dregarnuhr-${{ matrix.os }}-${{ matrix.compiler }}
path: |
build/src/dregarnuhr
build/src/*_test
path: build/src/dregarnuhr

- if: ${{ matrix.flavor == 'windows' && (success() || failure()) }}
name: Binary Windows
uses: actions/upload-artifact@v3
with:
name: dregarnuhr-${{ matrix.os }}
path: |
build/src/dregarnuhr.exe
build/src/*_test.exe
path: build/src/dregarnuhr.exe

check-run-linux:
needs: build
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Rearrange Ascendence of a Bookworm epubs into Chronological Order

![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/talisein/dregarnuhr)
[![CI](https://github.com/talisein/dregarnuhr/actions/workflows/main.yml/badge.svg)](https://github.com/talisein/dregarnuhr/actions/workflows/main.yml)
[![CI](https://github.com/talisein/dregarnuhr/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/talisein/dregarnuhr/actions/workflows/main.yml)
[![Copr build status](https://copr.fedorainfracloud.org/coprs/talisein/dregarnuhr/package/dregarnuhr/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/talisein/dregarnuhr/package/dregarnuhr/)
[![PPA](https://img.shields.io/badge/Ubuntu%20PPA-available-%23e9500e)](https://launchpad.net/~talisein/+archive/ubuntu/dregarnuhr)

Expand Down
2 changes: 1 addition & 1 deletion dregarnuhr.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: dregarnuhr
Version: 1.0.16
Version: 1.0.18
Release: 1
Summary: Rearrange Ascendence of a Bookworm epubs into Chronological Order

Expand Down
4 changes: 2 additions & 2 deletions subprojects/boostut.wrap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[wrap-git]
url = https://github.com/boost-ext/ut.git
revision = e53a47d37bc594e80bd5f1b8dc1ade8dce4429d3
directory = ut-e53a47d
revision = v2.0.0
directory = ut-v2.0.0
11 changes: 8 additions & 3 deletions test/meson.build
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@


test('Simple', exe, args: ['--check'])

ut_args = ['-r', 'junit', '-o']
volumes_test = executable('volumes_test', 'volumes.cpp',
dependencies: [boostut_dep, dep])
test('volumes', volumes_test)
test('volumes', volumes_test,
args: [ut_args, 'volumes-junit.xml'])

utils_test = executable('utils_test', 'utils.cpp',
dependencies: [boostut_dep, dep])
test('utils', utils_test)
test('utils', utils_test,
args: [ut_args, 'utils-junit.xml'])

args_test = executable('args_test', 'args.cpp',
dependencies: [boostut_dep, dep])
test('args', args_test)
test('args', args_test,
args: [ut_args, 'args-junit.xml'])
2 changes: 0 additions & 2 deletions test/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

#include <boost/ut.hpp>

template<> auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter<boost::ut::printer>>{};

int main() {
using namespace boost::ut;
using namespace std::string_literals;
Expand Down
2 changes: 0 additions & 2 deletions test/volumes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#include <boost/ut.hpp>
#include "magic_enum.hpp"

template<> auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter<boost::ut::printer>>{};

int main() {
using namespace boost::ut;
using namespace std::string_literals;
Expand Down

0 comments on commit 0c746ec

Please sign in to comment.