~nabijaczleweli/klapki

072d8d15210e254c50b9ad890949f6cbb96f81cb — наб 11 months ago 6db4007
Use system Catch2
5 files changed, 7 insertions(+), 4 deletions(-)

M .build.yml
M Makefile
M README.md
M test/main.cpp
M test/state_parse.cpp
M .build.yml => .build.yml +1 -0
@@ 8,6 8,7 @@ packages:
  - libefivar-dev
  - libefiboot-dev
  - libssl-dev
  - catch2
  - mandoc
  - curl
  - groff

M Makefile => Makefile +1 -1
@@ 25,7 25,7 @@ include configMakefile

LDDLLS := efivar efiboot crypto $(OS_LD_LIBS)
LDAR := $(LNCXXAR) $(foreach l,,-L$(BLDDIR)$(l)) $(foreach dll,$(LDDLLS),-l$(dll))
INCAR := $(foreach l,$(foreach l,fmt,$(l)/include) Catch2/single_include/catch2,-isystemext/$(l)) $(foreach l,,-isystem$(BLDDIR)$(l)/include) -isystemext
INCAR := -isystemext/fmt/include -isystemext $(shell pkg-config --cflags catch2 2>/dev/null)
VERAR := $(foreach l,KLAPKI,-D$(l)_VERSION='$($(l)_VERSION)')
SOURCES := $(sort $(wildcard $(SRCDIR)*.cpp $(SRCDIR)**/*.cpp $(SRCDIR)**/**/*.cpp $(SRCDIR)**/**/**/*.cpp))
TEST_SOURCES := $(sort $(wildcard $(TSTDIR)*.cpp $(TSTDIR)**/*.cpp $(TSTDIR)**/**/*.cpp $(TSTDIR)**/**/**/*.cpp))

M README.md => README.md +3 -1
@@ 34,7 34,9 @@ echo root=zfs:AUTO intel_iommu=on zfs.zfs_arc_max=85899345920 "$2"

### Building

You'll need `libssl-dev` and `libefi{var,boot}-dev`, to initialise the submodules, and `make` should hopefully Just Work™ if you have a C++17-capable compiler.
You'll need `libssl-dev`, `libefi{var,boot}-dev`, `catch2`, to initialise the submodules, and `make` should hopefully Just Work™ if you have a C++17-capable compiler.

`catch2` is searched via `pkg-config --cflags catch2` if available, or in `$ADDITIONAL_INCLUDE_DIR`.

`mandoc` is required for HTML manpages. Set `MANDOC=true` when building to remove this dependency.


M test/main.cpp => test/main.cpp +1 -1
@@ 21,4 21,4 @@


#define CATCH_CONFIG_MAIN
#include <catch.hpp>
#include <catch2/catch.hpp>

M test/state_parse.cpp => test/state_parse.cpp +1 -1
@@ 22,7 22,7 @@

#include "state.hpp"
#include "test-util.hpp"
#include <catch.hpp>
#include <catch2/catch.hpp>
#include <fmt/format.h>
#include <unordered_map>