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 9UNIFIED_SOURCES += [ 10 'selfTest.cpp', 11 'testAddPropertyPropcache.cpp', 12 'testArgumentsObject.cpp', 13 'testArrayBuffer.cpp', 14 'testArrayBufferView.cpp', 15 'testBoundFunction.cpp', 16 'testBug604087.cpp', 17 'testCallArgs.cpp', 18 'testCallNonGenericMethodOnProxy.cpp', 19 'testChromeBuffer.cpp', 20 'testClassGetter.cpp', 21 'testCloneScript.cpp', 22 'testDateToLocaleString.cpp', 23 'testDebugger.cpp', 24 'testDeepFreeze.cpp', 25 'testDefineGetterSetterNonEnumerable.cpp', 26 'testDefineProperty.cpp', 27 'testDefinePropertyIgnoredAttributes.cpp', 28 'testDeflateStringToUTF8Buffer.cpp', 29 'testDifferentNewTargetInvokeConstructor.cpp', 30 'testEnclosingFunction.cpp', 31 'testErrorCopying.cpp', 32 'testException.cpp', 33 'testExternalArrayBuffer.cpp', 34 'testExternalStrings.cpp', 35 'testFindSCCs.cpp', 36 'testForceLexicalInitialization.cpp', 37 'testForOfIterator.cpp', 38 'testForwardSetProperty.cpp', 39 'testFreshGlobalEvalRedefinition.cpp', 40 'testFunctionProperties.cpp', 41 'testGCAllocator.cpp', 42 'testGCCellPtr.cpp', 43 'testGCChunkPool.cpp', 44 'testGCExactRooting.cpp', 45 'testGCFinalizeCallback.cpp', 46 'testGCHeapPostBarriers.cpp', 47 'testGCHooks.cpp', 48 'testGCMarking.cpp', 49 'testGCOutOfMemory.cpp', 50 'testGCStoreBufferRemoval.cpp', 51 'testGCUniqueId.cpp', 52 'testGCWeakCache.cpp', 53 'testGCWeakRef.cpp', 54 'testGetPropertyDescriptor.cpp', 55 'testHashTable.cpp', 56 'testIndexToString.cpp', 57 'testIntern.cpp', 58 'testIntlAvailableLocales.cpp', 59 'testIntString.cpp', 60 'testIntTypesABI.cpp', 61 'testIsInsideNursery.cpp', 62 'testIteratorObject.cpp', 63 'testJSEvaluateScript.cpp', 64 'testLookup.cpp', 65 'testLooselyEqual.cpp', 66 'testMappedArrayBuffer.cpp', 67 'testMutedErrors.cpp', 68 'testNewObject.cpp', 69 'testNewTargetInvokeConstructor.cpp', 70 'testNullRoot.cpp', 71 'testObjectEmulatingUndefined.cpp', 72 'testOOM.cpp', 73 'testParseJSON.cpp', 74 'testPersistentRooted.cpp', 75 'testPreserveJitCode.cpp', 76 'testPrintf.cpp', 77 'testPrivateGCThingValue.cpp', 78 'testProfileStrings.cpp', 79 'testPropCache.cpp', 80 'testRegExp.cpp', 81 'testResolveRecursion.cpp', 82 'tests.cpp', 83 'testSameValue.cpp', 84 'testSavedStacks.cpp', 85 'testScriptInfo.cpp', 86 'testScriptObject.cpp', 87 'testSetProperty.cpp', 88 'testSetPropertyIgnoringNamedGetter.cpp', 89 'testSharedImmutableStringsCache.cpp', 90 'testSourcePolicy.cpp', 91 'testStringBuffer.cpp', 92 'testStructuredClone.cpp', 93 'testSymbol.cpp', 94 'testThreadingConditionVariable.cpp', 95 'testThreadingExclusiveData.cpp', 96 'testThreadingMutex.cpp', 97 'testThreadingThread.cpp', 98 'testToIntWidth.cpp', 99 'testTypedArrays.cpp', 100 'testUbiNode.cpp', 101 'testUncaughtSymbol.cpp', 102 'testUTF8.cpp', 103 'testWasmLEB128.cpp', 104 'testWeakMap.cpp', 105 'testXDR.cpp', 106] 107 108SOURCES += [ 109 # There are clashing definitions of js::jit::AssemblerBuffer. 110 'testAssemblerBuffer.cpp', 111] 112 113if CONFIG['ENABLE_ION']: 114 UNIFIED_SOURCES += [ 115 'testJitDCEinGVN.cpp', 116 'testJitFoldsTo.cpp', 117 'testJitGVN.cpp', 118 'testJitMacroAssembler.cpp', 119 'testJitMoveEmitterCycles-mips32.cpp', 120 'testJitMoveEmitterCycles.cpp', 121 'testJitRangeAnalysis.cpp', 122 'testJitRegisterSet.cpp', 123 'testJitRValueAlloc.cpp', 124 ] 125 126if CONFIG['SPIDERMONKEY_PROMISE']: 127 UNIFIED_SOURCES += [ 128 'testPromise.cpp', 129 ] 130 131DEFINES['EXPORT_JS_API'] = True 132 133LOCAL_INCLUDES += [ 134 '!..', 135 '..', 136] 137 138if CONFIG['ENABLE_INTL_API'] and CONFIG['MOZ_ICU_DATA_ARCHIVE']: 139 # The ICU libraries linked into libmozjs will not include the ICU data, 140 # so link it directly. 141 USE_LIBS += ['icudata'] 142 143USE_LIBS += [ 144 'static:js', 145] 146 147OS_LIBS += CONFIG['MOZ_ZLIB_LIBS'] 148 149if CONFIG['GNU_CXX']: 150 CXXFLAGS += ['-Wno-shadow', '-Werror=format'] 151 152# This is intended as a temporary workaround to enable VS2015. 153if CONFIG['_MSC_VER']: 154 CXXFLAGS += ['-wd4312'] 155 156DEFINES['topsrcdir'] = '%s/js/src' % TOPSRCDIR 157OBJDIR_PP_FILES.js.src['jsapi-tests'] += ['jsapi-tests-gdb.py.in'] 158