Skip to content

Commit

Permalink
Bug 888643 - Part b: Move CPP_UNIT_TESTS definitions into moz.build f…
Browse files Browse the repository at this point in the history
…iles; r=gps
  • Loading branch information
Ms2ger committed Jul 24, 2013
1 parent d90ce88 commit 1ebdbed
Show file tree
Hide file tree
Showing 32 changed files with 176 additions and 181 deletions.
8 changes: 0 additions & 8 deletions content/base/test/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ relativesrcdir = @relativesrcdir@

include $(DEPTH)/config/autoconf.mk

CPP_UNIT_TESTS = \
TestNativeXMLHttpRequest.cpp \
TestGetURL.cpp \
TestPlainTextSerializer.cpp \
$(NULL)

# Split files arbitrarily in three groups to not run into too-long command lines
# which break on Windows (see bug 563151 and bug 831989)
MOCHITEST_FILES_A = \
responseIdentical.sjs \
test_bug5141.html \
Expand Down
7 changes: 7 additions & 0 deletions content/base/test/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@ XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
# FIXME/bug 575918: out-of-process xpcshell is broken on OS X
if CONFIG['OS_ARCH'] != 'Darwin':
XPCSHELL_TESTS_MANIFESTS += ['unit_ipc/xpcshell.ini']

CPP_UNIT_TESTS += [
'TestGetURL.cpp',
'TestNativeXMLHttpRequest.cpp',
'TestPlainTextSerializer.cpp',
]

4 changes: 0 additions & 4 deletions content/canvas/compiledtest/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,4 @@ LOCAL_INCLUDES := \
-I$(srcdir)/../src \
$(NULL)

CPP_UNIT_TESTS := \
TestWebGLElementArrayCache.cpp \
$(NULL)

include $(topsrcdir)/config/rules.mk
4 changes: 4 additions & 0 deletions content/canvas/compiledtest/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
# 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/.

CPP_UNIT_TESTS += [
'TestWebGLElementArrayCache.cpp',
]

4 changes: 0 additions & 4 deletions content/media/webaudio/compiledtest/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,4 @@ FAIL_ON_WARNINGS = 1

LOCAL_INCLUDES := -I$(srcdir)/..

CPP_UNIT_TESTS := \
TestAudioEventTimeline.cpp \
$(NULL)

include $(topsrcdir)/config/rules.mk
4 changes: 4 additions & 0 deletions content/media/webaudio/compiledtest/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
# 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/.

CPP_UNIT_TESTS += [
'TestAudioEventTimeline.cpp',
]

4 changes: 0 additions & 4 deletions dom/audiochannel/tests/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,5 @@ include $(DEPTH)/config/autoconf.mk

FAIL_ON_WARNINGS = 1

CPP_UNIT_TESTS = \
TestAudioChannelService.cpp \
$(NULL)

include $(topsrcdir)/config/rules.mk

4 changes: 4 additions & 0 deletions dom/audiochannel/tests/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@

MODULE = 'dom'

CPP_UNIT_TESTS += [
'TestAudioChannelService.cpp',
]

2 changes: 0 additions & 2 deletions editor/txmgr/tests/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ FAIL_ON_WARNINGS = 1
include $(DEPTH)/config/autoconf.mk


CPP_UNIT_TESTS = TestTXMgr.cpp

include $(topsrcdir)/config/rules.mk
4 changes: 4 additions & 0 deletions editor/txmgr/tests/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
# 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/.

CPP_UNIT_TESTS += [
'TestTXMgr.cpp',
]

2 changes: 0 additions & 2 deletions intl/lwbrk/tests/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ VPATH = @srcdir@

include $(DEPTH)/config/autoconf.mk

CPP_UNIT_TESTS = TestLineBreak.cpp

include $(topsrcdir)/config/rules.mk

LOCAL_INCLUDES = -I$(srcdir)/../public
4 changes: 4 additions & 0 deletions intl/lwbrk/tests/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
# 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/.

CPP_UNIT_TESTS += [
'TestLineBreak.cpp',
]

18 changes: 0 additions & 18 deletions media/mtransport/test/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -103,22 +103,4 @@ DEFINES += \
$(NULL)
endif

ifneq ($(OS_TARGET),WINNT)
ifneq (gonk,$(MOZ_WIDGET_TOOLKIT))
CPP_UNIT_TESTS = \
ice_unittest.cpp \
nrappkit_unittest.cpp \
sockettransportservice_unittest.cpp \
transport_unittests.cpp \
runnable_utils_unittest.cpp \
turn_unittest.cpp \
TestSyncRunnable.cpp \
$(NULL)
ifdef MOZ_SCTP
CPP_UNIT_TESTS += sctp_unittest.cpp
endif

endif
endif

include $(topsrcdir)/config/rules.mk
15 changes: 15 additions & 0 deletions media/mtransport/test/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,18 @@

MODULE = 'test_mtransport'

if CONFIG['OS_TARGET'] != 'WINNT' and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
CPP_UNIT_TESTS += [
'TestSyncRunnable.cpp',
'ice_unittest.cpp',
'nrappkit_unittest.cpp',
'runnable_utils_unittest.cpp',
'sockettransportservice_unittest.cpp',
'transport_unittests.cpp',
'turn_unittest.cpp',
]

if CONFIG['MOZ_SCTP']:
CPP_UNIT_TESTS += [
'sctp_unittest.cpp',
]
7 changes: 0 additions & 7 deletions media/webrtc/signaling/test/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,6 @@ ifneq (gonk,$(MOZ_WIDGET_TOOLKIT))
ifdef JS_SHARED_LIBRARY
LIBS += $(MOZ_ZLIB_LIBS)
endif

CPP_UNIT_TESTS = \
sdp_unittests.cpp \
signaling_unittests.cpp \
mediapipeline_unittest.cpp \
mediaconduit_unittests.cpp \
$(NULL)
endif
endif

Expand Down
7 changes: 7 additions & 0 deletions media/webrtc/signaling/test/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@

MODULE = 'test_signaling'

if CONFIG['OS_TARGET'] != 'WINNT' and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
CPP_UNIT_TESTS += [
'mediaconduit_unittests.cpp',
'mediapipeline_unittest.cpp',
'sdp_unittests.cpp',
'signaling_unittests.cpp',
]
22 changes: 0 additions & 22 deletions mfbt/tests/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,6 @@ include $(DEPTH)/config/autoconf.mk

STL_FLAGS =

CPP_UNIT_TESTS = \
TestAtomics.cpp \
TestBloomFilter.cpp \
TestCasting.cpp \
TestCeilingFloor.cpp \
TestCheckedInt.cpp \
TestCountZeroes.cpp \
TestEndian.cpp \
TestEnumSet.cpp \
TestFloatingPoint.cpp \
TestSHA1.cpp \
TestTypeTraits.cpp \
TestWeakPtr.cpp \
$(NULL)

# These tests don't work with AddressSanitizer enabled
ifndef MOZ_ASAN
CPP_UNIT_TESTS += \
TestPoisonArea.cpp \
$(NULL)
endif

# in order to prevent rules.mk from trying to link to libraries that are
# not available to MFBT, we have to reset these MOZ_GLUE*_LDFLAGS before including it
# and LIBS_ after including it. For WRAP_LDFLAGS, it shouldn't matter.
Expand Down
19 changes: 19 additions & 0 deletions mfbt/tests/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,22 @@
# 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/.

CPP_UNIT_TESTS += [
'TestAtomics.cpp',
'TestBloomFilter.cpp',
'TestCasting.cpp',
'TestCeilingFloor.cpp',
'TestCheckedInt.cpp',
'TestCountZeroes.cpp',
'TestEndian.cpp',
'TestEnumSet.cpp',
'TestFloatingPoint.cpp',
'TestSHA1.cpp',
'TestTypeTraits.cpp',
'TestWeakPtr.cpp',
]

if not CONFIG['MOZ_ASAN']:
CPP_UNIT_TESTS += [
'TestPoisonArea.cpp',
]
5 changes: 0 additions & 5 deletions netwerk/test/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ DISABLED_SIMPLE_PROGRAMS := $(cppsrcs:.cpp=$(BIN_SUFFIX))
# TestUDPSocketProvider$(BIN_SUFFIX) \
# $(NULL)

CPP_UNIT_TESTS = \
TestSTSParser.cpp \
TestUDPServerSocket.cpp \
$(NULL)

include $(topsrcdir)/config/config.mk

LIBS = $(XPCOM_LIBS) \
Expand Down
6 changes: 6 additions & 0 deletions netwerk/test/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ bin_suffix = CONFIG['BIN_SUFFIX']
SIMPLE_PROGRAMS += [
"%s%s" % (x[0:-4], bin_suffix) for x in CPP_SOURCES
]

CPP_UNIT_TESTS += [
'TestSTSParser.cpp',
'TestUDPServerSocket.cpp',
]

2 changes: 0 additions & 2 deletions startupcache/test/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ VPATH = @srcdir@

include $(DEPTH)/config/autoconf.mk

CPP_UNIT_TESTS = TestStartupCache.cpp

LIBS += $(MOZ_COMPONENT_LIBS)

include $(topsrcdir)/config/rules.mk
4 changes: 4 additions & 0 deletions startupcache/test/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@

MODULE = 'test_startupcache'

CPP_UNIT_TESTS += [
'TestStartupCache.cpp',
]

26 changes: 0 additions & 26 deletions storage/test/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,6 @@ relativesrcdir = @relativesrcdir@

include $(DEPTH)/config/autoconf.mk

CPP_UNIT_TESTS = \
test_transaction_helper.cpp \
test_statement_scoper.cpp \
test_mutex.cpp \
test_binding_params.cpp \
test_true_async.cpp \
test_unlock_notify.cpp \
test_service_init_background_thread.cpp \
test_AsXXX_helpers.cpp \
test_StatementCache.cpp \
test_async_callbacks_with_spun_event_loops.cpp \
test_file_perms.cpp \
test_asyncStatementExecution_transaction.cpp \
$(NULL)

ifdef MOZ_DEBUG
# FIXME bug 523392: test_deadlock_detector doesn't like Windows
# FIXME bug 523378: also fails on OS X
ifneq (,$(filter-out WINNT Darwin,$(OS_ARCH)))
CPP_UNIT_TESTS += \
test_deadlock_detector.cpp \
$(NULL)
endif
endif


LOCAL_INCLUDES = \
-I$(srcdir)/../src \
$(NULL)
Expand Down
22 changes: 22 additions & 0 deletions storage/test/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,25 @@
MODULE = 'test_storage'

XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']

CPP_UNIT_TESTS += [
'test_AsXXX_helpers.cpp',
'test_StatementCache.cpp',
'test_asyncStatementExecution_transaction.cpp',
'test_async_callbacks_with_spun_event_loops.cpp',
'test_binding_params.cpp',
'test_file_perms.cpp',
'test_mutex.cpp',
'test_service_init_background_thread.cpp',
'test_statement_scoper.cpp',
'test_transaction_helper.cpp',
'test_true_async.cpp',
'test_unlock_notify.cpp',
]

if CONFIG['MOZ_DEBUG'] and CONFIG['OS_ARCH'] not in ('WINNT', 'Darwin'):
# FIXME bug 523392: test_deadlock_detector doesn't like Windows
# FIXME bug 523378: also fails on OS X
CPP_UNIT_TESTS += [
'test_deadlock_detector.cpp',
]
4 changes: 0 additions & 4 deletions toolkit/components/places/tests/cpp/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,4 @@ FAIL_ON_WARNINGS = 1

include $(DEPTH)/config/autoconf.mk

CPP_UNIT_TESTS = \
test_IHistory.cpp \
$(NULL)

include $(topsrcdir)/config/rules.mk
4 changes: 4 additions & 0 deletions toolkit/components/places/tests/cpp/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@

MODULE = 'test_places'

CPP_UNIT_TESTS += [
'test_IHistory.cpp',
]

2 changes: 0 additions & 2 deletions widget/tests/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ endif
# $(NULL)
endif

CPP_UNIT_TESTS += TestAppShellSteadyState.cpp

MOCHITEST_CHROME_FILES = test_bug343416.xul \
test_bug429954.xul \
window_bug429954.xul \
Expand Down
5 changes: 5 additions & 0 deletions widget/tests/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@
MODULE = 'test_widget'

XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']

CPP_UNIT_TESTS += [
'TestAppShellSteadyState.cpp',
]

Loading

0 comments on commit 1ebdbed

Please sign in to comment.