summaryrefslogtreecommitdiffstats
path: root/dom/media/webrtc/transport/test/moz.build
blob: 3213525abd33ae51fbe54dff8c89c82de9af529b (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# -*- 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/.

include("/ipc/chromium/chromium-config.mozbuild")

if CONFIG["OS_TARGET"] != "WINNT":
    SOURCES += [
        "buffered_stun_socket_unittest.cpp",
        "multi_tcp_socket_unittest.cpp",
        "proxy_tunnel_socket_unittest.cpp",
        "runnable_utils_unittest.cpp",
        "simpletokenbucket_unittest.cpp",
        "stunserver.cpp",
        "test_nr_socket_ice_unittest.cpp",
        "test_nr_socket_unittest.cpp",
        "TestSyncRunnable.cpp",
        "turn_unittest.cpp",
    ]

    # Bug 1894419 - Various failures under TSAN
    if not CONFIG["MOZ_TSAN"]:
        if CONFIG["OS_TARGET"] != "Android":
            SOURCES += [
                "ice_unittest.cpp",
            ]

        if CONFIG["MOZ_SCTP"]:
            SOURCES += [
                "sctp_unittest.cpp",
            ]

        SOURCES += [
            "nrappkit_unittest.cpp",
            "rlogconnector_unittest.cpp",
            "sockettransportservice_unittest.cpp",
            "transport_unittests.cpp",
            "webrtcproxychannel_unittest.cpp",
        ]

for var in ("HAVE_STRDUP", "NR_SOCKET_IS_VOID_PTR", "SCTP_DEBUG"):
    DEFINES[var] = True

if CONFIG["OS_TARGET"] == "Android":
    DEFINES["LINUX"] = True
    DEFINES["ANDROID"] = True
    LOCAL_INCLUDES += [
        "/dom/media/webrtc/transport/third_party/nrappkit/src/port/android/include",
    ]

if CONFIG["OS_TARGET"] == "Linux":
    DEFINES["LINUX"] = True
    LOCAL_INCLUDES += [
        "/dom/media/webrtc/transport/third_party/nrappkit/src/port/linux/include",
    ]

if CONFIG["OS_TARGET"] == "Darwin":
    LOCAL_INCLUDES += [
        "/dom/media/webrtc/transport/third_party/nrappkit/src/port/darwin/include",
    ]

if CONFIG["OS_TARGET"] in ("DragonFly", "FreeBSD", "NetBSD", "OpenBSD"):
    if CONFIG["OS_TARGET"] == "Darwin":
        DEFINES["DARWIN"] = True
    else:
        DEFINES["BSD"] = True
    LOCAL_INCLUDES += [
        "/dom/media/webrtc/transport/third_party/nrappkit/src/port/darwin/include",
    ]

# SCTP DEFINES
if CONFIG["OS_TARGET"] == "WINNT":
    DEFINES["WIN"] = True
    # for stun.h
    DEFINES["WIN32"] = True
    DEFINES["__Userspace_os_Windows"] = 1
else:
    # Works for Darwin, Linux, Android. Probably doesn't work for others.
    DEFINES["__Userspace_os_%s" % CONFIG["OS_TARGET"]] = 1

if CONFIG["OS_TARGET"] in ("Darwin", "Android"):
    DEFINES["GTEST_USE_OWN_TR1_TUPLE"] = 1

LOCAL_INCLUDES += [
    "/dom/media/webrtc/transport/",
    "/dom/media/webrtc/transport/third_party/",
    "/dom/media/webrtc/transport/third_party/nICEr/src/crypto",
    "/dom/media/webrtc/transport/third_party/nICEr/src/ice",
    "/dom/media/webrtc/transport/third_party/nICEr/src/net",
    "/dom/media/webrtc/transport/third_party/nICEr/src/stun",
    "/dom/media/webrtc/transport/third_party/nICEr/src/util",
    "/dom/media/webrtc/transport/third_party/nrappkit/src/event",
    "/dom/media/webrtc/transport/third_party/nrappkit/src/log",
    "/dom/media/webrtc/transport/third_party/nrappkit/src/plugin",
    "/dom/media/webrtc/transport/third_party/nrappkit/src/port/generic/include",
    "/dom/media/webrtc/transport/third_party/nrappkit/src/registry",
    "/dom/media/webrtc/transport/third_party/nrappkit/src/share",
    "/dom/media/webrtc/transport/third_party/nrappkit/src/stats",
    "/dom/media/webrtc/transport/third_party/nrappkit/src/util/",
    "/dom/media/webrtc/transport/third_party/nrappkit/src/util/libekr",
    "/netwerk/sctp/src/",
    "/xpcom/tests/",
]

FINAL_LIBRARY = "xul-gtest"