From owner-svn-src-all@freebsd.org Mon Oct 19 19:50:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E5F16432D66; Mon, 19 Oct 2020 19:50:59 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CFS6q5stjz44dR; Mon, 19 Oct 2020 19:50:59 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ACB2C9104; Mon, 19 Oct 2020 19:50:59 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09JJoxQT048363; Mon, 19 Oct 2020 19:50:59 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09JJovqR048351; Mon, 19 Oct 2020 19:50:57 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202010191950.09JJovqR048351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 19 Oct 2020 19:50:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366850 - in head/lib/googletest: gmock gmock/tests gmock_main gmock_main/tests gtest gtest/tests gtest_main gtest_main/tests tests tests/gmock tests/gmock_main tests/gtest tests/gtest_... X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: in head/lib/googletest: gmock gmock/tests gmock_main gmock_main/tests gtest gtest/tests gtest_main gtest_main/tests tests tests/gmock tests/gmock_main tests/gtest tests/gtest_main X-SVN-Commit-Revision: 366850 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Oct 2020 19:51:00 -0000 Author: arichardson Date: Mon Oct 19 19:50:57 2020 New Revision: 366850 URL: https://svnweb.freebsd.org/changeset/base/366850 Log: 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 Added: head/lib/googletest/tests/Makefile.inc (contents, props changed) head/lib/googletest/tests/gmock/ head/lib/googletest/tests/gmock/Makefile (contents, props changed) - copied, changed from r366849, head/lib/googletest/gmock/tests/Makefile head/lib/googletest/tests/gmock_main/ head/lib/googletest/tests/gmock_main/Makefile (contents, props changed) - copied, changed from r366849, head/lib/googletest/gmock_main/tests/Makefile head/lib/googletest/tests/gtest/ head/lib/googletest/tests/gtest/Makefile (contents, props changed) - copied, changed from r366849, head/lib/googletest/gtest/tests/Makefile head/lib/googletest/tests/gtest_main/ head/lib/googletest/tests/gtest_main/Makefile (contents, props changed) - copied, changed from r366849, head/lib/googletest/gtest_main/tests/Makefile Deleted: head/lib/googletest/gmock/tests/Makefile head/lib/googletest/gmock_main/tests/Makefile head/lib/googletest/gtest/tests/Makefile head/lib/googletest/gtest_main/tests/Makefile Modified: head/lib/googletest/gmock/Makefile head/lib/googletest/gmock_main/Makefile head/lib/googletest/gtest/Makefile head/lib/googletest/gtest_main/Makefile head/lib/googletest/tests/Makefile Modified: head/lib/googletest/gmock/Makefile ============================================================================== --- head/lib/googletest/gmock/Makefile Mon Oct 19 19:23:22 2020 (r366849) +++ head/lib/googletest/gmock/Makefile Mon Oct 19 19:50:57 2020 (r366850) @@ -42,7 +42,4 @@ INTERNAL_CUSTOM_INCS+= gmock/internal/custom/gmock-gen SRCS+= gmock-all.cc -HAS_TESTS= -SUBDIR.${MK_TESTS}+= tests - .include Modified: head/lib/googletest/gmock_main/Makefile ============================================================================== --- head/lib/googletest/gmock_main/Makefile Mon Oct 19 19:23:22 2020 (r366849) +++ head/lib/googletest/gmock_main/Makefile Mon Oct 19 19:50:57 2020 (r366850) @@ -19,7 +19,4 @@ LDFLAGS+= -L${LIBGMOCKDIR} SRCS+= gmock_main.cc -HAS_TESTS= -SUBDIR.${MK_TESTS}+= tests - .include Modified: head/lib/googletest/gtest/Makefile ============================================================================== --- head/lib/googletest/gtest/Makefile Mon Oct 19 19:23:22 2020 (r366849) +++ head/lib/googletest/gtest/Makefile Mon Oct 19 19:50:57 2020 (r366850) @@ -47,7 +47,4 @@ SRCS+= gtest-all.cc LIBADD+= pthread regex -HAS_TESTS= -SUBDIR.${MK_TESTS}+= tests - .include Modified: head/lib/googletest/gtest_main/Makefile ============================================================================== --- head/lib/googletest/gtest_main/Makefile Mon Oct 19 19:23:22 2020 (r366849) +++ head/lib/googletest/gtest_main/Makefile Mon Oct 19 19:50:57 2020 (r366850) @@ -17,7 +17,4 @@ LDFLAGS+= -L${LIBGTESTDIR} SRCS+= gtest_main.cc -HAS_TESTS= -SUBDIR.${MK_TESTS}+= tests - .include Modified: head/lib/googletest/tests/Makefile ============================================================================== --- head/lib/googletest/tests/Makefile Mon Oct 19 19:23:22 2020 (r366849) +++ head/lib/googletest/tests/Makefile Mon Oct 19 19:50:57 2020 (r366850) @@ -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 Added: head/lib/googletest/tests/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/googletest/tests/Makefile.inc Mon Oct 19 19:50:57 2020 (r366850) @@ -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} Copied and modified: head/lib/googletest/tests/gmock/Makefile (from r366849, head/lib/googletest/gmock/tests/Makefile) ============================================================================== Copied and modified: head/lib/googletest/tests/gmock_main/Makefile (from r366849, head/lib/googletest/gmock_main/tests/Makefile) ============================================================================== Copied and modified: head/lib/googletest/tests/gtest/Makefile (from r366849, head/lib/googletest/gtest/tests/Makefile) ============================================================================== Copied and modified: head/lib/googletest/tests/gtest_main/Makefile (from r366849, head/lib/googletest/gtest_main/tests/Makefile) ==============================================================================