Skip to content

Commit 6a9220b

Browse files
larryliu0820facebook-github-bot
authored andcommitted
Fix wav test on Apple toolchain (#15506)
Summary: As titled. Reviewed By: GregoryComer Differential Revision: D85998220
1 parent 7d18005 commit 6a9220b

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

extension/llm/runner/test/targets.bzl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
#
44
# This source code is licensed under the BSD-style license found in the
55
# LICENSE file in the root directory of this source tree.
6-
6+
load(
7+
"@fbsource//tools/build_defs:default_platform_defs.bzl",
8+
"ANDROID",
9+
"CXX",
10+
)
711
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
812

913
def define_common_targets():
@@ -63,4 +67,5 @@ def define_common_targets():
6367
"//executorch/extension/llm/runner:multimodal_runner_lib",
6468
"//executorch/runtime/platform:platform",
6569
],
70+
platforms = [CXX, ANDROID],
6671
)

extension/llm/runner/test/test_wav_loader.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,10 @@ TEST_F(WavLoaderTest, LoadAudioDataRejectsUnsupportedFormat) {
258258
const std::vector<uint8_t> wav_bytes =
259259
make_wav_bytes_with_format(0x0006, 16, sample_data);
260260
TempFile file(wav_bytes.data(), wav_bytes.size());
261-
262261
#if ET_LOG_ENABLED
263262
EXPECT_DEATH(
264263
{ load_wav_audio_data(file.path()); }, "Unsupported audio format");
265264
#else
266265
EXPECT_DEATH({ load_wav_audio_data(file.path()); }, "");
267-
#endif
266+
#endif // ET_LOG_ENABLED
268267
}

0 commit comments

Comments
 (0)