summaryrefslogtreecommitdiffstats
path: root/xpcom/tests/gtest/moz.build
blob: 57ec43a371b8e401cafe16dcaf375ab7787d6033 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# -*- Mode: python; 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/.

UNIFIED_SOURCES += [
    "Helpers.cpp",
    "TestArenaAllocator.cpp",
    "TestArrayAlgorithm.cpp",
    "TestAtoms.cpp",
    "TestAutoRefCnt.cpp",
    "TestBase64.cpp",
    "TestCallTemplates.cpp",
    "TestCloneInputStream.cpp",
    "TestCOMPtrEq.cpp",
    "TestCRT.cpp",
    "TestDafsa.cpp",
    "TestDelayedRunnable.cpp",
    "TestEncoding.cpp",
    "TestEscape.cpp",
    "TestEventPriorities.cpp",
    "TestEventTargetQI.cpp",
    "TestFile.cpp",
    "TestGCPostBarriers.cpp",
    "TestID.cpp",
    "TestIDUtils.cpp",
    "TestInputStreamLengthHelper.cpp",
    "TestJSHolderMap.cpp",
    "TestLogCommandLineHandler.cpp",
    "TestLogging.cpp",
    "TestMemoryPressure.cpp",
    "TestMoveString.cpp",
    "TestMozPromise.cpp",
    "TestMruCache.cpp",
    "TestMultiplexInputStream.cpp",
    "TestNonBlockingAsyncInputStream.cpp",
    "TestNsDeque.cpp",
    "TestNSPRLogModulesParser.cpp",
    "TestObserverArray.cpp",
    "TestObserverService.cpp",
    "TestOwningNonNull.cpp",
    "TestPLDHash.cpp",
    "TestPriorityQueue.cpp",
    "TestQueue.cpp",
    "TestRacingServiceManager.cpp",
    "TestRecursiveMutex.cpp",
    "TestRustRegex.cpp",
    "TestRWLock.cpp",
    "TestSegmentedBuffer.cpp",
    "TestSlicedInputStream.cpp",
    "TestSmallArrayLRUCache.cpp",
    "TestSnappyStreams.cpp",
    "TestStateMirroring.cpp",
    "TestStateWatching.cpp",
    "TestStorageStream.cpp",
    "TestStrings.cpp",
    "TestStringStream.cpp",
    "TestSubstringTuple.cpp",
    "TestSynchronization.cpp",
    "TestTArray.cpp",
    "TestTArray2.cpp",
    "TestTaskQueue.cpp",
    "TestTextFormatter.cpp",
    "TestThreadManager.cpp",
    "TestThreadPool.cpp",
    "TestThreadPoolListener.cpp",
    "TestThrottledEventQueue.cpp",
    "TestTimeStamp.cpp",
    "TestTokenizer.cpp",
    "TestUTF.cpp",
    "TestVariant.cpp",
]

if CONFIG["OS_TARGET"] != "Android":
    UNIFIED_SOURCES += [
        "TestPipes.cpp",
        "TestThreads.cpp",
    ]

# skip the test on windows10-aarch64 due to perma-fail, bug 1422219
if not (CONFIG["OS_TARGET"] == "WINNT" and CONFIG["TARGET_CPU"] == "aarch64"):
    UNIFIED_SOURCES += ["TestThreadUtils.cpp"]

# skip the test on OSX due to frequent failures (bug 1571186)
if CONFIG["OS_TARGET"] != "Darwin":
    UNIFIED_SOURCES += ["TestExpirationTracker.cpp"]

# skip the test on windows10-aarch64 and Android, aarch64 due to bug 1545670
if CONFIG["OS_TARGET"] != "Android" and not (
    CONFIG["OS_TARGET"] == "WINNT" and CONFIG["TARGET_CPU"] == "aarch64"
):
    UNIFIED_SOURCES += ["TestTimers.cpp"]


if (
    CONFIG["MOZ_DEBUG"]
    and CONFIG["OS_ARCH"] not in ("WINNT")
    and CONFIG["OS_TARGET"] != "Android"
):
    # FIXME bug 523392: TestDeadlockDetector doesn't like Windows
    # Bug 1054249: Doesn't work on Android
    UNIFIED_SOURCES += [
        "TestDeadlockDetector.cpp",
        "TestDeadlockDetectorScalability.cpp",
    ]

if CONFIG["OS_TARGET"] == "WINNT":
    UNIFIED_SOURCES += [
        "TestAvailableMemoryWatcherWin.cpp",
        "TestFileNTFSSpecialPaths.cpp",
        "TestFilePreferencesWin.cpp",
        "TestHandleWatcher.cpp",
    ]
else:
    UNIFIED_SOURCES += [
        "TestFilePreferencesUnix.cpp",
    ]

if CONFIG["OS_TARGET"] == "Darwin":
    UNIFIED_SOURCES += [
        "TestAvailableMemoryWatcherMac.cpp",
        "TestMacNSURLEscaping.mm",
        "TestThreads_mac.mm",
    ]

if CONFIG["OS_TARGET"] == "Linux":
    UNIFIED_SOURCES += [
        "TestAvailableMemoryWatcherLinux.cpp",
    ]

if (
    CONFIG["WRAP_STL_INCLUDES"]
    and CONFIG["CC_TYPE"] != "clang-cl"
    and CONFIG["OS_TARGET"] != "Android"
):
    UNIFIED_SOURCES += [
        "TestSTLWrappers.cpp",
    ]

# Compile TestAllocReplacement separately so Windows headers don't pollute
# the global namespace for other files.
if CONFIG["MOZ_MEMORY"]:
    SOURCES += [
        "TestAllocReplacement.cpp",
    ]

SOURCES += [
    "TestCOMArray.cpp",
    "TestCOMPtr.cpp",  # Redefines IFoo and IBar
    "TestHashtables.cpp",  # Redefines IFoo
    "TestNsRefPtr.cpp",  # Redefines Foo
]

LOCAL_INCLUDES += [
    "../../base",
    "/toolkit/components/telemetry/tests/gtest",
    "/xpcom/components",
]

GeneratedFile(
    "dafsa_test_1.inc",
    script="../../ds/tools/make_dafsa.py",
    inputs=["dafsa_test_1.dat"],
)

TEST_HARNESS_FILES.gtest += [
    "wikipedia/ar.txt",
    "wikipedia/de-edit.txt",
    "wikipedia/de.txt",
    "wikipedia/ja.txt",
    "wikipedia/ko.txt",
    "wikipedia/ru.txt",
    "wikipedia/th.txt",
    "wikipedia/tr.txt",
    "wikipedia/vi.txt",
]

FINAL_LIBRARY = "xul-gtest"

include("/ipc/chromium/chromium-config.mozbuild")