Bug 1883861 - Part 1: Move visitMemoryBarrier into the common CodeGenerator file...
[gecko.git] / xpcom / tests / gtest / moz.build
blob0b1d5befbca8651379dfc5d8b8575624c5d3f1f3
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 UNIFIED_SOURCES += [
8     "Helpers.cpp",
9     "TestArenaAllocator.cpp",
10     "TestArrayAlgorithm.cpp",
11     "TestAtoms.cpp",
12     "TestAutoRefCnt.cpp",
13     "TestBase64.cpp",
14     "TestCallTemplates.cpp",
15     "TestCloneInputStream.cpp",
16     "TestCOMPtrEq.cpp",
17     "TestCRT.cpp",
18     "TestDafsa.cpp",
19     "TestDelayedRunnable.cpp",
20     "TestEncoding.cpp",
21     "TestEscape.cpp",
22     "TestEventPriorities.cpp",
23     "TestEventTargetQI.cpp",
24     "TestFile.cpp",
25     "TestGCPostBarriers.cpp",
26     "TestID.cpp",
27     "TestIDUtils.cpp",
28     "TestInputStreamLengthHelper.cpp",
29     "TestJSHolderMap.cpp",
30     "TestLogCommandLineHandler.cpp",
31     "TestLogging.cpp",
32     "TestMemoryPressure.cpp",
33     "TestMoveString.cpp",
34     "TestMozPromise.cpp",
35     "TestMruCache.cpp",
36     "TestMultiplexInputStream.cpp",
37     "TestNonBlockingAsyncInputStream.cpp",
38     "TestNsDeque.cpp",
39     "TestNSPRLogModulesParser.cpp",
40     "TestObserverArray.cpp",
41     "TestObserverService.cpp",
42     "TestOwningNonNull.cpp",
43     "TestPLDHash.cpp",
44     "TestPriorityQueue.cpp",
45     "TestQueue.cpp",
46     "TestRacingServiceManager.cpp",
47     "TestRecursiveMutex.cpp",
48     "TestRustRegex.cpp",
49     "TestRWLock.cpp",
50     "TestSegmentedBuffer.cpp",
51     "TestSlicedInputStream.cpp",
52     "TestSmallArrayLRUCache.cpp",
53     "TestSnappyStreams.cpp",
54     "TestStateMirroring.cpp",
55     "TestStateWatching.cpp",
56     "TestStorageStream.cpp",
57     "TestStrings.cpp",
58     "TestStringStream.cpp",
59     "TestSubstringTuple.cpp",
60     "TestSynchronization.cpp",
61     "TestTArray.cpp",
62     "TestTArray2.cpp",
63     "TestTaskQueue.cpp",
64     "TestTextFormatter.cpp",
65     "TestThreadManager.cpp",
66     "TestThreadPool.cpp",
67     "TestThreadPoolListener.cpp",
68     "TestThrottledEventQueue.cpp",
69     "TestTimeStamp.cpp",
70     "TestTokenizer.cpp",
71     "TestUTF.cpp",
72     "TestVariant.cpp",
75 if CONFIG["OS_TARGET"] != "Android":
76     UNIFIED_SOURCES += [
77         "TestPipes.cpp",
78         "TestThreads.cpp",
79     ]
81 # skip the test on windows10-aarch64 due to perma-fail, bug 1422219
82 if not (CONFIG["OS_TARGET"] == "WINNT" and CONFIG["TARGET_CPU"] == "aarch64"):
83     UNIFIED_SOURCES += ["TestThreadUtils.cpp"]
85 # skip the test on OSX due to frequent failures (bug 1571186)
86 if CONFIG["OS_TARGET"] != "Darwin":
87     UNIFIED_SOURCES += ["TestExpirationTracker.cpp"]
89 # skip the test on windows10-aarch64 and Android, aarch64 due to bug 1545670
90 if CONFIG["OS_TARGET"] != "Android" and not (
91     CONFIG["OS_TARGET"] == "WINNT" and CONFIG["TARGET_CPU"] == "aarch64"
93     UNIFIED_SOURCES += ["TestTimers.cpp"]
96 if (
97     CONFIG["MOZ_DEBUG"]
98     and CONFIG["OS_ARCH"] not in ("WINNT")
99     and CONFIG["OS_TARGET"] != "Android"
101     # FIXME bug 523392: TestDeadlockDetector doesn't like Windows
102     # Bug 1054249: Doesn't work on Android
103     UNIFIED_SOURCES += [
104         "TestDeadlockDetector.cpp",
105         "TestDeadlockDetectorScalability.cpp",
106     ]
108 if CONFIG["OS_TARGET"] == "WINNT":
109     UNIFIED_SOURCES += [
110         "TestAvailableMemoryWatcherWin.cpp",
111         "TestFileNTFSSpecialPaths.cpp",
112         "TestFilePreferencesWin.cpp",
113         "TestHandleWatcher.cpp",
114     ]
115 else:
116     UNIFIED_SOURCES += [
117         "TestFilePreferencesUnix.cpp",
118     ]
120 if CONFIG["OS_TARGET"] == "Darwin":
121     UNIFIED_SOURCES += [
122         "TestAvailableMemoryWatcherMac.cpp",
123         "TestThreads_mac.mm",
124     ]
126 if CONFIG["TARGET_OS"] == "OSX":
127     UNIFIED_SOURCES += [
128         "TestMacNSURLEscaping.mm",
129     ]
131 if CONFIG["OS_TARGET"] == "Linux":
132     UNIFIED_SOURCES += [
133         "TestAvailableMemoryWatcherLinux.cpp",
134     ]
136 if (
137     CONFIG["WRAP_STL_INCLUDES"]
138     and CONFIG["CC_TYPE"] != "clang-cl"
139     and CONFIG["OS_TARGET"] != "Android"
141     UNIFIED_SOURCES += [
142         "TestSTLWrappers.cpp",
143     ]
145 # Compile TestAllocReplacement separately so Windows headers don't pollute
146 # the global namespace for other files.
147 if CONFIG["MOZ_MEMORY"]:
148     SOURCES += [
149         "TestAllocReplacement.cpp",
150     ]
152 SOURCES += [
153     "TestCOMArray.cpp",
154     "TestCOMPtr.cpp",  # Redefines IFoo and IBar
155     "TestHashtables.cpp",  # Redefines IFoo
156     "TestNsRefPtr.cpp",  # Redefines Foo
159 LOCAL_INCLUDES += [
160     "../../base",
161     "/toolkit/components/telemetry/tests/gtest",
162     "/xpcom/components",
165 GeneratedFile(
166     "dafsa_test_1.inc",
167     script="../../ds/tools/make_dafsa.py",
168     inputs=["dafsa_test_1.dat"],
171 TEST_HARNESS_FILES.gtest += [
172     "wikipedia/ar.txt",
173     "wikipedia/de-edit.txt",
174     "wikipedia/de.txt",
175     "wikipedia/ja.txt",
176     "wikipedia/ko.txt",
177     "wikipedia/ru.txt",
178     "wikipedia/th.txt",
179     "wikipedia/tr.txt",
180     "wikipedia/vi.txt",
183 FINAL_LIBRARY = "xul-gtest"
185 include("/ipc/chromium/chromium-config.mozbuild")