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 7GeckoProgram('jsapi-tests', linkage=None) 8 9include('../js-cxxflags.mozbuild') 10include('../js-standalone.mozbuild') 11 12UNIFIED_SOURCES += [ 13 'selfTest.cpp', 14 'testAddPropertyPropcache.cpp', 15 'testArgumentsObject.cpp', 16 'testArrayBuffer.cpp', 17 'testArrayBufferView.cpp', 18 'testArrayBufferWithUserOwnedContents.cpp', 19 'testAtomicOperations.cpp', 20 'testAtomizeUtf8NonAsciiLatin1CodePoint.cpp', 21 'testBigInt.cpp', 22 'testBoundFunction.cpp', 23 'testBug604087.cpp', 24 'testCallArgs.cpp', 25 'testCallNonGenericMethodOnProxy.cpp', 26 'testChromeBuffer.cpp', 27 'testCompileNonSyntactic.cpp', 28 'testCompileUtf8.cpp', 29 'testDateToLocaleString.cpp', 30 'testDebugger.cpp', 31 'testDeepFreeze.cpp', 32 'testDefineGetterSetterNonEnumerable.cpp', 33 'testDefineProperty.cpp', 34 'testDefinePropertyIgnoredAttributes.cpp', 35 'testDeflateStringToUTF8Buffer.cpp', 36 'testDifferentNewTargetInvokeConstructor.cpp', 37 'testEmptyWindowIsOmitted.cpp', 38 'testErrorCopying.cpp', 39 'testErrorLineOfContext.cpp', 40 'testException.cpp', 41 'testExecuteInJSMEnvironment.cpp', 42 'testExternalStrings.cpp', 43 'testFindSCCs.cpp', 44 'testForceLexicalInitialization.cpp', 45 'testForOfIterator.cpp', 46 'testForwardSetProperty.cpp', 47 'testFreshGlobalEvalRedefinition.cpp', 48 'testFunctionBinding.cpp', 49 'testFunctionProperties.cpp', 50 'testGCAllocator.cpp', 51 'testGCCellPtr.cpp', 52 'testGCChunkPool.cpp', 53 'testGCExactRooting.cpp', 54 'testGCFinalizeCallback.cpp', 55 'testGCGrayMarking.cpp', 56 'testGCHeapBarriers.cpp', 57 'testGCHooks.cpp', 58 'testGCMarking.cpp', 59 'testGCOutOfMemory.cpp', 60 'testGCStoreBufferRemoval.cpp', 61 'testGCUniqueId.cpp', 62 'testGCWeakCache.cpp', 63 'testGetPropertyDescriptor.cpp', 64 'testHashTable.cpp', 65 'testIndexToString.cpp', 66 'testInformalValueTypeName.cpp', 67 'testIntern.cpp', 68 'testIntlAvailableLocales.cpp', 69 'testIntString.cpp', 70 'testIsInsideNursery.cpp', 71 'testIteratorObject.cpp', 72 'testJSEvaluateScript.cpp', 73 'testLookup.cpp', 74 'testLooselyEqual.cpp', 75 'testMappedArrayBuffer.cpp', 76 'testMemoryAssociation.cpp', 77 'testMutedErrors.cpp', 78 'testNewObject.cpp', 79 'testNewTargetInvokeConstructor.cpp', 80 'testNullRoot.cpp', 81 'testNumberToString.cpp', 82 'testObjectEmulatingUndefined.cpp', 83 'testOOM.cpp', 84 'testParseJSON.cpp', 85 'testPersistentRooted.cpp', 86 'testPreserveJitCode.cpp', 87 'testPrintf.cpp', 88 'testPrivateGCThingValue.cpp', 89 'testProfileStrings.cpp', 90 'testPromise.cpp', 91 'testPropCache.cpp', 92 'testReadableStream.cpp', 93 'testRegExp.cpp', 94 'testResolveRecursion.cpp', 95 'tests.cpp', 96 'testSABAccounting.cpp', 97 'testSameValue.cpp', 98 'testSavedStacks.cpp', 99 'testScriptInfo.cpp', 100 'testScriptObject.cpp', 101 'testScriptSourceCompression.cpp', 102 'testSetProperty.cpp', 103 'testSetPropertyIgnoringNamedGetter.cpp', 104 'testSharedImmutableStringsCache.cpp', 105 'testSourcePolicy.cpp', 106 'testSparseBitmap.cpp', 107 'testStringBuffer.cpp', 108 'testStringIsArrayIndex.cpp', 109 'testStructuredClone.cpp', 110 'testSymbol.cpp', 111 'testThreadingConditionVariable.cpp', 112 'testThreadingExclusiveData.cpp', 113 'testThreadingMutex.cpp', 114 'testThreadingThread.cpp', 115 'testToSignedOrUnsignedInteger.cpp', 116 'testTypedArrays.cpp', 117 'testUbiNode.cpp', 118 'testUncaughtSymbol.cpp', 119 'testUTF8.cpp', 120 'testWasmLEB128.cpp', 121 'testWeakMap.cpp', 122 'testWindowNonConfigurable.cpp', 123 'testXDR.cpp', 124] 125 126SOURCES += [ 127 # There are clashing definitions of js::jit::AssemblerBuffer. 128 'testAssemblerBuffer.cpp', 129] 130 131SOURCES += [ 132 # We don't want this in the C++ files with the test cases. 133 'hidePointer.cpp', 134] 135 136if not CONFIG['JS_CODEGEN_NONE']: 137 UNIFIED_SOURCES += [ 138 'testJitDCEinGVN.cpp', 139 'testJitFoldsTo.cpp', 140 'testJitGVN.cpp', 141 'testJitMacroAssembler.cpp', 142 'testJitMoveEmitterCycles-mips32.cpp', 143 'testJitMoveEmitterCycles.cpp', 144 'testJitRangeAnalysis.cpp', 145 'testJitRegisterSet.cpp', 146 'testJitRValueAlloc.cpp', 147 ] 148 149if CONFIG['NIGHTLY_BUILD']: 150 # The Error interceptor only exists on Nightly. 151 UNIFIED_SOURCES += [ 152 'testErrorInterceptor.cpp', 153 'testErrorInterceptorGC.cpp', 154 ] 155 156if CONFIG['JS_BUILD_BINAST'] and CONFIG['JS_STANDALONE'] and not CONFIG['FUZZING']: 157 # Standalone builds leave the source directory untouched, 158 # which lets us run tests with the data files intact. 159 # Otherwise, in the current state of the build system, 160 # we can't have data files in js/src tests. 161 # Also, fuzzing builds modify the const matching in the 162 # token reader and hence affect the correctness of the tests. 163 UNIFIED_SOURCES += [ 164 'testBinASTReader.cpp', 165 ] 166 167if CONFIG['OS_ARCH'] not in ('WINNT', 'Darwin') and CONFIG['OS_TARGET'] != 'Android': 168 # open_memstream() not available on Windows, macOS, or Android 169 UNIFIED_SOURCES += [ 170 'testPrintError.cpp', 171 ] 172 173 174DEFINES['EXPORT_JS_API'] = True 175 176LOCAL_INCLUDES += [ 177 '!..', 178 '..', 179] 180 181USE_LIBS += [ 182 'static:js', 183] 184 185DEFINES['topsrcdir'] = '%s/js/src' % TOPSRCDIR 186OBJDIR_PP_FILES.js.src['jsapi-tests'] += ['jsapi-tests-gdb.py.in'] 187