-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5621 from priankakariatyml:audio-classifier-impl
PiperOrigin-RevId: 675668704
- Loading branch information
Showing
4 changed files
with
557 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
load( | ||
"@build_bazel_rules_apple//apple:ios.bzl", | ||
"ios_unit_test", | ||
) | ||
load( | ||
"@org_tensorflow//tensorflow/lite:special_rules.bzl", | ||
"tflite_ios_lab_runner", | ||
) | ||
load( | ||
"//mediapipe/framework/tool:ios.bzl", | ||
"MPP_TASK_MINIMUM_OS_VERSION", | ||
) | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
licenses(["notice"]) | ||
|
||
# Default tags for filtering iOS targets. Targets are restricted to Apple platforms. | ||
TFL_DEFAULT_TAGS = [ | ||
"apple", | ||
] | ||
|
||
# Following sanitizer tests are not supported by iOS test targets. | ||
TFL_DISABLED_SANITIZER_TAGS = [ | ||
"noasan", | ||
"nomsan", | ||
"notsan", | ||
] | ||
|
||
objc_library( | ||
name = "MPPAudioClassifierObjcTestLibrary", | ||
testonly = 1, | ||
srcs = ["MPPAudioClassifierTests.mm"], | ||
copts = [ | ||
"-ObjC++", | ||
"-std=c++17", | ||
"-x objective-c++", | ||
], | ||
data = [ | ||
"//mediapipe/tasks/testdata/audio:test_audio_clips", | ||
"//mediapipe/tasks/testdata/audio:test_models", | ||
], | ||
deps = [ | ||
"//mediapipe/tasks/ios/audio/audio_classifier:MPPAudioClassifier", | ||
"//mediapipe/tasks/ios/audio/core:MPPAudioData", | ||
"//mediapipe/tasks/ios/common:MPPCommon", | ||
"//mediapipe/tasks/ios/common/utils:NSStringHelpers", | ||
"//mediapipe/tasks/ios/test/audio/core/utils:AVAudioPCMBufferTestUtils", | ||
"//mediapipe/tasks/ios/test/utils:MPPFileInfo", | ||
"//third_party/apple_frameworks:XCTest", | ||
], | ||
) | ||
|
||
ios_unit_test( | ||
name = "MPPAudioClassifierObjcTest", | ||
minimum_os_version = MPP_TASK_MINIMUM_OS_VERSION, | ||
runner = tflite_ios_lab_runner("IOS_LATEST"), | ||
tags = TFL_DEFAULT_TAGS + TFL_DISABLED_SANITIZER_TAGS, | ||
deps = [ | ||
":MPPAudioClassifierObjcTestLibrary", | ||
], | ||
) |
Oops, something went wrong.