lix/tests/unit-tests/local.mk
Tobias Pflug 58ed1e6d68 WIP: add unit tests for libutil
This is a proof on concept to evaluate writing unit tests for Nix using
google test (https://github.com/google/googletest).

In order to execute tests:

$ make unit-tests
$ ./unit-tests

The Makefile rules for `unit-tests` is a complete hack.
2020-05-06 15:57:05 +02:00

5 lines
251 B
Makefile

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