Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/scripts/unittest-macos-buck2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# LICENSE file in the root directory of this source tree.
set -eux

buck2 test //extension/apple:ExecuTorch
buck2 test //extension/apple:ExecuTorchTests
2 changes: 1 addition & 1 deletion .ci/scripts/unittest-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if [[ "$BUILD_TOOL" == "cmake" ]]; then
.ci/scripts/unittest-macos-cmake.sh
elif [[ "$BUILD_TOOL" == "buck2" ]]; then
.ci/scripts/unittest-buck2.sh
# .ci/scripts/unittest-macos-buck2.sh
.ci/scripts/unittest-macos-buck2.sh
else
echo "Unknown build tool $BUILD_TOOL"
exit 1
Expand Down
6 changes: 6 additions & 0 deletions extension/apple/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>
65 changes: 64 additions & 1 deletion extension/apple/TARGETS
Original file line number Diff line number Diff line change
@@ -1 +1,64 @@
# This file needs to exist to avoid build system breakage, see https://fburl.com/workplace/jtdlgdmd
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

# This is a custom Buck file to run the Apple extension tests.

apple_library(
name = "ExecuTorch",
modular = True,
srcs = glob([
"ExecuTorch/Exported/*.m",
"ExecuTorch/Exported/*.mm",
"ExecuTorch/Internal/*.m",
"ExecuTorch/Internal/*.mm",
]),
exported_headers = glob([
"ExecuTorch/Exported/*.h",
]),
headers = glob([
"ExecuTorch/Internal/*.h",
]),
include_directories = [
"ExecuTorch/Exported",
"ExecuTorch/Internal",
],
frameworks = [
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
],
compiler_flags = [
"-DET_LOG_ENABLED=1",
"-fobjc-arc",
"-fno-exceptions",
"-fno-rtti",
],
deps = [
"//xplat/executorch/extension/module:moduleApple",
"//xplat/executorch/extension/tensor:tensorApple",
"//xplat/executorch/runtime/platform:platformApple",
],
)

apple_resource(
name = "ExecuTorchTestResource",
files = glob([
"ExecuTorch/__tests__/resources/*.pte",
]),
)

apple_test(
name = "ExecuTorchTests",
srcs = glob([
"ExecuTorch/__tests__/*.swift",
]),
frameworks = [
"$SDKROOT/System/Library/Frameworks/XCTest.framework",
],
info_plist = "Info.plist",
deps = [
":ExecuTorch",
":ExecuTorchTestResource",
],
)
Loading