Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

fix: seperating env for mac test depending upon archs (#2265)

Samiksha Garg43a8335fd455
diff --git a/frontend/Makefile.toml b/frontend/Makefile.toml
index c7ac53e5c3..f9b5e0dd99 100644
--- a/frontend/Makefile.toml
+++ b/frontend/Makefile.toml
@@ -205,12 +205,17 @@ script = [
]
script_runner = "@duckscript"
-[env.test-macos]
+[env.test-macos-x86_64]
TEST_CRATE_TYPE = "cdylib"
TEST_LIB_EXT = "dylib"
# For the moment, the DynamicLibrary only supports open x86_64 architectures binary.
TEST_COMPILE_TARGET = "x86_64-apple-darwin"
+[env.test-macos-arm64]
+TEST_CRATE_TYPE = "cdylib"
+TEST_LIB_EXT = "dylib"
+TEST_COMPILE_TARGET = "aarch64-apple-darwin"
+
[env.test-linux]
TEST_CRATE_TYPE = "cdylib"
TEST_LIB_EXT = "so"
diff --git a/frontend/scripts/makefile/tests.toml b/frontend/scripts/makefile/tests.toml
index 3f85eaa75e..1ab206ea8a 100644
--- a/frontend/scripts/makefile/tests.toml
+++ b/frontend/scripts/makefile/tests.toml
@@ -1,7 +1,7 @@
[tasks.dart_unit_test]
script = '''
-cargo make --profile test-macos run_dart_unit_test
+cargo make --profile test-macos-$(uname -m) run_dart_unit_test
'''
script_runner = "@shell"