summaryrefslogtreecommitdiff
path: root/lib/googletest
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2020-10-19 19:50:57 +0000
committerAlex Richardson <arichardson@FreeBSD.org>2020-10-19 19:50:57 +0000
commit2ed3236082a4473c1da8f72c1ebc071a7b54321f (patch)
treefe695d5a3f10e2a6478f7c23f7f27ed6eacc5e82 /lib/googletest
parent6b56b0ca93412306967a3be3b75f7ee208db90c9 (diff)
downloadsrc-test2-2ed3236082a4473c1da8f72c1ebc071a7b54321f.tar.gz
src-test2-2ed3236082a4473c1da8f72c1ebc071a7b54321f.zip
Major improvement to build parallelism for googletest internal tests
Currently the googletest internal tests build after the matching library. However, each of these is serialized at the top level makefile. Additionally some of the tests (e.g. the gmock-matches-test) take up to 90 seconds to build with clang -O2. Having to wait for this test to complete before continuing to the next directory seriously slows down the parllelism of a -j32 build. Before this change running `make -C lib/googletest -j32 -s` in buildenv took 202 seconds, now it's 153 due to improved parallelism. Reviewed By: emaste (no objection) Differential Revision: https://reviews.freebsd.org/D26748
Notes
Notes: svn path=/head/; revision=366850
Diffstat (limited to 'lib/googletest')
-rw-r--r--lib/googletest/gmock/Makefile3
-rw-r--r--lib/googletest/gmock_main/Makefile3
-rw-r--r--lib/googletest/gtest/Makefile3
-rw-r--r--lib/googletest/gtest_main/Makefile3
-rw-r--r--lib/googletest/tests/Makefile6
-rw-r--r--lib/googletest/tests/Makefile.inc6
-rw-r--r--lib/googletest/tests/gmock/Makefile (renamed from lib/googletest/gmock/tests/Makefile)0
-rw-r--r--lib/googletest/tests/gmock_main/Makefile (renamed from lib/googletest/gmock_main/tests/Makefile)0
-rw-r--r--lib/googletest/tests/gtest/Makefile (renamed from lib/googletest/gtest/tests/Makefile)0
-rw-r--r--lib/googletest/tests/gtest_main/Makefile (renamed from lib/googletest/gtest_main/tests/Makefile)0
10 files changed, 12 insertions, 12 deletions
diff --git a/lib/googletest/gmock/Makefile b/lib/googletest/gmock/Makefile
index 8eb9fb99a368..d5a71d3c33a6 100644
--- a/lib/googletest/gmock/Makefile
+++ b/lib/googletest/gmock/Makefile
@@ -42,7 +42,4 @@ INTERNAL_CUSTOM_INCS+= gmock/internal/custom/gmock-generated-actions.h
SRCS+= gmock-all.cc
-HAS_TESTS=
-SUBDIR.${MK_TESTS}+= tests
-
.include <bsd.lib.mk>
diff --git a/lib/googletest/gmock_main/Makefile b/lib/googletest/gmock_main/Makefile
index a2ecab10d586..238f342d55eb 100644
--- a/lib/googletest/gmock_main/Makefile
+++ b/lib/googletest/gmock_main/Makefile
@@ -19,7 +19,4 @@ LDFLAGS+= -L${LIBGMOCKDIR}
SRCS+= gmock_main.cc
-HAS_TESTS=
-SUBDIR.${MK_TESTS}+= tests
-
.include <bsd.lib.mk>
diff --git a/lib/googletest/gtest/Makefile b/lib/googletest/gtest/Makefile
index 103bf84db5b2..470682faebc1 100644
--- a/lib/googletest/gtest/Makefile
+++ b/lib/googletest/gtest/Makefile
@@ -47,7 +47,4 @@ SRCS+= gtest-all.cc
LIBADD+= pthread regex
-HAS_TESTS=
-SUBDIR.${MK_TESTS}+= tests
-
.include <bsd.lib.mk>
diff --git a/lib/googletest/gtest_main/Makefile b/lib/googletest/gtest_main/Makefile
index 1499482d878a..dc102ed8a6e0 100644
--- a/lib/googletest/gtest_main/Makefile
+++ b/lib/googletest/gtest_main/Makefile
@@ -17,7 +17,4 @@ LDFLAGS+= -L${LIBGTESTDIR}
SRCS+= gtest_main.cc
-HAS_TESTS=
-SUBDIR.${MK_TESTS}+= tests
-
.include <bsd.lib.mk>
diff --git a/lib/googletest/tests/Makefile b/lib/googletest/tests/Makefile
index 3b3078f8612a..1df9936ff6cf 100644
--- a/lib/googletest/tests/Makefile
+++ b/lib/googletest/tests/Makefile
@@ -3,4 +3,10 @@
.PATH: ${SRCTOP}/tests
KYUAFILE= yes
+# Note: we start the gmock_main and gmock tests first since those take up to
+# 60 seconds to build, so starting them late seriously reduces build parallism.
+SUBDIR= gmock_main gmock gtest_main gtest
+
+SUBDIR_PARALLEL=
+
.include <bsd.test.mk>
diff --git a/lib/googletest/tests/Makefile.inc b/lib/googletest/tests/Makefile.inc
new file mode 100644
index 000000000000..3b6b7fc07a9b
--- /dev/null
+++ b/lib/googletest/tests/Makefile.inc
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+.include "../Makefile.inc"
+# Keep the existing tests directory structure (with subdirs per component)
+# rather than installing all of them to /usr/tests/lib/googletest
+TESTSDIR= ${TESTSBASE}/lib/googletest/${.CURDIR:T}
diff --git a/lib/googletest/gmock/tests/Makefile b/lib/googletest/tests/gmock/Makefile
index 0e311abfe3e1..0e311abfe3e1 100644
--- a/lib/googletest/gmock/tests/Makefile
+++ b/lib/googletest/tests/gmock/Makefile
diff --git a/lib/googletest/gmock_main/tests/Makefile b/lib/googletest/tests/gmock_main/Makefile
index 444c9ae3cb5d..444c9ae3cb5d 100644
--- a/lib/googletest/gmock_main/tests/Makefile
+++ b/lib/googletest/tests/gmock_main/Makefile
diff --git a/lib/googletest/gtest/tests/Makefile b/lib/googletest/tests/gtest/Makefile
index 9ab69ede2d6e..9ab69ede2d6e 100644
--- a/lib/googletest/gtest/tests/Makefile
+++ b/lib/googletest/tests/gtest/Makefile
diff --git a/lib/googletest/gtest_main/tests/Makefile b/lib/googletest/tests/gtest_main/Makefile
index 8d2e9e68d5e1..8d2e9e68d5e1 100644
--- a/lib/googletest/gtest_main/tests/Makefile
+++ b/lib/googletest/tests/gtest_main/Makefile