Bug 940407 - Kill GTEST_SOURCES. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 26 Nov 2013 11:48:58 +0900
changeset 172083 07884241d31fd64b9a702afbbb35680146f7255f
parent 172082 87948e6a1f9927201c397a2c6324bc9aa5404e8d
child 172084 89efaa476d141a5d8a2f76fb48734554429239f7
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs940407
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 940407 - Kill GTEST_SOURCES. r=gps
config/rules.mk
configure.in
gfx/tests/gtest/moz.build
js/src/config/rules.mk
python/mozbuild/mozbuild/frontend/emitter.py
python/mozbuild/mozbuild/frontend/sandbox_symbols.py
python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build
python/mozbuild/mozbuild/test/backend/test_recursivemake.py
python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build
python/mozbuild/mozbuild/test/frontend/test_emitter.py
security/manager/ssl/tests/gtest/moz.build
testing/gtest/moz.build
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -102,30 +102,16 @@ ifdef ENABLE_TESTS
 # that changes to tests may not be updated and code could assume to pass
 # locally against non-current test code.
 DIRS += $(TEST_DIRS)
 
 ifndef INCLUDED_TESTS_MOCHITEST_MK #{
   include $(topsrcdir)/config/makefiles/mochitest.mk
 endif #}
 
-ifdef MOZ_ENABLE_GTEST
-ifdef GTEST_CPPSRCS
-CPPSRCS += $(GTEST_CPPSRCS)
-endif
-
-ifdef GTEST_CSRCS
-CSRCS += $(GTEST_CSRCS)
-endif
-
-ifdef GTEST_CMMSRCS
-CMMSRCS += $(GTEST_CMMSRCS)
-endif
-endif
-
 ifdef CPP_UNIT_TESTS
 ifdef COMPILE_ENVIRONMENT
 
 # Compile the tests to $(DIST)/bin.  Make lots of niceties available by default
 # through TestHarness.h, by modifying the list of includes and the libs against
 # which stuff links.
 CPPSRCS += $(CPP_UNIT_TESTS)
 CPP_UNIT_TEST_BINS := $(CPP_UNIT_TESTS:.cpp=$(BIN_SUFFIX))
--- a/configure.in
+++ b/configure.in
@@ -6320,21 +6320,18 @@ dnl ====================================
 dnl build the tests by default
 dnl ========================================================
 MOZ_ARG_DISABLE_BOOL(tests,
 [  --disable-tests         Do not build test libraries & programs],
     ENABLE_TESTS=,
     ENABLE_TESTS=1 )
 
 if test -n "$ENABLE_TESTS"; then
-    MOZ_ENABLE_GTEST=1
     GTEST_HAS_RTTI=0
-    AC_DEFINE(MOZ_ENABLE_GTEST)
     AC_DEFINE_UNQUOTED(GTEST_HAS_RTTI, 0)
-    AC_SUBST(MOZ_ENABLE_GTEST)
     AC_SUBST(GTEST_HAS_RTTI)
     if test -n "$_WIN32_MSVC"; then
           AC_DEFINE_UNQUOTED(_VARIADIC_MAX, 10)
     fi
     if test "${OS_TARGET}" = "Android"; then
         AC_DEFINE(GTEST_OS_LINUX_ANDROID)
         AC_DEFINE(GTEST_USE_OWN_TR1_TUPLE)
         AC_DEFINE_UNQUOTED(GTEST_HAS_CLONE, 0)
--- a/gfx/tests/gtest/moz.build
+++ b/gfx/tests/gtest/moz.build
@@ -1,17 +1,17 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
 LIBRARY_NAME = 'gfxtest'
 
-GTEST_SOURCES += [
+SOURCES += [
     'gfxSurfaceRefCountTest.cpp',
     'gfxWordCacheTest.cpp',
     'TestAsyncPanZoomController.cpp',
     'TestBufferRotation.cpp',
     'TestColorNames.cpp',
     'TestLayers.cpp',
     'TestRegion.cpp',
     # Hangs on linux in ApplyGdkScreenFontOptions
@@ -20,23 +20,23 @@ GTEST_SOURCES += [
     # Test works but it doesn't assert anything
     #'gfxTextRunPerfTest.cpp',
     'TestTiledLayerBuffer.cpp',
 ]
 
 # Because of gkmedia on windows we wont find these
 # symbols in xul.dll.
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'windows':
-    GTEST_SOURCES += [ '%s/gfx/2d/unittest/%s' % (TOPSRCDIR, p) for p in [
+    SOURCES += [ '%s/gfx/2d/unittest/%s' % (TOPSRCDIR, p) for p in [
         'TestBase.cpp',
         'TestBugs.cpp',
         'TestPoint.cpp',
         'TestScaling.cpp',
     ]]
-    GTEST_SOURCES += [
+    SOURCES += [
         'TestMoz2D.cpp',
         'TestRect.cpp',
     ]
 
 LIBXUL_LIBRARY = True
 
 EXPORT_LIBRARY = True
 
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -102,30 +102,16 @@ ifdef ENABLE_TESTS
 # that changes to tests may not be updated and code could assume to pass
 # locally against non-current test code.
 DIRS += $(TEST_DIRS)
 
 ifndef INCLUDED_TESTS_MOCHITEST_MK #{
   include $(topsrcdir)/config/makefiles/mochitest.mk
 endif #}
 
-ifdef MOZ_ENABLE_GTEST
-ifdef GTEST_CPPSRCS
-CPPSRCS += $(GTEST_CPPSRCS)
-endif
-
-ifdef GTEST_CSRCS
-CSRCS += $(GTEST_CSRCS)
-endif
-
-ifdef GTEST_CMMSRCS
-CMMSRCS += $(GTEST_CMMSRCS)
-endif
-endif
-
 ifdef CPP_UNIT_TESTS
 ifdef COMPILE_ENVIRONMENT
 
 # Compile the tests to $(DIST)/bin.  Make lots of niceties available by default
 # through TestHarness.h, by modifying the list of includes and the libs against
 # which stuff links.
 CPPSRCS += $(CPP_UNIT_TESTS)
 CPP_UNIT_TEST_BINS := $(CPP_UNIT_TESTS:.cpp=$(BIN_SUFFIX))
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -169,17 +169,17 @@ class TreeMetadataEmitter(LoggingMixin):
             self.log(logging.WARN, 'mozbuild_warning', dict(
                 path=sandbox.main_path),
                 '{path}: NO_DIST_INSTALL has no effect on XPIDL_SOURCES.')
 
         for idl in sandbox['XPIDL_SOURCES']:
             yield XPIDLFile(sandbox, mozpath.join(sandbox['SRCDIR'], idl),
                 xpidl_module)
 
-        for symbol in ('SOURCES', 'GTEST_SOURCES', 'HOST_SOURCES', 'UNIFIED_SOURCES'):
+        for symbol in ('SOURCES', 'HOST_SOURCES', 'UNIFIED_SOURCES'):
             for src in (sandbox[symbol] or []):
                 if not os.path.exists(os.path.join(sandbox['SRCDIR'], src)):
                     raise SandboxValidationError('Reference to a file that '
                         'doesn\'t exist in %s (%s) in %s'
                         % (symbol, src, sandbox['RELATIVEDIR']))
 
         if sandbox.get('LIBXUL_LIBRARY') and sandbox.get('FORCE_STATIC_LIB'):
             raise SandboxValidationError('LIBXUL_LIBRARY implies FORCE_STATIC_LIB')
@@ -233,22 +233,16 @@ class TreeMetadataEmitter(LoggingMixin):
                 '.S': 'SSRCS',
             },
             HOST_SOURCES={
                 '.c': 'HOST_CSRCS',
                 '.mm': 'HOST_CMMSRCS',
                 '.cc': 'HOST_CPPSRCS',
                 '.cpp': 'HOST_CPPSRCS',
             },
-            GTEST_SOURCES={
-                '.c': 'GTEST_CSRCS',
-                '.mm': 'GTEST_CMMSRCS',
-                '.cc': 'GTEST_CPPSRCS',
-                '.cpp': 'GTEST_CPPSRCS',
-            },
             UNIFIED_SOURCES={
                 '.c': 'UNIFIED_CSRCS',
                 '.mm': 'UNIFIED_CMMSRCS',
                 '.cc': 'UNIFIED_CPPSRCS',
                 '.cpp': 'UNIFIED_CPPSRCS',
             }
         )
         varmap.update(dict(('GENERATED_%s' % k, v) for k, v in varmap.items()
--- a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py
+++ b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py
@@ -219,23 +219,16 @@ VARIABLES = {
         """Whether the library in this directory is a static library.
         """, None),
 
     'GENERATED_INCLUDES' : (StrictOrderingOnAppendList, list, [],
         """Directories generated by the build system to be searched for include
         files by the compiler.
         """, None),
 
-    'GTEST_SOURCES': (StrictOrderingOnAppendList, list, [],
-        """Source code files for GTest unit tests.
-
-        This variable contains a list of GTEST unit test source files to
-        compile.
-        """, 'compile'),
-
     'HOST_SOURCES': (StrictOrderingOnAppendList, list, [],
         """Source code files to compile with the host compiler.
 
         This variable contains a list of source code files to compile.
         with the host compiler.
         """, 'compile'),
 
     'IS_COMPONENT': (bool, bool, False,
--- a/python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build
+++ b/python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build
@@ -7,20 +7,16 @@ SOURCES += ['bar.s', 'foo.asm']
 EXTRA_COMPONENTS = ['bar.js', 'foo.js']
 EXTRA_PP_COMPONENTS = ['bar.pp.js', 'foo.pp.js']
 
 EXTRA_JS_MODULES = ['bar.jsm', 'foo.jsm']
 EXTRA_PP_JS_MODULES = ['bar.pp.jsm', 'foo.pp.jsm']
 
 CPP_UNIT_TESTS = ['foo.cpp']
 
-GTEST_SOURCES += ['test1.c', 'test2.c']
-GTEST_SOURCES += ['test1.mm', 'test2.mm']
-GTEST_SOURCES += ['test1.cpp', 'test2.cpp']
-
 HOST_SOURCES += ['bar.cpp', 'foo.cpp']
 HOST_SOURCES += ['bar.c', 'foo.c']
 
 HOST_LIBRARY_NAME = 'host_bar'
 
 LIBS = ['bar.lib', 'foo.lib']
 
 OS_LIBS = ['foo.so', '-l123', 'bar.a']
--- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
+++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
@@ -296,28 +296,16 @@ class TestRecursiveMakeBackend(BackendTe
             ],
             'EXTRA_PP_JS_MODULES': [
                 'EXTRA_PP_JS_MODULES += bar.pp.jsm',
                 'EXTRA_PP_JS_MODULES += foo.pp.jsm',
             ],
             'FAIL_ON_WARNINGS': [
                 'FAIL_ON_WARNINGS := 1',
             ],
-            'GTEST_CMMSRCS': [
-                'GTEST_CMMSRCS += test1.mm',
-                'GTEST_CMMSRCS += test2.mm',
-            ],
-            'GTEST_CPPSRCS': [
-                'GTEST_CPPSRCS += test1.cpp',
-                'GTEST_CPPSRCS += test2.cpp',
-            ],
-            'GTEST_CSRCS': [
-                'GTEST_CSRCS += test1.c',
-                'GTEST_CSRCS += test2.c',
-            ],
             'HOST_CPPSRCS': [
                 'HOST_CPPSRCS += bar.cpp',
                 'HOST_CPPSRCS += foo.cpp',
             ],
             'HOST_CSRCS': [
                 'HOST_CSRCS += bar.c',
                 'HOST_CSRCS += foo.c',
             ],
--- a/python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build
+++ b/python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build
@@ -7,20 +7,16 @@ SOURCES += ['fans.asm', 'tans.s']
 EXTRA_COMPONENTS=['fans.js', 'tans.js']
 EXTRA_PP_COMPONENTS=['fans.pp.js', 'tans.pp.js']
 
 EXTRA_JS_MODULES = ['bar.jsm', 'foo.jsm']
 EXTRA_PP_JS_MODULES = ['bar.pp.jsm', 'foo.pp.jsm']
 
 CPP_UNIT_TESTS = ['foo.cpp']
 
-GTEST_SOURCES += ['test1.c', 'test2.c']
-GTEST_SOURCES += ['test1.mm', 'test2.mm']
-GTEST_SOURCES += ['test1.cpp', 'test2.cpp']
-
 HOST_SOURCES += ['fans.cpp', 'tans.cpp']
 HOST_SOURCES += ['fans.c', 'tans.c']
 
 HOST_LIBRARY_NAME = 'host_fans'
 
 LIBS += ['fans.lib', 'tans.lib']
 
 OS_LIBS += ['foo.so', '-l123', 'aaa.a']
--- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py
+++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py
@@ -143,19 +143,16 @@ class TestEmitterBasic(unittest.TestCase
             CPP_UNIT_TESTS=['foo.cpp'],
             EXPORT_LIBRARY=True,
             EXTRA_COMPONENTS=['fans.js', 'tans.js'],
             EXTRA_PP_COMPONENTS=['fans.pp.js', 'tans.pp.js'],
             EXTRA_JS_MODULES=['bar.jsm', 'foo.jsm'],
             EXTRA_PP_JS_MODULES=['bar.pp.jsm', 'foo.pp.jsm'],
             FAIL_ON_WARNINGS=True,
             FORCE_SHARED_LIB=True,
-            GTEST_CSRCS=['test1.c', 'test2.c'],
-            GTEST_CMMSRCS=['test1.mm', 'test2.mm'],
-            GTEST_CPPSRCS=['test1.cpp', 'test2.cpp'],
             HOST_CPPSRCS=['fans.cpp', 'tans.cpp'],
             HOST_CSRCS=['fans.c', 'tans.c'],
             HOST_LIBRARY_NAME='host_fans',
             IS_COMPONENT=True,
             LIBS=['fans.lib', 'tans.lib'],
             LIBXUL_LIBRARY=True,
             MSVC_ENABLE_PGO=True,
             NO_DIST_INSTALL=True,
--- a/security/manager/ssl/tests/gtest/moz.build
+++ b/security/manager/ssl/tests/gtest/moz.build
@@ -3,13 +3,13 @@
 # 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/.
 
 LIBRARY_NAME = 'ssltest'
 
 LIBXUL_LIBRARY = True
 
-GTEST_SOURCES += [
+SOURCES += [
 	'TLSIntoleranceTest.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
--- a/testing/gtest/moz.build
+++ b/testing/gtest/moz.build
@@ -54,16 +54,16 @@ EXPORTS.gmock.internal += [
 SOURCES += [
     'gmock/src/gmock-all.cc',
     'gtest/src/gtest-all.cc',
     'mozilla/GTestRunner.cpp',
 ]
 
 LIBRARY_NAME = 'gtest'
 
-GTEST_SOURCES += [
+SOURCES += [
     'mozilla/SanityTest.cpp',
 ]
 
 LIBXUL_LIBRARY = True
 
 EXPORT_LIBRARY = True