GN: Add system_wrappers_unittests, tools and tools_unittests
BUG=webrtc:5949 TESTED=Built and ran the tests on Mac. NOTRY=True Review-Url: https://codereview.webrtc.org/2025343002 Cr-Commit-Position: refs/heads/master@{#13007}
This commit is contained in:
parent
8f4419b074
commit
bac0412e7f
@ -175,7 +175,9 @@ static_library("rtc_base_approved") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static_library("rtc_task_queue") {
|
static_library("rtc_task_queue") {
|
||||||
public_deps = [ ":rtc_base_approved" ]
|
public_deps = [
|
||||||
|
":rtc_base_approved",
|
||||||
|
]
|
||||||
configs += [ "..:common_config" ]
|
configs += [ "..:common_config" ]
|
||||||
|
|
||||||
sources = [
|
sources = [
|
||||||
@ -184,7 +186,9 @@ static_library("rtc_task_queue") {
|
|||||||
]
|
]
|
||||||
|
|
||||||
if (rtc_build_libevent) {
|
if (rtc_build_libevent) {
|
||||||
deps = [ "//base/third_party/libevent" ]
|
deps = [
|
||||||
|
"//base/third_party/libevent",
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtc_enable_libevent) {
|
if (rtc_enable_libevent) {
|
||||||
@ -554,6 +558,7 @@ static_library("rtc_base") {
|
|||||||
"macutils.cc",
|
"macutils.cc",
|
||||||
"macutils.h",
|
"macutils.h",
|
||||||
]
|
]
|
||||||
|
libs += [ "CoreServices.framework" ] # For GetGestalt in macutils.cc.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
|
|||||||
@ -135,6 +135,9 @@ source_set("audio_device") {
|
|||||||
libs = [
|
libs = [
|
||||||
"AudioToolbox.framework",
|
"AudioToolbox.framework",
|
||||||
"CoreAudio.framework",
|
"CoreAudio.framework",
|
||||||
|
|
||||||
|
# Needed for CGEventSourceKeyState in audio_device_mac.cc:
|
||||||
|
"CoreGraphics.framework",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
if (is_ios) {
|
if (is_ios) {
|
||||||
|
|||||||
@ -6,10 +6,14 @@
|
|||||||
# in the file PATENTS. All contributing project authors may
|
# in the file PATENTS. All contributing project authors may
|
||||||
# be found in the AUTHORS file in the root of the source tree.
|
# be found in the AUTHORS file in the root of the source tree.
|
||||||
|
|
||||||
|
if (is_android) {
|
||||||
import("//build/config/android/config.gni")
|
import("//build/config/android/config.gni")
|
||||||
|
import("//build/config/android/rules.gni")
|
||||||
|
}
|
||||||
|
import("//testing/test.gni")
|
||||||
import("../build/webrtc.gni")
|
import("../build/webrtc.gni")
|
||||||
|
|
||||||
static_library("system_wrappers") {
|
source_set("system_wrappers") {
|
||||||
sources = [
|
sources = [
|
||||||
"include/aligned_array.h",
|
"include/aligned_array.h",
|
||||||
"include/aligned_malloc.h",
|
"include/aligned_malloc.h",
|
||||||
@ -188,3 +192,53 @@ if (is_linux) {
|
|||||||
public_configs = [ "..:common_inherited_config" ]
|
public_configs = [ "..:common_inherited_config" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test("system_wrappers_unittests") {
|
||||||
|
testonly = true
|
||||||
|
sources = [
|
||||||
|
"source/aligned_array_unittest.cc",
|
||||||
|
"source/aligned_malloc_unittest.cc",
|
||||||
|
"source/clock_unittest.cc",
|
||||||
|
"source/condition_variable_unittest.cc",
|
||||||
|
"source/critical_section_unittest.cc",
|
||||||
|
"source/data_log_c_helpers_unittest.c",
|
||||||
|
"source/data_log_c_helpers_unittest.h",
|
||||||
|
"source/data_log_helpers_unittest.cc",
|
||||||
|
"source/event_timer_posix_unittest.cc",
|
||||||
|
"source/logging_unittest.cc",
|
||||||
|
"source/metrics_default_unittest.cc",
|
||||||
|
"source/metrics_unittest.cc",
|
||||||
|
"source/ntp_time_unittest.cc",
|
||||||
|
"source/rtp_to_ntp_unittest.cc",
|
||||||
|
"source/stl_util_unittest.cc",
|
||||||
|
"source/stringize_macros_unittest.cc",
|
||||||
|
]
|
||||||
|
if (rtc_enable_data_logging) {
|
||||||
|
sources += [
|
||||||
|
"source/data_log_unittest.cc",
|
||||||
|
"source/data_log_unittest_disabled.cc",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
configs += [ "..:common_config" ]
|
||||||
|
public_configs = [ "..:common_inherited_config" ]
|
||||||
|
|
||||||
|
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
|
||||||
|
|
||||||
|
if (is_clang) {
|
||||||
|
# Suppress warnings from Chrome's Clang plugins.
|
||||||
|
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
|
||||||
|
configs -= [ "//build/config/clang:find_bad_constructs" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
":metrics_default",
|
||||||
|
":system_wrappers",
|
||||||
|
"../test:test_support_main",
|
||||||
|
"//testing/gtest",
|
||||||
|
]
|
||||||
|
|
||||||
|
if (is_android) {
|
||||||
|
deps += [ "//testing/android/native_test:native_test_support" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -25,8 +25,6 @@
|
|||||||
'source/condition_variable_unittest.cc',
|
'source/condition_variable_unittest.cc',
|
||||||
'source/critical_section_unittest.cc',
|
'source/critical_section_unittest.cc',
|
||||||
'source/logging_unittest.cc',
|
'source/logging_unittest.cc',
|
||||||
'source/data_log_unittest.cc',
|
|
||||||
'source/data_log_unittest_disabled.cc',
|
|
||||||
'source/data_log_helpers_unittest.cc',
|
'source/data_log_helpers_unittest.cc',
|
||||||
'source/data_log_c_helpers_unittest.c',
|
'source/data_log_c_helpers_unittest.c',
|
||||||
'source/data_log_c_helpers_unittest.h',
|
'source/data_log_c_helpers_unittest.h',
|
||||||
@ -40,9 +38,9 @@
|
|||||||
],
|
],
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['enable_data_logging==1', {
|
['enable_data_logging==1', {
|
||||||
'sources!': [ 'source/data_log_unittest_disabled.cc', ],
|
'sources': [ 'source/data_log_unittest.cc', ],
|
||||||
}, {
|
}, {
|
||||||
'sources!': [ 'source/data_log_unittest.cc', ],
|
'sources': [ 'source/data_log_unittest_disabled.cc', ],
|
||||||
}],
|
}],
|
||||||
['OS=="android"', {
|
['OS=="android"', {
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
|
|||||||
@ -6,11 +6,14 @@
|
|||||||
# in the file PATENTS. All contributing project authors may
|
# in the file PATENTS. All contributing project authors may
|
||||||
# be found in the AUTHORS file in the root of the source tree.
|
# be found in the AUTHORS file in the root of the source tree.
|
||||||
|
|
||||||
|
import("//testing/test.gni")
|
||||||
import("../build/webrtc.gni")
|
import("../build/webrtc.gni")
|
||||||
|
|
||||||
source_set("tools") {
|
source_set("tools") {
|
||||||
deps = [
|
deps = [
|
||||||
":command_line_parser",
|
":command_line_parser",
|
||||||
|
":frame_analyzer",
|
||||||
|
":rgba_to_i420_converter",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,6 +34,10 @@ source_set("video_quality_analysis") {
|
|||||||
"frame_analyzer/video_quality_analysis.cc",
|
"frame_analyzer/video_quality_analysis.cc",
|
||||||
"frame_analyzer/video_quality_analysis.h",
|
"frame_analyzer/video_quality_analysis.h",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
configs += [ "..:common_config" ]
|
||||||
|
public_configs = [ "..:common_inherited_config" ]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
"../common_video",
|
"../common_video",
|
||||||
]
|
]
|
||||||
@ -43,6 +50,25 @@ executable("frame_analyzer") {
|
|||||||
sources = [
|
sources = [
|
||||||
"frame_analyzer/frame_analyzer.cc",
|
"frame_analyzer/frame_analyzer.cc",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
configs += [ "..:common_config" ]
|
||||||
|
public_configs = [ "..:common_inherited_config" ]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
":command_line_parser",
|
||||||
|
":video_quality_analysis",
|
||||||
|
"//build/win:default_exe_manifest",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
executable("psnr_ssim_analyzer") {
|
||||||
|
sources = [
|
||||||
|
"psnr_ssim_analyzer/psnr_ssim_analyzer.cc",
|
||||||
|
]
|
||||||
|
|
||||||
|
configs += [ "..:common_config" ]
|
||||||
|
public_configs = [ "..:common_inherited_config" ]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":command_line_parser",
|
":command_line_parser",
|
||||||
":video_quality_analysis",
|
":video_quality_analysis",
|
||||||
@ -56,6 +82,10 @@ executable("rgba_to_i420_converter") {
|
|||||||
"converter/converter.h",
|
"converter/converter.h",
|
||||||
"converter/rgba_to_i420_converter.cc",
|
"converter/rgba_to_i420_converter.cc",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
configs += [ "..:common_config" ]
|
||||||
|
public_configs = [ "..:common_inherited_config" ]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":command_line_parser",
|
":command_line_parser",
|
||||||
"../common_video",
|
"../common_video",
|
||||||
@ -63,14 +93,32 @@ executable("rgba_to_i420_converter") {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO(kjellander): Convert all of tools.gyp into GN here.
|
source_set("frame_editing_lib") {
|
||||||
|
|
||||||
if (!build_with_chromium) {
|
|
||||||
executable("tools_unittests") {
|
|
||||||
testonly = true
|
|
||||||
|
|
||||||
sources = [
|
sources = [
|
||||||
"simple_command_line_parser_unittest.cc",
|
"frame_editing/frame_editing_lib.cc",
|
||||||
|
"frame_editing/frame_editing_lib.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
configs += [ "..:common_config" ]
|
||||||
|
public_configs = [ "..:common_inherited_config" ]
|
||||||
|
|
||||||
|
# TODO(jschuh): Bug 1348: fix this warning.
|
||||||
|
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
|
||||||
|
|
||||||
|
if (is_clang) {
|
||||||
|
# Suppress warnings from the Chromium Clang plugin.
|
||||||
|
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
|
||||||
|
configs -= [ "//build/config/clang:find_bad_constructs" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"../common_video",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
executable("frame_editor") {
|
||||||
|
sources = [
|
||||||
|
"frame_editing/frame_editing.cc",
|
||||||
]
|
]
|
||||||
|
|
||||||
configs += [ "..:common_config" ]
|
configs += [ "..:common_config" ]
|
||||||
@ -78,9 +126,148 @@ if (!build_with_chromium) {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":command_line_parser",
|
":command_line_parser",
|
||||||
"../test:test_support_main",
|
":frame_editing_lib",
|
||||||
"//build/win:default_exe_manifest",
|
"//build/win:default_exe_manifest",
|
||||||
"//testing/gtest",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
executable("force_mic_volume_max") {
|
||||||
|
sources = [
|
||||||
|
"force_mic_volume_max/force_mic_volume_max.cc",
|
||||||
|
]
|
||||||
|
|
||||||
|
configs += [ "..:common_config" ]
|
||||||
|
public_configs = [ "..:common_inherited_config" ]
|
||||||
|
|
||||||
|
if (is_clang) {
|
||||||
|
# Suppress warnings from the Chromium Clang plugin.
|
||||||
|
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
|
||||||
|
configs -= [ "//build/config/clang:find_bad_constructs" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"../system_wrappers:system_wrappers_default",
|
||||||
|
"../voice_engine",
|
||||||
|
"//build/win:default_exe_manifest",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
source_set("agc_test_utils") {
|
||||||
|
testonly = true
|
||||||
|
sources = [
|
||||||
|
"agc/test_utils.cc",
|
||||||
|
"agc/test_utils.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
configs += [ "..:common_config" ]
|
||||||
|
public_configs = [ "..:common_inherited_config" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
executable("agc_harness") {
|
||||||
|
testonly = true
|
||||||
|
sources = [
|
||||||
|
"agc/agc_harness.cc",
|
||||||
|
]
|
||||||
|
|
||||||
|
configs += [ "..:common_config" ]
|
||||||
|
public_configs = [ "..:common_inherited_config" ]
|
||||||
|
|
||||||
|
if (is_clang) {
|
||||||
|
# Suppress warnings from the Chromium Clang plugin.
|
||||||
|
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
|
||||||
|
configs -= [ "//build/config/clang:find_bad_constructs" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"../system_wrappers:system_wrappers_default",
|
||||||
|
"../test:channel_transport",
|
||||||
|
"../test:test_support",
|
||||||
|
"../voice_engine",
|
||||||
|
"//build/win:default_exe_manifest",
|
||||||
|
"//testing/gtest",
|
||||||
|
"//third_party/gflags",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
executable("activity_metric") {
|
||||||
|
testonly = true
|
||||||
|
sources = [
|
||||||
|
"agc/activity_metric.cc",
|
||||||
|
]
|
||||||
|
|
||||||
|
configs += [ "..:common_config" ]
|
||||||
|
public_configs = [ "..:common_inherited_config" ]
|
||||||
|
|
||||||
|
if (is_clang) {
|
||||||
|
# Suppress warnings from the Chromium Clang plugin.
|
||||||
|
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
|
||||||
|
configs -= [ "//build/config/clang:find_bad_constructs" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"../modules/audio_processing",
|
||||||
|
"../system_wrappers:metrics_default",
|
||||||
|
"//build/win:default_exe_manifest",
|
||||||
|
"//testing/gtest",
|
||||||
|
"//third_party/gflags",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
executable("audio_e2e_harness") {
|
||||||
|
testonly = true
|
||||||
|
sources = [
|
||||||
|
"e2e_quality/audio/audio_e2e_harness.cc",
|
||||||
|
]
|
||||||
|
|
||||||
|
configs += [ "..:common_config" ]
|
||||||
|
public_configs = [ "..:common_inherited_config" ]
|
||||||
|
|
||||||
|
if (is_clang) {
|
||||||
|
# Suppress warnings from the Chromium Clang plugin.
|
||||||
|
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
|
||||||
|
configs -= [ "//build/config/clang:find_bad_constructs" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"../system_wrappers:system_wrappers_default",
|
||||||
|
"../test:channel_transport",
|
||||||
|
"../voice_engine",
|
||||||
|
"//build/win:default_exe_manifest",
|
||||||
|
"//testing/gtest",
|
||||||
|
"//third_party/gflags",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
test("tools_unittests") {
|
||||||
|
testonly = true
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
"frame_analyzer/video_quality_analysis_unittest.cc",
|
||||||
|
"frame_editing/frame_editing_unittest.cc",
|
||||||
|
"simple_command_line_parser_unittest.cc",
|
||||||
|
]
|
||||||
|
|
||||||
|
configs += [ "..:common_config" ]
|
||||||
|
public_configs = [ "..:common_inherited_config" ]
|
||||||
|
|
||||||
|
# TODO(jschuh): Bug 1348: fix this warning.
|
||||||
|
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
|
||||||
|
|
||||||
|
if (is_clang) {
|
||||||
|
# Suppress warnings from the Chromium Clang plugin.
|
||||||
|
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
|
||||||
|
configs -= [ "//build/config/clang:find_bad_constructs" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
":command_line_parser",
|
||||||
|
":frame_editing_lib",
|
||||||
|
":video_quality_analysis",
|
||||||
|
"../test:test_support_main",
|
||||||
|
"//testing/gtest",
|
||||||
|
]
|
||||||
|
|
||||||
|
if (is_android) {
|
||||||
|
deps += [ "//testing/android/native_test:native_test_support" ]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user