Revert "Update NetEq bitexactness tests to only run on Linux."

This reverts commit a37384899bfc8110afc81ae5ff3e9fad01a24ad1.

Reason for revert: It breaks some downstream tests, let's reland on Monday adding a fix for them as well (Mac M1 is still broken).

Original change's description:
> Update NetEq bitexactness tests to only run on Linux.
>
> Running bitexactness tests only on Linux makes it significantly easier to
> update them, while still giving many of the same benefits.
>
> Bug: webrtc:12518, b/216736217
> Change-Id: I7f3c9a27c0fc14b7ee0e83aede2e7702cfa79141
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249787
> Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
> Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35829}

TBR=mbonadei@webrtc.org,ivoc@webrtc.org,titovartem@webrtc.org,jakobi@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I53e3d18d53949eb9dded9ce29de99e091a480705
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:12518, b/216736217
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249980
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35836}
This commit is contained in:
Mirko Bonadei
2022-01-29 15:28:18 +00:00
committed by WebRTC LUCI CQ
parent 3f42fdf19f
commit 2d218323c8
2 changed files with 312 additions and 85 deletions

View File

@ -44,10 +44,36 @@ ABSL_FLAG(bool, gen_ref, false, "Generate reference files.");
namespace webrtc {
#if defined(WEBRTC_LINUX) && defined(WEBRTC_ARCH_X86_64) && \
defined(WEBRTC_NETEQ_UNITTEST_BITEXACT) && \
(defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \
defined(WEBRTC_CODEC_ILBC)
namespace {
const std::string& PlatformChecksum(const std::string& checksum_general,
const std::string& checksum_android_32,
const std::string& checksum_android_64,
const std::string& checksum_win_32,
const std::string& checksum_win_64) {
#if defined(WEBRTC_ANDROID)
#ifdef WEBRTC_ARCH_64_BITS
return checksum_android_64;
#else
return checksum_android_32;
#endif // WEBRTC_ARCH_64_BITS
#elif defined(WEBRTC_WIN)
#ifdef WEBRTC_ARCH_64_BITS
return checksum_win_64;
#else
return checksum_win_32;
#endif // WEBRTC_ARCH_64_BITS
#else
return checksum_general;
#endif // WEBRTC_WIN
}
} // namespace
#if !defined(WEBRTC_IOS) && defined(WEBRTC_NETEQ_UNITTEST_BITEXACT) && \
(defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \
defined(WEBRTC_CODEC_ILBC) && !defined(WEBRTC_ARCH_ARM64)
#define MAYBE_TestBitExactness TestBitExactness
#else
#define MAYBE_TestBitExactness DISABLED_TestBitExactness
@ -57,50 +83,66 @@ TEST_F(NetEqDecodingTest, MAYBE_TestBitExactness) {
webrtc::test::ResourcePath("audio_coding/neteq_universal_new", "rtp");
const std::string output_checksum =
"ba4fae83a52f5e9d95b0910f05d540114285697b";
PlatformChecksum("ba4fae83a52f5e9d95b0910f05d540114285697b",
"aa557f30f7fdcebbbbf99d7f235ccba3a1c98983", "not used",
"ba4fae83a52f5e9d95b0910f05d540114285697b",
"64b46bb3c1165537a880ae8404afce2efba456c0");
const std::string network_stats_checksum =
"fa878a8464ef1cb3d01503b7f927c3e2ce6f02c4";
PlatformChecksum("fa878a8464ef1cb3d01503b7f927c3e2ce6f02c4",
"300ccc2aaee7ed1971afb2f9a20247ed8760441d", "not used",
"fa878a8464ef1cb3d01503b7f927c3e2ce6f02c4",
"fa878a8464ef1cb3d01503b7f927c3e2ce6f02c4");
DecodeAndCompare(input_rtp_file, output_checksum, network_stats_checksum,
absl::GetFlag(FLAGS_gen_ref));
}
#if defined(WEBRTC_LINUX) && defined(WEBRTC_ARCH_X86_64) && \
defined(WEBRTC_NETEQ_UNITTEST_BITEXACT) && defined(WEBRTC_CODEC_OPUS)
#if !defined(WEBRTC_IOS) && defined(WEBRTC_NETEQ_UNITTEST_BITEXACT) && \
defined(WEBRTC_CODEC_OPUS)
#define MAYBE_TestOpusBitExactness TestOpusBitExactness
#else
#define MAYBE_TestOpusBitExactness DISABLED_TestOpusBitExactness
#endif
TEST_F(NetEqDecodingTest, MAYBE_TestOpusBitExactness) {
// TODO(http://bugs.webrtc.org/12518): Enable the test after Opus has been
// updated.
TEST_F(NetEqDecodingTest, DISABLED_TestOpusBitExactness) {
const std::string input_rtp_file =
webrtc::test::ResourcePath("audio_coding/neteq_opus", "rtp");
const std::string output_checksum =
"6e23d8827ae54ca352e1448ae363bdfd2878c78e";
const std::string maybe_sse =
"c7887ff60eecf460332c6c7a28c81561f9e8a40f"
"|673dd422cfc174152536d3b13af64f9722520ab5";
const std::string output_checksum = PlatformChecksum(
maybe_sse, "e39283dd61a89cead3786ef8642d2637cc447296",
"53d8073eb848b70974cba9e26424f4946508fd19", maybe_sse, maybe_sse);
const std::string network_stats_checksum =
"f89a9533dbb35a4c449b44c3ed120f7f1c7f90b6";
PlatformChecksum("c438bfa3b018f77691279eb9c63730569f54585c",
"8a474ed0992591e0c84f593824bb05979c3de157",
"9a05378dbf7e6edd56cdeb8ec45bcd6d8589623c",
"c438bfa3b018f77691279eb9c63730569f54585c",
"c438bfa3b018f77691279eb9c63730569f54585c");
DecodeAndCompare(input_rtp_file, output_checksum, network_stats_checksum,
absl::GetFlag(FLAGS_gen_ref));
}
#if defined(WEBRTC_LINUX) && defined(WEBRTC_ARCH_X86_64) && \
defined(WEBRTC_NETEQ_UNITTEST_BITEXACT) && defined(WEBRTC_CODEC_OPUS)
#define MAYBE_TestOpusDtxBitExactness TestOpusDtxBitExactness
#else
#define MAYBE_TestOpusDtxBitExactness DISABLED_TestOpusDtxBitExactness
#endif
TEST_F(NetEqDecodingTest, MAYBE_TestOpusDtxBitExactness) {
// TODO(http://bugs.webrtc.org/12518): Enable the test after Opus has been
// updated.
TEST_F(NetEqDecodingTest, DISABLED_TestOpusDtxBitExactness) {
const std::string input_rtp_file =
webrtc::test::ResourcePath("audio_coding/neteq_opus_dtx", "rtp");
const std::string output_checksum =
"5cea4a8e750842ac67b79e8e2ce6a0a1c01f8130";
const std::string maybe_sse =
"0fb0a3d6b3758ca6e108368bb777cd38d0a865af"
"|79cfb99a21338ba977eb0e15eb8464e2db9436f8";
const std::string output_checksum = PlatformChecksum(
maybe_sse, "b6632690f8d7c2340c838df2821fc014f1cc8360",
"f890b9eb9bc5ab8313489230726b297f6a0825af", maybe_sse, maybe_sse);
const std::string network_stats_checksum =
"dc8447b9fee1a21fd5d1f4045d62b982a3fb0215";
"18983bb67a57628c604dbdefa99574c6e0c5bb48";
DecodeAndCompare(input_rtp_file, output_checksum, network_stats_checksum,
absl::GetFlag(FLAGS_gen_ref));