| 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/. |
| 6 |
|
| 7 |
GeckoProgram("jsapi-tests", linkage=None) |
| 8 |
|
| 9 |
include("../js-cxxflags.mozbuild") |
| 10 |
include("../js-standalone.mozbuild") |
| 11 |
|
| 12 |
UNIFIED_SOURCES += [ |
| 13 |
"selfTest.cpp", |
| 14 |
"testAddPropertyPropcache.cpp", |
| 15 |
"testArgumentsObject.cpp", |
| 16 |
"testArrayBuffer.cpp", |
| 17 |
"testArrayBufferOrViewAPI.cpp", |
| 18 |
"testArrayBufferView.cpp", |
| 19 |
"testArrayBufferWithUserOwnedContents.cpp", |
| 20 |
"testAssemblerCodeGen.cpp", |
| 21 |
"testAtomicOperations.cpp", |
| 22 |
"testAtomizeUtf8NonAsciiLatin1CodePoint.cpp", |
| 23 |
"testAtomizeWithoutActiveZone.cpp", |
| 24 |
"testAvlTree.cpp", |
| 25 |
"testBigInt.cpp", |
| 26 |
"testBoundFunction.cpp", |
| 27 |
"testBug604087.cpp", |
| 28 |
"testCallArgs.cpp", |
| 29 |
"testCallNonGenericMethodOnProxy.cpp", |
| 30 |
"testCharacterEncoding.cpp", |
| 31 |
"testChromeBuffer.cpp", |
| 32 |
"testCompileNonSyntactic.cpp", |
| 33 |
"testCompileScript.cpp", |
| 34 |
"testCompileUtf8.cpp", |
| 35 |
"testDateToLocaleString.cpp", |
| 36 |
"testDebugger.cpp", |
| 37 |
"testDeduplication.cpp", |
| 38 |
"testDeepFreeze.cpp", |
| 39 |
"testDefineGetterSetterNonEnumerable.cpp", |
| 40 |
"testDefineProperty.cpp", |
| 41 |
"testDeflateStringToUTF8Buffer.cpp", |
| 42 |
"testDeleteProperty.cpp", |
| 43 |
"testDifferentNewTargetInvokeConstructor.cpp", |
| 44 |
"testDynamicCodeBrandChecks.cpp", |
| 45 |
"testEmptyWindowIsOmitted.cpp", |
| 46 |
"testErrorCopying.cpp", |
| 47 |
"testErrorLineOfContext.cpp", |
| 48 |
"testException.cpp", |
| 49 |
"testExecuteInJSMEnvironment.cpp", |
| 50 |
"testExternalStrings.cpp", |
| 51 |
"testFindSCCs.cpp", |
| 52 |
"testForceLexicalInitialization.cpp", |
| 53 |
"testForOfIterator.cpp", |
| 54 |
"testForwardSetProperty.cpp", |
| 55 |
"testFractionToDouble.cpp", |
| 56 |
"testFreshGlobalEvalRedefinition.cpp", |
| 57 |
"testFrontendCompileStencil.cpp", |
| 58 |
"testFrontendErrors.cpp", |
| 59 |
"testFrontendJSON.cpp", |
| 60 |
"testFunctionBinding.cpp", |
| 61 |
"testFunctionNonSyntactic.cpp", |
| 62 |
"testFunctionProperties.cpp", |
| 63 |
"testGCAllocator.cpp", |
| 64 |
"testGCCellPtr.cpp", |
| 65 |
"testGCChunkPool.cpp", |
| 66 |
"testGCExactRooting.cpp", |
| 67 |
"testGCFinalizeCallback.cpp", |
| 68 |
"testGCGrayMarking.cpp", |
| 69 |
"testGCHeapBarriers.cpp", |
| 70 |
"testGCHooks.cpp", |
| 71 |
"testGCMarking.cpp", |
| 72 |
"testGCOutOfMemory.cpp", |
| 73 |
"testGCStoreBufferRemoval.cpp", |
| 74 |
"testGCUniqueId.cpp", |
| 75 |
"testGCWeakCache.cpp", |
| 76 |
"testGetPropertyDescriptor.cpp", |
| 77 |
"testHashTable.cpp", |
| 78 |
"testIndexToString.cpp", |
| 79 |
"testInformalValueTypeName.cpp", |
| 80 |
"testInt128.cpp", |
| 81 |
"testIntern.cpp", |
| 82 |
"testIntlAvailableLocales.cpp", |
| 83 |
"testIntString.cpp", |
| 84 |
"testIsCompilableUnit.cpp", |
| 85 |
"testIsInsideNursery.cpp", |
| 86 |
"testIsISOStyleDate.cpp", |
| 87 |
"testIteratorObject.cpp", |
| 88 |
"testJSEvaluateScript.cpp", |
| 89 |
"testJSON.cpp", |
| 90 |
"testLargeArrayBuffers.cpp", |
| 91 |
"testLinkedList.cpp", |
| 92 |
"testLookup.cpp", |
| 93 |
"testLooselyEqual.cpp", |
| 94 |
"testMappedArrayBuffer.cpp", |
| 95 |
"testMapSet.cpp", |
| 96 |
"testMemoryAssociation.cpp", |
| 97 |
"testMutedErrors.cpp", |
| 98 |
"testNewObject.cpp", |
| 99 |
"testNewTargetInvokeConstructor.cpp", |
| 100 |
"testNullRoot.cpp", |
| 101 |
"testNumberToString.cpp", |
| 102 |
"testObjectEmulatingUndefined.cpp", |
| 103 |
"testObjectSwap.cpp", |
| 104 |
"testObjectWithStashedPointer.cpp", |
| 105 |
"testOOM.cpp", |
| 106 |
"testParseJSON.cpp", |
| 107 |
"testParserAtom.cpp", |
| 108 |
"testPersistentRooted.cpp", |
| 109 |
"testPreserveJitCode.cpp", |
| 110 |
"testPrintf.cpp", |
| 111 |
"testPrivateGCThingValue.cpp", |
| 112 |
"testProfileStrings.cpp", |
| 113 |
"testPromise.cpp", |
| 114 |
"testPropCache.cpp", |
| 115 |
"testPropertyKey.cpp", |
| 116 |
"testRegExp.cpp", |
| 117 |
"testResolveRecursion.cpp", |
| 118 |
"testResult.cpp", |
| 119 |
"tests.cpp", |
| 120 |
"testSABAccounting.cpp", |
| 121 |
"testSameValue.cpp", |
| 122 |
"testSavedStacks.cpp", |
| 123 |
"testScriptInfo.cpp", |
| 124 |
"testScriptObject.cpp", |
| 125 |
"testScriptSourceCompression.cpp", |
| 126 |
"testSetProperty.cpp", |
| 127 |
"testSetPropertyIgnoringNamedGetter.cpp", |
| 128 |
"testSharedImmutableStringsCache.cpp", |
| 129 |
"testSinglyLinkedList.cpp", |
| 130 |
"testSliceBudget.cpp", |
| 131 |
"testSlowScript.cpp", |
| 132 |
"testSortedArenaList.cpp", |
| 133 |
"testSourcePolicy.cpp", |
| 134 |
"testSparseBitmap.cpp", |
| 135 |
"testStencil.cpp", |
| 136 |
"testStringBuffers.cpp", |
| 137 |
"testStringBuilder.cpp", |
| 138 |
"testStringIsArrayIndex.cpp", |
| 139 |
"testStructuredClone.cpp", |
| 140 |
"testSymbol.cpp", |
| 141 |
"testThreadingConditionVariable.cpp", |
| 142 |
"testThreadingExclusiveData.cpp", |
| 143 |
"testThreadingMutex.cpp", |
| 144 |
"testThreadingThread.cpp", |
| 145 |
"testToSignedOrUnsignedInteger.cpp", |
| 146 |
"testTypedArrays.cpp", |
| 147 |
"testUbiNode.cpp", |
| 148 |
"testUncaughtSymbol.cpp", |
| 149 |
"testUTF8.cpp", |
| 150 |
"testWasmEncoder.cpp", |
| 151 |
"testWasmLEB128.cpp", |
| 152 |
"testWasmMasm.cpp", |
| 153 |
"testWasmRefSubtypes.cpp", |
| 154 |
"testWasmReturnCalls.cpp", |
| 155 |
"testWeakMap.cpp", |
| 156 |
"testWindowNonConfigurable.cpp", |
| 157 |
] |
| 158 |
|
| 159 |
SOURCES += [ |
| 160 |
# There are clashing definitions of js::jit::AssemblerBuffer. |
| 161 |
"testAssemblerBuffer.cpp", |
| 162 |
] |
| 163 |
|
| 164 |
SOURCES += [ |
| 165 |
# We don't want this in the C++ files with the test cases. |
| 166 |
"hidePointer.cpp", |
| 167 |
] |
| 168 |
|
| 169 |
if not CONFIG["JS_CODEGEN_NONE"]: |
| 170 |
UNIFIED_SOURCES += [ |
| 171 |
"testJitABIcalls.cpp", |
| 172 |
"testJitDCEinGVN.cpp", |
| 173 |
"testJitFoldsTo.cpp", |
| 174 |
"testJitGVN.cpp", |
| 175 |
"testJitMacroAssembler.cpp", |
| 176 |
"testJitMoveEmitterCycles.cpp", |
| 177 |
"testJitRangeAnalysis.cpp", |
| 178 |
"testJitRegisterSet.cpp", |
| 179 |
"testJitRValueAlloc.cpp", |
| 180 |
"testsJit.cpp", |
| 181 |
] |
| 182 |
|
| 183 |
if CONFIG["NIGHTLY_BUILD"]: |
| 184 |
# The Error interceptor only exists on Nightly. |
| 185 |
UNIFIED_SOURCES += [ |
| 186 |
"testErrorInterceptor.cpp", |
| 187 |
"testErrorInterceptorGC.cpp", |
| 188 |
] |
| 189 |
|
| 190 |
if CONFIG["OS_ARCH"] not in ("WINNT", "Darwin") and CONFIG["OS_TARGET"] != "Android": |
| 191 |
# open_memstream() not available on Windows, macOS, or Android |
| 192 |
UNIFIED_SOURCES += [ |
| 193 |
"testPrintError.cpp", |
| 194 |
] |
| 195 |
|
| 196 |
if CONFIG["MOZ_DEBUG"] or CONFIG["NIGHTLY_BUILD"]: |
| 197 |
DEFINES["JS_CACHEIR_SPEW"] = True |
| 198 |
DEFINES["JS_STRUCTURED_SPEW"] = True |
| 199 |
|
| 200 |
DEFINES["EXPORT_JS_API"] = True |
| 201 |
|
| 202 |
LOCAL_INCLUDES += [ |
| 203 |
"!..", |
| 204 |
"..", |
| 205 |
] |
| 206 |
|
| 207 |
USE_LIBS += [ |
| 208 |
"static:js", |
| 209 |
] |
| 210 |
|
| 211 |
DEFINES["topsrcdir"] = "%s/js/src" % TOPSRCDIR |
| 212 |
OBJDIR_PP_FILES.js.src["jsapi-tests"] += ["jsapi-tests-gdb.py.in"] |