2023-08-25 17:20:28 +03:00
|
|
|
check: libexpr-tests_RUN
|
|
|
|
|
|
|
|
programs += libexpr-tests
|
|
|
|
|
|
|
|
libexpr-tests_NAME := libnixexpr-tests
|
|
|
|
|
|
|
|
libexpr-tests_ENV := _NIX_TEST_UNIT_DATA=$(d)/data
|
|
|
|
|
|
|
|
libexpr-tests_DIR := $(d)
|
|
|
|
|
|
|
|
ifeq ($(INSTALL_UNIT_TESTS), yes)
|
|
|
|
libexpr-tests_INSTALL_DIR := $(checkbindir)
|
|
|
|
else
|
|
|
|
libexpr-tests_INSTALL_DIR :=
|
|
|
|
endif
|
|
|
|
|
|
|
|
libexpr-tests_SOURCES := \
|
|
|
|
$(wildcard $(d)/*.cc) \
|
2023-12-21 23:45:21 +02:00
|
|
|
$(wildcard $(d)/value/*.cc) \
|
|
|
|
$(wildcard $(d)/flake/*.cc)
|
2023-08-25 17:20:28 +03:00
|
|
|
|
|
|
|
libexpr-tests_EXTRA_INCLUDES = \
|
|
|
|
-I tests/unit/libexpr-support \
|
|
|
|
-I tests/unit/libstore-support \
|
|
|
|
-I tests/unit/libutil-support \
|
2023-09-03 00:10:28 +03:00
|
|
|
$(INCLUDE_libexpr) \
|
2024-03-28 20:00:04 +02:00
|
|
|
$(INCLUDE_libexprc) \
|
2023-09-03 00:10:28 +03:00
|
|
|
$(INCLUDE_libfetchers) \
|
|
|
|
$(INCLUDE_libstore) \
|
2024-03-28 20:00:04 +02:00
|
|
|
$(INCLUDE_libstorec) \
|
|
|
|
$(INCLUDE_libutil) \
|
|
|
|
$(INCLUDE_libutilc)
|
2023-08-25 17:20:28 +03:00
|
|
|
|
|
|
|
libexpr-tests_CXXFLAGS += $(libexpr-tests_EXTRA_INCLUDES)
|
|
|
|
|
|
|
|
libexpr-tests_LIBS = \
|
2024-04-08 14:07:36 +03:00
|
|
|
libexpr-test-support libstore-test-support libutil-test-support \
|
2024-01-03 20:10:43 +02:00
|
|
|
libexpr libexprc libfetchers libstore libstorec libutil libutilc
|
2023-08-25 17:20:28 +03:00
|
|
|
|
|
|
|
libexpr-tests_LDFLAGS := -lrapidcheck $(GTEST_LIBS) -lgmock
|
2024-05-23 13:55:25 +03:00
|
|
|
|
|
|
|
ifdef HOST_WINDOWS
|
|
|
|
# Increase the default reserved stack size to 65 MB so Nix doesn't run out of space
|
|
|
|
libexpr-tests_LDFLAGS += -Wl,--stack,$(shell echo $$((65 * 1024 * 1024)))
|
|
|
|
endif
|