mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
Move unit tests to sr/libutil/tests, use mk make rules
This commit is contained in:
parent
73d0b5d807
commit
7cc7cef950
4 changed files with 15 additions and 8 deletions
4
Makefile
4
Makefile
|
@ -3,6 +3,7 @@ makefiles = \
|
|||
local.mk \
|
||||
nix-rust/local.mk \
|
||||
src/libutil/local.mk \
|
||||
src/libutil/tests/local.mk \
|
||||
src/libstore/local.mk \
|
||||
src/libfetchers/local.mk \
|
||||
src/libmain/local.mk \
|
||||
|
@ -16,8 +17,7 @@ makefiles = \
|
|||
misc/upstart/local.mk \
|
||||
doc/manual/local.mk \
|
||||
tests/local.mk \
|
||||
tests/plugins/local.mk \
|
||||
tests/unit-tests/local.mk
|
||||
tests/plugins/local.mk
|
||||
|
||||
-include Makefile.config
|
||||
|
||||
|
|
11
src/libutil/tests/local.mk
Normal file
11
src/libutil/tests/local.mk
Normal file
|
@ -0,0 +1,11 @@
|
|||
programs += libutil-tests
|
||||
|
||||
libutil-tests_DIR := $(d)
|
||||
|
||||
libutil-tests_SOURCES := $(wildcard $(d)/*.cc)
|
||||
|
||||
libutil-tests_CXXFLAGS += -I src/libutil
|
||||
|
||||
libutil-tests_LIBS = libutil
|
||||
|
||||
libutil-tests_LDFLAGS := $$(pkg-config --libs gtest_main)
|
|
@ -1,5 +1,5 @@
|
|||
#include "../../src/libutil/util.hh"
|
||||
#include "../../src/libutil/types.hh"
|
||||
#include "util.hh"
|
||||
#include "types.hh"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
LIBS=-larchive -lcrypto -llzma -lbz2 -lz -lbrotlienc -lbrotlidec
|
||||
unit-tests:
|
||||
echo $(nix_LDFLAGS)
|
||||
$(CXX) -o unit-test $(nix_CXXFLAGS) $(nix_LDFLAGS) $(LIBS) --std=c++17 $$(pkg-config --libs gtest_main) ./src/libutil/*.o tests/unit-tests/test-util.cc
|
Loading…
Reference in a new issue