gecko-dev/xpcom/tests/moz.build

126 lines
2.7 KiB
Python

# -*- 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/.
DIRS += [
'external',
'component',
'bug656331_component',
'component_no_aslr',
]
if CONFIG['OS_ARCH'] == 'WINNT':
DIRS += ['windows']
if CONFIG['DEHYDRA_PATH']:
DIRS += ['static-checker']
EXPORTS.testing += [
'TestHarness.h',
]
sources = [
'TestArguments',
'TestBlockingProcess',
'TestCallTemplates',
'TestINIParser',
'TestPRIntN',
'TestQuickReturn',
'TestRacingServiceManager',
'TestRegistrationOrder',
'TestThreadPoolListener',
'TestTimers',
'TestUnicodeArguments',
'nsIFileEnumerator',
]
if CONFIG['OS_TARGET'] == 'WINNT':
sources += [
'TestBase64',
]
if CONFIG['WRAP_STL_INCLUDES']:
sources += [
'TestSTLWrappers',
]
sources.sort()
CPP_SOURCES += [
'%s.cpp' % s for s in sources
]
bin_suffix = CONFIG['BIN_SUFFIX']
SIMPLE_PROGRAMS += [
'%s%s' % (s, bin_suffix) for s in sources
]
MODULE = 'xpcom'
XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
CPP_UNIT_TESTS += [
'ShowAlignments.cpp',
'TestAutoPtr.cpp',
'TestAutoRef.cpp',
'TestCOMArray.cpp',
'TestCOMPtr.cpp',
'TestCOMPtrEq.cpp',
'TestDeque.cpp',
'TestFile.cpp',
'TestHashtables.cpp',
'TestID.cpp',
'TestObserverArray.cpp',
'TestObserverService.cpp',
'TestPipe.cpp',
'TestRefPtr.cpp',
'TestTArray.cpp',
'TestTextFormatter.cpp',
'TestThreadUtils.cpp'
]
if CONFIG['MOZ_MEMORY']:
CPP_UNIT_TESTS += [
'TestJemalloc.cpp',
]
# XXX Make these tests work in libxul builds.
#CPP_UNIT_TESTS += [
# 'TestArray.cpp',
# 'TestCRT.cpp',
# 'TestEncoding.cpp',
# 'TestExpirationTracker.cpp',
# 'TestPipes.cpp',
# 'TestPriorityQueue.cpp',
# 'TestStorageStream.cpp',
# 'TestStrings.cpp',
# 'TestSynchronization.cpp',
# 'TestTArray.cpp',
# 'TestThreadPool.cpp',
# 'TestThreads.cpp',
# 'TestTimeStamp.cpp',
# 'TestXPIDLString.cpp',
# 'TestUTF.cpp',
# 'TestAtoms.cpp',
#]
# FIXME: bug 577500 TestStaticAtoms fails when run in dist/bin
#CPP_UNIT_TESTS += [
# 'TestStaticAtoms.cpp',
#]
if CONFIG['MOZ_DEBUG'] and CONFIG['OS_ARCH'] not in ('WINNT', 'Darwin'):
# FIXME bug 523392: TestDeadlockDetector doesn't like Windows
# FIXME bug 523378: also fails on OS X
CPP_UNIT_TESTS += [
'TestDeadlockDetector.cpp',
'TestDeadlockDetectorScalability.cpp',
]
if not CONFIG['MOZILLA_INTERNAL_API']:
CPP_UNIT_TESTS += [
'TestStringAPI.cpp',
]