Commit 870ebb78 authored by henrika's avatar henrika Committed by Commit bot

Revert of Add build targets for Opus tests. (patchset #2 id:20001 of...

Revert of Add build targets for Opus tests. (patchset #2 id:20001 of https://codereview.chromium.org/894473002/)

Reason for revert:
This CL breaks WebRTC in Chrome and must be reverted. Contact tlegrand@ for more details.

Original issue's description:
> Add build targets for Opus tests.
>
> test_opus_api, test_opus_encode, test_opus_decode, and test_opus_padding
> can be run directly, with no command-line options, and they print out
> "OK" during the test and an overall status message such as
> "All API tests passed." or "Tests completed successfully." at the end.
>
> The celt component has several unit tests. I didn't add build targets
> for them because some of them don't print any output, so you'd need a
> test harness script to examine their exit status.
>
> R=henrika@chromium.org,sergeyu@chromium.org
> BUG=452984
>
> Committed: https://crrev.com/8b76b75f78ffdb9760ee7eea4f149c5d2b64bc89
> Cr-Commit-Position: refs/heads/master@{#314235}

TBR=sergeyu@chromium.org,brettw@chromium.org,wtc@chromium.org, tlegrand@chromium.org
BUG=452984

Review URL: https://codereview.chromium.org/884483005

Cr-Commit-Position: refs/heads/master@{#314308}
parent 2fa98a59
......@@ -4,7 +4,6 @@
import("//build/config/arm.gni")
import("//build/config/mips.gni")
import("//testing/test.gni")
# If fixed point implementation shall be used (otherwise float).
# TODO(wtc): change "mipselx" to "mipsel" in this file when the compilation
......@@ -27,23 +26,6 @@ config("opus_config") {
include_dirs = [ "src/include" ]
}
config("opus_test_config") {
include_dirs = [
"src/celt",
"src/silk",
]
if (is_win) {
defines = [ "inline=__inline" ]
}
if (is_android) {
libs = [ "log" ]
}
if (is_clang) {
cflags = [ "-Wno-absolute-value" ]
}
}
if (use_opus_rtcd) {
action("convert_rtcd_assembler") {
script = "convert_rtcd_assembler.py"
......@@ -191,98 +173,50 @@ executable("opus_compare") {
]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
"//build/config/compiler:no_chromium_code",
":opus_test_config",
]
deps = [
":opus",
]
}
executable("opus_demo") {
sources = [
"src/src/opus_demo.c",
]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
"//build/config/compiler:no_chromium_code",
":opus_test_config",
]
deps = [
":opus",
]
}
configs += [ "//build/config/compiler:no_chromium_code" ]
test("test_opus_api") {
sources = [
"src/tests/test_opus_api.c",
include_dirs = [
"src/celt",
"src/silk",
]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
"//build/config/compiler:no_chromium_code",
":opus_test_config",
]
if (is_win) {
defines = [ "inline=__inline" ]
}
if (is_android) {
libs = [ "log" ]
}
if (is_clang) {
cflags = [ "-Wno-absolute-value" ]
}
deps = [
":opus",
]
}
test("test_opus_encode") {
executable("opus_demo") {
sources = [
"src/tests/test_opus_encode.c",
"src/src/opus_demo.c",
]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
"//build/config/compiler:no_chromium_code",
":opus_test_config",
]
deps = [
":opus",
]
}
test("test_opus_decode") {
sources = [
"src/tests/test_opus_decode.c",
]
configs += [ "//build/config/compiler:no_chromium_code" ]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
"//build/config/compiler:no_chromium_code",
":opus_test_config",
include_dirs = [
"src/celt",
"src/silk",
]
# test_opus_decode passes a null pointer to opus_decode() for an argument
# marked as requiring a non-null value by the nonnull function attribute,
# and expects opus_decode() to fail. Disable the -Wnonnull option to avoid
# a compilation error if -Werror is specified.
if (is_posix) {
cflags = [ "-Wno-nonnull" ]
if (is_win) {
defines = [ "inline=__inline" ]
}
if (is_android) {
libs = [ "log" ]
}
if (is_clang) {
cflags = [ "-Wno-absolute-value" ]
}
deps = [
":opus",
]
}
test("test_opus_padding") {
sources = [
"src/tests/test_opus_padding.c",
]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
"//build/config/compiler:no_chromium_code",
":opus_test_config",
]
deps = [
":opus",
......
......@@ -31,33 +31,6 @@
}],
],
},
'target_defaults': {
'target_conditions': [
['_type=="executable"', {
# All of the executable targets depend on 'opus'. Unfortunately the
# 'dependencies' block cannot be inherited via 'target_defaults'.
'include_dirs': [
'src/celt',
'src/silk',
],
'conditions': [
['OS == "win"', {
'defines': [
'inline=__inline',
],
}],
['OS=="android"', {
'libraries': [
'-llog',
],
}],
['clang==1', {
'cflags': [ '-Wno-absolute-value' ],
}]
],
}],
],
},
'targets': [
{
'target_name': 'opus',
......@@ -178,73 +151,61 @@
'dependencies': [
'opus'
],
'sources': [
'src/src/opus_compare.c',
],
}, # target opus_compare
{
'target_name': 'opus_demo',
'type': 'executable',
'dependencies': [
'opus'
'conditions': [
['OS == "win"', {
'defines': [
'inline=__inline',
],
'sources': [
'src/src/opus_demo.c',
}],
['OS=="android"', {
'link_settings': {
'libraries': [
'-llog',
],
}, # target opus_demo
{
'target_name': 'test_opus_api',
'type': 'executable',
'dependencies': [
'opus'
},
}],
['clang==1', {
'cflags': [ '-Wno-absolute-value' ],
}]
],
'sources': [
'src/tests/test_opus_api.c',
],
}, # target test_opus_api
{
'target_name': 'test_opus_encode',
'type': 'executable',
'dependencies': [
'opus'
'src/src/opus_compare.c',
],
'sources': [
'src/tests/test_opus_encode.c',
'include_dirs': [
'src/celt',
'src/silk',
],
}, # target test_opus_encode
}, # target opus_compare
{
'target_name': 'test_opus_decode',
'target_name': 'opus_demo',
'type': 'executable',
'dependencies': [
'opus'
],
'sources': [
'src/tests/test_opus_decode.c',
],
# test_opus_decode passes a null pointer to opus_decode() for an argument
# marked as requiring a non-null value by the nonnull function attribute,
# and expects opus_decode() to fail. Disable the -Wnonnull option to avoid
# a compilation error if -Werror is specified.
'conditions': [
['os_posix==1 and OS!="mac" and OS!="ios"', {
'cflags': ['-Wno-nonnull'],
['OS == "win"', {
'defines': [
'inline=__inline',
],
}],
['OS=="mac" or OS=="ios"', {
'xcode_settings': {
'WARNING_CFLAGS': ['-Wno-nonnull'],
['OS=="android"', {
'link_settings': {
'libraries': [
'-llog',
],
},
}],
],
}, # target test_opus_decode
{
'target_name': 'test_opus_padding',
'type': 'executable',
'dependencies': [
'opus'
['clang==1', {
'cflags': [ '-Wno-absolute-value' ],
}]
],
'sources': [
'src/tests/test_opus_padding.c',
'src/src/opus_demo.c',
],
}, # target test_opus_padding
'include_dirs': [
'src/celt',
'src/silk',
],
}, # target opus_demo
]
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment