diff options
author | henrika <henrika@chromium.org> | 2015-02-03 02:53:23 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-03 10:54:07 +0000 |
commit | 870ebb78d22969468c150393e6946dab5fd95cb6 (patch) | |
tree | 5accde1e3e4c6a58a6885803d4596324c738f445 /third_party/opus | |
parent | 2fa98a5958ad5ecb86484acbeed3a05326647d4a (diff) | |
download | chromium_src-870ebb78d22969468c150393e6946dab5fd95cb6.zip chromium_src-870ebb78d22969468c150393e6946dab5fd95cb6.tar.gz chromium_src-870ebb78d22969468c150393e6946dab5fd95cb6.tar.bz2 |
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}
Diffstat (limited to 'third_party/opus')
-rw-r--r-- | third_party/opus/BUILD.gn | 120 | ||||
-rw-r--r-- | third_party/opus/opus.gyp | 117 |
2 files changed, 66 insertions, 171 deletions
diff --git a/third_party/opus/BUILD.gn b/third_party/opus/BUILD.gn index ce9bd4e..8f51d09 100644 --- a/third_party/opus/BUILD.gn +++ b/third_party/opus/BUILD.gn @@ -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", diff --git a/third_party/opus/opus.gyp b/third_party/opus/opus.gyp index 1ee104d..5fdeea6 100644 --- a/third_party/opus/opus.gyp +++ b/third_party/opus/opus.gyp @@ -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,9 +151,30 @@ 'dependencies': [ 'opus' ], + 'conditions': [ + ['OS == "win"', { + 'defines': [ + 'inline=__inline', + ], + }], + ['OS=="android"', { + 'link_settings': { + 'libraries': [ + '-llog', + ], + }, + }], + ['clang==1', { + 'cflags': [ '-Wno-absolute-value' ], + }] + ], 'sources': [ 'src/src/opus_compare.c', ], + 'include_dirs': [ + 'src/celt', + 'src/silk', + ], }, # target opus_compare { 'target_name': 'opus_demo', @@ -188,63 +182,30 @@ 'dependencies': [ 'opus' ], - 'sources': [ - 'src/src/opus_demo.c', - ], - }, # target opus_demo - { - 'target_name': 'test_opus_api', - 'type': 'executable', - 'dependencies': [ - 'opus' - ], - 'sources': [ - 'src/tests/test_opus_api.c', - ], - }, # target test_opus_api - { - 'target_name': 'test_opus_encode', - 'type': 'executable', - 'dependencies': [ - 'opus' - ], - 'sources': [ - 'src/tests/test_opus_encode.c', - ], - }, # target test_opus_encode - { - 'target_name': 'test_opus_decode', - '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', + ], + 'include_dirs': [ + 'src/celt', + 'src/silk', ], - }, # target test_opus_padding + }, # target opus_demo ] } |