summaryrefslogtreecommitdiffstats
path: root/toolkit/crashreporter/test/moz.build
blob: 254d232e0e341f3e1f0f1a6e54c59771401dc751 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# -*- 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/.
FINAL_TARGET = "_tests/xpcshell/toolkit/crashreporter/test"

XPCSHELL_TESTS_MANIFESTS += ["unit/xpcshell.toml", "unit_ipc/xpcshell.toml"]
if CONFIG["MOZ_PHC"]:
    XPCSHELL_TESTS_MANIFESTS += ["unit/xpcshell-phc.toml", "unit_ipc/xpcshell-phc.toml"]

TEST_DIRS += [
    "gtest",
]

BROWSER_CHROME_MANIFESTS += ["browser/browser.toml"]

UNIFIED_SOURCES += [
    "../google-breakpad/src/processor/basic_code_modules.cc",
    "../google-breakpad/src/processor/convert_old_arm64_context.cc",
    "../google-breakpad/src/processor/dump_context.cc",
    "../google-breakpad/src/processor/dump_object.cc",
    "../google-breakpad/src/processor/logging.cc",
    "../google-breakpad/src/processor/minidump.cc",
    "../google-breakpad/src/processor/pathname_stripper.cc",
    "../google-breakpad/src/processor/proc_maps_linux.cc",
    "dumputils.cpp",
    "nsTestCrasher.cpp",
]

SOURCES += [
    "ExceptionThrower.cpp",
]

if CONFIG["OS_TARGET"] == "WINNT" and CONFIG["TARGET_CPU"] == "x86_64":
    if CONFIG["CC_TYPE"] not in ("gcc", "clang"):
        SOURCES += [
            "win64UnwindInfoTests.asm",
        ]

if CONFIG["CC_TYPE"] == "clang-cl":
    SOURCES["ExceptionThrower.cpp"].flags += [
        "-Xclang",
        "-fcxx-exceptions",
    ]
else:
    SOURCES["ExceptionThrower.cpp"].flags += [
        "-fexceptions",
    ]

if CONFIG["MOZ_PHC"]:
    DEFINES["MOZ_PHC"] = True

GeckoSharedLibrary("testcrasher")

DEFINES["SHARED_LIBRARY"] = "%s%s%s" % (
    CONFIG["DLL_PREFIX"],
    LIBRARY_NAME,
    CONFIG["DLL_SUFFIX"],
)

TEST_HARNESS_FILES.xpcshell.toolkit.crashreporter.test.unit += [
    "CrashTestUtils.sys.mjs"
]
TEST_HARNESS_FILES.xpcshell.toolkit.crashreporter.test.unit_ipc += [
    "CrashTestUtils.sys.mjs"
]

include("/toolkit/crashreporter/crashreporter.mozbuild")

NO_PGO = True