Skip to content

Commit

Permalink
Bug 1242565 - follow up to reuse gtests.o, r=mt
Browse files Browse the repository at this point in the history
  • Loading branch information
franziskuskiefer committed May 18, 2016
1 parent eae9875 commit ebf8ee3
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 12 deletions.
1 change: 0 additions & 1 deletion .hgignore
Expand Up @@ -3,4 +3,3 @@ syntax: glob
*OPT.OBJ/*
*DBG.OBJ/*
*DBG.OBJD/*
*.o
41 changes: 41 additions & 0 deletions external_tests/common/Makefile
@@ -0,0 +1,41 @@
#! gmake
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

#######################################################################
# (1) Include initial platform-independent assignments (MANDATORY). #
#######################################################################

include manifest.mn

#######################################################################
# (2) Include "global" configuration information. (OPTIONAL) #
#######################################################################

include $(CORE_DEPTH)/coreconf/config.mk

#######################################################################
# (3) Include "component" configuration information. (OPTIONAL) #
#######################################################################

#######################################################################
# (4) Include "local" platform-dependent assignments (OPTIONAL). #
#######################################################################

include gtest.mk

#######################################################################
# (5) Execute "global" rules. (OPTIONAL) #
#######################################################################

include $(CORE_DEPTH)/coreconf/rules.mk

#######################################################################
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################

#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################
21 changes: 21 additions & 0 deletions external_tests/common/manifest.mn
@@ -0,0 +1,21 @@
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
CORE_DEPTH = ../..
DEPTH = ../..
MODULE = nss

CPPSRCS = \
gtests.cc \
$(NULL)

INCLUDES += -I$(CORE_DEPTH)/external_tests/google_test/gtest/include \
-I$(CORE_DEPTH)/external_tests/common

REQUIRES = gtest

EXTRA_LIBS = $(DIST)/lib/$(LIB_PREFIX)gtest.$(LIB_SUFFIX)

# NOTE: this is not actually used but required to build gtests.o
PROGRAM = gtests
2 changes: 0 additions & 2 deletions external_tests/der_gtest/Makefile
Expand Up @@ -41,5 +41,3 @@ include $(CORE_DEPTH)/coreconf/rules.mk
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################

ALL_TRASH += common
5 changes: 3 additions & 2 deletions external_tests/der_gtest/manifest.mn
Expand Up @@ -8,7 +8,6 @@ MODULE = nss

CPPSRCS = \
der_getint_unittest.cc \
../common/gtests.cc \
$(NULL)

INCLUDES += -I$(CORE_DEPTH)/external_tests/google_test/gtest/include \
Expand All @@ -17,4 +16,6 @@ INCLUDES += -I$(CORE_DEPTH)/external_tests/google_test/gtest/include \
REQUIRES = nspr nss libdbm gtest

PROGRAM = der_gtest
EXTRA_LIBS = $(DIST)/lib/$(LIB_PREFIX)gtest.$(LIB_SUFFIX)

EXTRA_LIBS = $(DIST)/lib/$(LIB_PREFIX)gtest.$(LIB_SUFFIX) $(EXTRA_OBJS) \
../common/$(OBJDIR)/gtests$(OBJ_SUFFIX)
1 change: 1 addition & 0 deletions external_tests/manifest.mn
Expand Up @@ -7,6 +7,7 @@ DEPTH = ..

DIRS = \
google_test \
common \
der_gtest \
util_gtest \
pk11_gtest \
Expand Down
2 changes: 0 additions & 2 deletions external_tests/pk11_gtest/Makefile
Expand Up @@ -41,5 +41,3 @@ include $(CORE_DEPTH)/coreconf/rules.mk
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################

ALL_TRASH += common
6 changes: 4 additions & 2 deletions external_tests/pk11_gtest/manifest.mn
Expand Up @@ -11,7 +11,6 @@ CPPSRCS = \
pk11_pbkdf2_unittest.cc \
pk11_prf_unittest.cc \
pk11_rsapss_unittest.cc \
../common/gtests.cc \
$(NULL)

INCLUDES += -I$(CORE_DEPTH)/external_tests/google_test/gtest/include \
Expand All @@ -20,4 +19,7 @@ INCLUDES += -I$(CORE_DEPTH)/external_tests/google_test/gtest/include \
REQUIRES = nspr nss libdbm gtest

PROGRAM = pk11_gtest
EXTRA_LIBS = $(DIST)/lib/$(LIB_PREFIX)gtest.$(LIB_SUFFIX)

EXTRA_LIBS = $(DIST)/lib/$(LIB_PREFIX)gtest.$(LIB_SUFFIX) $(EXTRA_OBJS) \
../common/$(OBJDIR)/gtests$(OBJ_SUFFIX)

2 changes: 0 additions & 2 deletions external_tests/util_gtest/Makefile
Expand Up @@ -43,5 +43,3 @@ include $(CORE_DEPTH)/coreconf/rules.mk
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################

ALL_TRASH += common
3 changes: 2 additions & 1 deletion external_tests/util_gtest/manifest.mn
Expand Up @@ -7,7 +7,6 @@ DEPTH = ../..
MODULE = nss

CPPSRCS = \
../common/gtests.cc \
util_utf8_unittest.cc \
$(NULL)

Expand All @@ -19,7 +18,9 @@ INCLUDES += \
REQUIRES = nspr gtest

PROGRAM = util_gtest

EXTRA_LIBS = \
$(DIST)/lib/$(LIB_PREFIX)gtest.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)nssutil.$(LIB_SUFFIX) \
../common/$(OBJDIR)/gtests$(OBJ_SUFFIX) \
$(NULL)

0 comments on commit ebf8ee3

Please sign in to comment.