js/src/jsapi-tests/moz.build
author Tom Schuster <evilpies@gmail.com>
Tue, 27 Nov 2018 11:38:40 +0000
changeset 448242 6b2aceb0979a49dbcce80db1b59ef8238bd0d2b8
parent 447397 97dadee2ab7c78513e929407ee6460b5fb6345fe
child 448942 5e65de3569fe33856451396ab77f78ba9c03a8c8
permissions -rw-r--r--
Bug 1496475 - JSAPI test. r=jorendorff Depends on D12948 Differential Revision: https://phabricator.services.mozilla.com/D12949

# -*- 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/.

GeckoProgram('jsapi-tests', linkage=None)

include('../js-cxxflags.mozbuild')

UNIFIED_SOURCES += [
    'selfTest.cpp',
    'testAddPropertyPropcache.cpp',
    'testArgumentsObject.cpp',
    'testArrayBuffer.cpp',
    'testArrayBufferView.cpp',
    'testAtomicOperations.cpp',
    'testBoundFunction.cpp',
    'testBug604087.cpp',
    'testCallArgs.cpp',
    'testCallNonGenericMethodOnProxy.cpp',
    'testChromeBuffer.cpp',
    'testCloneScript.cpp',
    'testCompileNonSyntactic.cpp',
    'testCompileUtf8.cpp',
    'testDateToLocaleString.cpp',
    'testDebugger.cpp',
    'testDeepFreeze.cpp',
    'testDefineGetterSetterNonEnumerable.cpp',
    'testDefineProperty.cpp',
    'testDefinePropertyIgnoredAttributes.cpp',
    'testDeflateStringToUTF8Buffer.cpp',
    'testDifferentNewTargetInvokeConstructor.cpp',
    'testEmptyWindowIsOmitted.cpp',
    'testErrorCopying.cpp',
    'testErrorLineOfContext.cpp',
    'testException.cpp',
    'testExecuteInJSMEnvironment.cpp',
    'testExternalArrayBuffer.cpp',
    'testExternalStrings.cpp',
    'testFindSCCs.cpp',
    'testForceLexicalInitialization.cpp',
    'testForOfIterator.cpp',
    'testForwardSetProperty.cpp',
    'testFreshGlobalEvalRedefinition.cpp',
    'testFunctionBinding.cpp',
    'testFunctionProperties.cpp',
    'testGCAllocator.cpp',
    'testGCCellPtr.cpp',
    'testGCChunkPool.cpp',
    'testGCExactRooting.cpp',
    'testGCFinalizeCallback.cpp',
    'testGCGrayMarking.cpp',
    'testGCHeapPostBarriers.cpp',
    'testGCHooks.cpp',
    'testGCMarking.cpp',
    'testGCOutOfMemory.cpp',
    'testGCStoreBufferRemoval.cpp',
    'testGCUniqueId.cpp',
    'testGCWeakCache.cpp',
    'testGCWeakRef.cpp',
    'testGetPropertyDescriptor.cpp',
    'testHashTable.cpp',
    'testIndexToString.cpp',
    'testInformalValueTypeName.cpp',
    'testIntern.cpp',
    'testIntlAvailableLocales.cpp',
    'testIntString.cpp',
    'testIsInsideNursery.cpp',
    'testIteratorObject.cpp',
    'testJSEvaluateScript.cpp',
    'testLookup.cpp',
    'testLooselyEqual.cpp',
    'testMappedArrayBuffer.cpp',
    'testMutedErrors.cpp',
    'testNewObject.cpp',
    'testNewTargetInvokeConstructor.cpp',
    'testNullRoot.cpp',
    'testObjectEmulatingUndefined.cpp',
    'testOOM.cpp',
    'testParseJSON.cpp',
    'testPersistentRooted.cpp',
    'testPreserveJitCode.cpp',
    'testPrintf.cpp',
    'testPrivateGCThingValue.cpp',
    'testProfileStrings.cpp',
    'testPromise.cpp',
    'testPropCache.cpp',
    'testReadableStream.cpp',
    'testRegExp.cpp',
    'testResolveRecursion.cpp',
    'tests.cpp',
    'testSameValue.cpp',
    'testSavedStacks.cpp',
    'testScriptInfo.cpp',
    'testScriptObject.cpp',
    'testSetProperty.cpp',
    'testSetPropertyIgnoringNamedGetter.cpp',
    'testSharedImmutableStringsCache.cpp',
    'testSourcePolicy.cpp',
    'testStringBuffer.cpp',
    'testStringIsArrayIndex.cpp',
    'testStructuredClone.cpp',
    'testSymbol.cpp',
    'testThreadingConditionVariable.cpp',
    'testThreadingExclusiveData.cpp',
    'testThreadingMutex.cpp',
    'testThreadingThread.cpp',
    'testToSignedOrUnsignedInteger.cpp',
    'testTypedArrays.cpp',
    'testUbiNode.cpp',
    'testUncaughtSymbol.cpp',
    'testUTF8.cpp',
    'testWasmLEB128.cpp',
    'testWeakMap.cpp',
    'testWindowNonConfigurable.cpp',
    'testXDR.cpp',
]

SOURCES += [
    # There are clashing definitions of js::jit::AssemblerBuffer.
    'testAssemblerBuffer.cpp',
]

SOURCES += [
    # We don't want this in the C++ files with the test cases.
    'hidePointer.cpp',
]

if CONFIG['ENABLE_ION']:
    UNIFIED_SOURCES += [
        'testJitDCEinGVN.cpp',
        'testJitFoldsTo.cpp',
        'testJitGVN.cpp',
        'testJitMacroAssembler.cpp',
        'testJitMoveEmitterCycles-mips32.cpp',
        'testJitMoveEmitterCycles.cpp',
        'testJitRangeAnalysis.cpp',
        'testJitRegisterSet.cpp',
        'testJitRValueAlloc.cpp',
    ]

if CONFIG['NIGHTLY_BUILD']:
    # The Error interceptor only exists on Nightly.
    UNIFIED_SOURCES += [
        'testErrorInterceptor.cpp',
        'testErrorInterceptorGC.cpp',
    ]

if CONFIG['JS_BUILD_BINAST'] and CONFIG['JS_STANDALONE'] and not CONFIG['FUZZING']:
    # Standalone builds leave the source directory untouched,
    # which lets us run tests with the data files intact.
    # Otherwise, in the current state of the build system,
    # we can't have data files in js/src tests.
    # Also, fuzzing builds modify the const matching in the
    # token reader and hence affect the correctness of the tests.
    UNIFIED_SOURCES += [
        'testBinASTReader.cpp',
        'testBinTokenReaderTester.cpp'
    ]


DEFINES['EXPORT_JS_API'] = True

LOCAL_INCLUDES += [
    '!..',
    '..',
]

USE_LIBS += [
    'static:js',
]

if CONFIG['ENABLE_WASM_CRANELIFT']:
    USE_LIBS += [
        'jsrust'
    ]

if CONFIG['MOZ_NEEDS_LIBATOMIC']:
    OS_LIBS += ['atomic']

OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']

DEFINES['topsrcdir'] = '%s/js/src' % TOPSRCDIR
OBJDIR_PP_FILES.js.src['jsapi-tests'] += ['jsapi-tests-gdb.py.in']