-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NixOS#11331 from NixOS/make-check
Revert "Remove unit tests from old build system" (too soon)
- Loading branch information
Showing
12 changed files
with
337 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
libraries += libexpr-test-support | ||
|
||
libexpr-test-support_NAME = libnixexpr-test-support | ||
|
||
libexpr-test-support_DIR := $(d) | ||
|
||
ifeq ($(INSTALL_UNIT_TESTS), yes) | ||
libexpr-test-support_INSTALL_DIR := $(checklibdir) | ||
else | ||
libexpr-test-support_INSTALL_DIR := | ||
endif | ||
|
||
libexpr-test-support_SOURCES := \ | ||
$(wildcard $(d)/tests/*.cc) \ | ||
$(wildcard $(d)/tests/value/*.cc) | ||
|
||
libexpr-test-support_CXXFLAGS += $(libexpr-tests_EXTRA_INCLUDES) | ||
|
||
libexpr-test-support_LIBS = \ | ||
libstore-test-support libutil-test-support \ | ||
libexpr libstore libutil | ||
|
||
libexpr-test-support_LDFLAGS := $(THREAD_LDFLAGS) -lrapidcheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
check: libexpr-tests_RUN | ||
|
||
programs += libexpr-tests | ||
|
||
libexpr-tests_NAME := libnixexpr-tests | ||
|
||
libexpr-tests_ENV := _NIX_TEST_UNIT_DATA=$(d)/data GTEST_OUTPUT=xml:$$testresults/libexpr-tests.xml | ||
|
||
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) \ | ||
$(wildcard $(d)/value/*.cc) \ | ||
$(wildcard $(d)/flake/*.cc) | ||
|
||
libexpr-tests_EXTRA_INCLUDES = \ | ||
-I tests/unit/libexpr-support \ | ||
-I tests/unit/libstore-support \ | ||
-I tests/unit/libutil-support \ | ||
$(INCLUDE_libexpr) \ | ||
$(INCLUDE_libexprc) \ | ||
$(INCLUDE_libfetchers) \ | ||
$(INCLUDE_libstore) \ | ||
$(INCLUDE_libstorec) \ | ||
$(INCLUDE_libutil) \ | ||
$(INCLUDE_libutilc) | ||
|
||
libexpr-tests_CXXFLAGS += $(libexpr-tests_EXTRA_INCLUDES) | ||
|
||
libexpr-tests_LIBS = \ | ||
libexpr-test-support libstore-test-support libutil-test-support \ | ||
libexpr libexprc libfetchers libstore libstorec libutil libutilc | ||
|
||
libexpr-tests_LDFLAGS := -lrapidcheck $(GTEST_LIBS) -lgmock | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
check: libfetchers-tests_RUN | ||
|
||
programs += libfetchers-tests | ||
|
||
libfetchers-tests_NAME = libnixfetchers-tests | ||
|
||
libfetchers-tests_ENV := _NIX_TEST_UNIT_DATA=$(d)/data GTEST_OUTPUT=xml:$$testresults/libfetchers-tests.xml | ||
|
||
libfetchers-tests_DIR := $(d) | ||
|
||
ifeq ($(INSTALL_UNIT_TESTS), yes) | ||
libfetchers-tests_INSTALL_DIR := $(checkbindir) | ||
else | ||
libfetchers-tests_INSTALL_DIR := | ||
endif | ||
|
||
libfetchers-tests_SOURCES := $(wildcard $(d)/*.cc) | ||
|
||
libfetchers-tests_EXTRA_INCLUDES = \ | ||
-I tests/unit/libstore-support \ | ||
-I tests/unit/libutil-support \ | ||
$(INCLUDE_libfetchers) \ | ||
$(INCLUDE_libstore) \ | ||
$(INCLUDE_libutil) | ||
|
||
libfetchers-tests_CXXFLAGS += $(libfetchers-tests_EXTRA_INCLUDES) | ||
|
||
libfetchers-tests_LIBS = \ | ||
libstore-test-support libutil-test-support \ | ||
libfetchers libstore libutil | ||
|
||
libfetchers-tests_LDFLAGS := -lrapidcheck $(GTEST_LIBS) $(LIBGIT2_LIBS) | ||
|
||
ifdef HOST_WINDOWS | ||
# Increase the default reserved stack size to 65 MB so Nix doesn't run out of space | ||
libfetchers-tests_LDFLAGS += -Wl,--stack,$(shell echo $$((65 * 1024 * 1024))) | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
check: libflake-tests_RUN | ||
|
||
programs += libflake-tests | ||
|
||
libflake-tests_NAME := libnixflake-tests | ||
|
||
libflake-tests_ENV := _NIX_TEST_UNIT_DATA=$(d)/data GTEST_OUTPUT=xml:$$testresults/libflake-tests.xml | ||
|
||
libflake-tests_DIR := $(d) | ||
|
||
ifeq ($(INSTALL_UNIT_TESTS), yes) | ||
libflake-tests_INSTALL_DIR := $(checkbindir) | ||
else | ||
libflake-tests_INSTALL_DIR := | ||
endif | ||
|
||
libflake-tests_SOURCES := \ | ||
$(wildcard $(d)/*.cc) \ | ||
$(wildcard $(d)/value/*.cc) \ | ||
$(wildcard $(d)/flake/*.cc) | ||
|
||
libflake-tests_EXTRA_INCLUDES = \ | ||
-I tests/unit/libflake-support \ | ||
-I tests/unit/libstore-support \ | ||
-I tests/unit/libutil-support \ | ||
$(INCLUDE_libflake) \ | ||
$(INCLUDE_libexpr) \ | ||
$(INCLUDE_libfetchers) \ | ||
$(INCLUDE_libstore) \ | ||
$(INCLUDE_libutil) \ | ||
|
||
libflake-tests_CXXFLAGS += $(libflake-tests_EXTRA_INCLUDES) | ||
|
||
libflake-tests_LIBS = \ | ||
libexpr-test-support libstore-test-support libutil-test-support \ | ||
libflake libexpr libfetchers libstore libutil | ||
|
||
libflake-tests_LDFLAGS := -lrapidcheck $(GTEST_LIBS) -lgmock | ||
|
||
ifdef HOST_WINDOWS | ||
# Increase the default reserved stack size to 65 MB so Nix doesn't run out of space | ||
libflake-tests_LDFLAGS += -Wl,--stack,$(shell echo $$((65 * 1024 * 1024))) | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
libraries += libstore-test-support | ||
|
||
libstore-test-support_NAME = libnixstore-test-support | ||
|
||
libstore-test-support_DIR := $(d) | ||
|
||
ifeq ($(INSTALL_UNIT_TESTS), yes) | ||
libstore-test-support_INSTALL_DIR := $(checklibdir) | ||
else | ||
libstore-test-support_INSTALL_DIR := | ||
endif | ||
|
||
libstore-test-support_SOURCES := $(wildcard $(d)/tests/*.cc) | ||
|
||
libstore-test-support_CXXFLAGS += $(libstore-tests_EXTRA_INCLUDES) | ||
|
||
libstore-test-support_LIBS = \ | ||
libutil-test-support \ | ||
libstore libutil | ||
|
||
libstore-test-support_LDFLAGS := $(THREAD_LDFLAGS) -lrapidcheck |
Oops, something went wrong.