| 
									
										
										
										
											2021-09-04 09:00:15 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-02 17:10:35 +08:00
										 |  |  | # If you want to test a single file with single case, you can try this command: | 
					
						
							|  |  |  | # RUST_LOG="debug" flutter test -j, --concurrency=1 'path to the file' --name 'test case name' | 
					
						
							| 
									
										
										
										
											2023-04-04 08:41:16 +08:00
										 |  |  | [tasks.flutter_test] | 
					
						
							|  |  |  | description = "Run flutter test with single case in single file. Input: cargo make flutter_test 'path to the file' --name 'test case name'" | 
					
						
							|  |  |  | script = ''' | 
					
						
							|  |  |  | cd appflowy_flutter | 
					
						
							|  |  |  | RUST_LOG="debug" flutter test -j, --concurrency=1 "${@}" | 
					
						
							|  |  |  | ''' | 
					
						
							|  |  |  | script_runner = "@shell" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-01-02 12:31:31 +08:00
										 |  |  | [tasks.dart_unit_test] | 
					
						
							| 
									
										
										
										
											2023-01-01 23:26:27 +08:00
										 |  |  | script = ''' | 
					
						
							| 
									
										
										
										
											2023-04-17 06:49:55 +05:30
										 |  |  | cargo make --profile test-macos-$(uname -m) run_dart_unit_test | 
					
						
							| 
									
										
										
										
											2023-01-01 23:26:27 +08:00
										 |  |  | ''' | 
					
						
							| 
									
										
										
										
											2023-01-02 12:31:31 +08:00
										 |  |  | script_runner = "@shell" | 
					
						
							| 
									
										
										
										
											2023-01-01 23:26:27 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | [tasks.dart_unit_test.windows] | 
					
						
							|  |  |  | script = ''' | 
					
						
							| 
									
										
										
										
											2023-03-04 08:59:40 +08:00
										 |  |  | cargo make --profile test-windows run_dart_unit_test | 
					
						
							| 
									
										
										
										
											2023-01-01 23:26:27 +08:00
										 |  |  | ''' | 
					
						
							| 
									
										
										
										
											2023-01-02 12:31:31 +08:00
										 |  |  | script_runner = "@shell" | 
					
						
							| 
									
										
										
										
											2023-01-01 23:26:27 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-01-05 15:25:30 +08:00
										 |  |  | [tasks.dart_unit_test.linux] | 
					
						
							|  |  |  | script = ''' | 
					
						
							| 
									
										
										
										
											2023-03-04 08:59:40 +08:00
										 |  |  | cargo make --profile test-linux run_dart_unit_test | 
					
						
							| 
									
										
										
										
											2023-01-05 15:25:30 +08:00
										 |  |  | ''' | 
					
						
							|  |  |  | script_runner = "@shell" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-04 08:59:40 +08:00
										 |  |  | [tasks.run_dart_unit_test] | 
					
						
							| 
									
										
										
										
											2023-02-27 19:00:00 +08:00
										 |  |  | env = { RUST_LOG = "info" } | 
					
						
							| 
									
										
										
										
											2023-05-02 17:10:35 +08:00
										 |  |  | dependencies = ["inner_build_test_backend"] | 
					
						
							| 
									
										
										
										
											2022-10-26 22:36:34 +08:00
										 |  |  | description = "Run flutter unit tests" | 
					
						
							|  |  |  | script = ''' | 
					
						
							| 
									
										
										
										
											2023-02-26 16:27:17 +08:00
										 |  |  | cd appflowy_flutter | 
					
						
							| 
									
										
										
										
											2023-06-22 21:22:46 +08:00
										 |  |  | flutter test --dart-define=RUST_LOG=${RUST_LOG} -j, --concurrency=1 --coverage | 
					
						
							| 
									
										
										
										
											2022-10-26 22:36:34 +08:00
										 |  |  | ''' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-05-27 20:26:33 +08:00
										 |  |  | [tasks.rust_unit_test] | 
					
						
							|  |  |  | run_task = { name = ["rust_lib_unit_test", "shared_lib_unit_test"] } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-29 09:46:24 +08:00
										 |  |  | [tasks.supabase_unit_test] | 
					
						
							|  |  |  | env = { RUST_LOG = "info" } | 
					
						
							| 
									
										
										
										
											2023-07-05 20:57:09 +08:00
										 |  |  | description = "Run cloud unit tests" | 
					
						
							|  |  |  | script = ''' | 
					
						
							|  |  |  | cd rust-lib/flowy-test | 
					
						
							| 
									
										
										
										
											2023-07-29 09:46:24 +08:00
										 |  |  | RUST_BACKTRACE=1 cargo test supabase_ --features "cloud_test" | 
					
						
							| 
									
										
										
										
											2023-07-05 20:57:09 +08:00
										 |  |  | ''' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-05-27 20:26:33 +08:00
										 |  |  | [tasks.rust_lib_unit_test] | 
					
						
							| 
									
										
										
										
											2023-02-02 23:02:49 +08:00
										 |  |  | env = { RUST_LOG = "info" } | 
					
						
							| 
									
										
										
										
											2022-05-27 20:26:33 +08:00
										 |  |  | description = "Run rust-lib unit tests" | 
					
						
							| 
									
										
										
										
											2021-09-04 09:00:15 +08:00
										 |  |  | script = ''' | 
					
						
							|  |  |  | cd rust-lib | 
					
						
							| 
									
										
										
										
											2023-07-05 20:57:09 +08:00
										 |  |  | RUST_LOG=info RUST_BACKTRACE=1 cargo test --no-default-features --features "rev-sqlite" | 
					
						
							| 
									
										
										
										
											2021-09-04 09:00:15 +08:00
										 |  |  | ''' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-05-27 20:26:33 +08:00
										 |  |  | [tasks.shared_lib_unit_test] | 
					
						
							| 
									
										
										
										
											2023-02-02 23:02:49 +08:00
										 |  |  | env = { RUST_LOG = "info" } | 
					
						
							| 
									
										
										
										
											2022-05-27 20:26:33 +08:00
										 |  |  | description = "Run shared-lib unit test" | 
					
						
							|  |  |  | script = ''' | 
					
						
							|  |  |  | cd ../shared-lib | 
					
						
							| 
									
										
										
										
											2023-01-02 12:31:31 +08:00
										 |  |  | cargo test --no-default-features | 
					
						
							| 
									
										
										
										
											2022-05-27 20:26:33 +08:00
										 |  |  | ''' | 
					
						
							| 
									
										
										
										
											2021-09-04 09:00:15 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-11 04:54:31 -07:00
										 |  |  | [tasks.check_grcov] | 
					
						
							|  |  |  | description = "Check if `grcov` is installled" | 
					
						
							|  |  |  | script_runner = "@shell" | 
					
						
							|  |  |  | script = ''' | 
					
						
							|  |  |  | export PATH=$PATH:"$HOME/.cargo/bin/" | 
					
						
							|  |  |  | if command -v grcov > /dev/null; then | 
					
						
							|  |  |  |   echo "Found 'grcov' executable." | 
					
						
							|  |  |  | else | 
					
						
							|  |  |  |   echo "[!] Could not find 'grcov' executable." | 
					
						
							|  |  |  |   echo "[!] Please install 'grcov' by running 'cargo install grcov'." | 
					
						
							|  |  |  |   echo "[!] You may also need to install 'llvm-tools-preview' using 'rustup component add llvm-tools-preview'." | 
					
						
							|  |  |  |   echo "[!] If installed, check if 'grcov' is in PATH." | 
					
						
							|  |  |  |   echo "[!] Exiting..." | 
					
						
							|  |  |  |   exit -1 | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | ''' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [tasks.clean_profraw_files] | 
					
						
							|  |  |  | description = "Cleans profraw files that are created by `cargo test`" | 
					
						
							|  |  |  | script_runner = "@duckscript" | 
					
						
							| 
									
										
										
										
											2023-02-02 23:02:49 +08:00
										 |  |  | script = [""" | 
					
						
							| 
									
										
										
										
											2022-10-11 04:54:31 -07:00
										 |  |  |   rust_lib_profs = glob_array ./rust-lib/**/*.profraw | 
					
						
							|  |  |  |   for prof in ${rust_lib_profs} | 
					
						
							|  |  |  |     full_path = canonicalize ${prof} | 
					
						
							|  |  |  |     rm ${full_path} | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   shared_lib_profs = glob_array ../shared-lib/**/*.profraw | 
					
						
							|  |  |  |   for prof in ${shared_lib_profs} | 
					
						
							|  |  |  |     full_path = canonicalize ${prof} | 
					
						
							|  |  |  |     rm ${full_path} | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-02-02 23:02:49 +08:00
										 |  |  |   """] | 
					
						
							| 
									
										
										
										
											2022-10-11 04:54:31 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | [tasks.run_rustlib_coverage_tests] | 
					
						
							|  |  |  | description = "Run tests with coverage instrumentation" | 
					
						
							|  |  |  | script_runner = "@shell" | 
					
						
							| 
									
										
										
										
											2023-02-02 23:02:49 +08:00
										 |  |  | script = [""" | 
					
						
							| 
									
										
										
										
											2022-10-11 04:54:31 -07:00
										 |  |  |   echo --- Running coverage tests --- | 
					
						
							|  |  |  |   cd rust-lib/ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   CARGO_INCREMENTAL=0 \ | 
					
						
							|  |  |  |   RUSTFLAGS='-C instrument-coverage' \ | 
					
						
							|  |  |  |   LLVM_PROFILE_FILE='prof-%p-%m.profraw' \ | 
					
						
							| 
									
										
										
										
											2023-05-17 09:49:39 +08:00
										 |  |  |   cargo test --no-default-features --features="rev-sqlite" | 
					
						
							| 
									
										
										
										
											2023-02-02 23:02:49 +08:00
										 |  |  |   """] | 
					
						
							| 
									
										
										
										
											2022-10-11 04:54:31 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | [tasks.run_sharedlib_coverage_tests] | 
					
						
							|  |  |  | description = "Run tests with coverage instrumentation" | 
					
						
							|  |  |  | script_runner = "@shell" | 
					
						
							| 
									
										
										
										
											2023-02-02 23:02:49 +08:00
										 |  |  | script = [""" | 
					
						
							| 
									
										
										
										
											2022-10-11 04:54:31 -07:00
										 |  |  |   echo --- Running coverage tests --- | 
					
						
							|  |  |  |   cd ../shared-lib | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   CARGO_INCREMENTAL=0 \ | 
					
						
							|  |  |  |   RUSTFLAGS='-C instrument-coverage' \ | 
					
						
							|  |  |  |   LLVM_PROFILE_FILE='prof-%p-%m.profraw' \ | 
					
						
							| 
									
										
										
										
											2022-12-19 10:47:40 +08:00
										 |  |  |   cargo test --no-default-features | 
					
						
							| 
									
										
										
										
											2022-10-11 04:54:31 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-02-02 23:02:49 +08:00
										 |  |  |   """] | 
					
						
							| 
									
										
										
										
											2022-10-11 04:54:31 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | [tasks.get_rustlib_grcov_report] | 
					
						
							|  |  |  | description = "Get `grcov` HTML report for test coverage for rust-lib" | 
					
						
							|  |  |  | script_runner = "@shell" | 
					
						
							|  |  |  | script = [ | 
					
						
							|  |  |  |   """ | 
					
						
							| 
									
										
										
										
											2022-12-19 10:47:40 +08:00
										 |  |  |   echo --- Getting 'grcov' results for 'rust-lib' --- | 
					
						
							| 
									
										
										
										
											2022-10-11 04:54:31 -07:00
										 |  |  |   cd rust-lib/ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   grcov . \ | 
					
						
							|  |  |  |   --binary-path target/debug/deps \ | 
					
						
							|  |  |  |   --source-dir . \ | 
					
						
							|  |  |  |   --output-type html \ | 
					
						
							|  |  |  |   --branch \ | 
					
						
							|  |  |  |   --ignore-not-existing \ | 
					
						
							|  |  |  |   --log-level WARN \ | 
					
						
							|  |  |  |   --output-path target/coverage-html | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   echo "--- Done! Generated HTML report under 'target/coverage-html' for rustlib." | 
					
						
							| 
									
										
										
										
											2023-02-02 23:02:49 +08:00
										 |  |  |   """, | 
					
						
							| 
									
										
										
										
											2022-10-11 04:54:31 -07:00
										 |  |  | ] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [tasks.get_sharedlib_grcov_report] | 
					
						
							|  |  |  | description = "Get `grcov` HTML report for test coverage shared-lib" | 
					
						
							|  |  |  | script_runner = "@shell" | 
					
						
							|  |  |  | script = [ | 
					
						
							|  |  |  |   """ | 
					
						
							| 
									
										
										
										
											2022-12-19 10:47:40 +08:00
										 |  |  |   echo --- Getting 'grcov' results 'shared-lib' --- | 
					
						
							| 
									
										
										
										
											2022-10-11 04:54:31 -07:00
										 |  |  |   cd ../shared-lib | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   grcov . \ | 
					
						
							|  |  |  |   --binary-path target/debug/deps \ | 
					
						
							|  |  |  |   --source-dir . \ | 
					
						
							|  |  |  |   --output-type html \ | 
					
						
							|  |  |  |   --branch \ | 
					
						
							|  |  |  |   --ignore-not-existing \ | 
					
						
							|  |  |  |   --log-level WARN \ | 
					
						
							|  |  |  |   --output-path target/coverage-html | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   echo "--- Done! Generated HTML report under 'target/coverage-html' for sharedlib." | 
					
						
							| 
									
										
										
										
											2023-02-02 23:02:49 +08:00
										 |  |  |   """, | 
					
						
							| 
									
										
										
										
											2022-10-11 04:54:31 -07:00
										 |  |  | ] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [tasks.get_grcov_report] | 
					
						
							|  |  |  | description = "Get `grcov` HTML report for test coverage" | 
					
						
							|  |  |  | run_task = { name = [ | 
					
						
							|  |  |  |   "get_rustlib_grcov_report", | 
					
						
							| 
									
										
										
										
											2023-02-02 23:02:49 +08:00
										 |  |  |   "get_sharedlib_grcov_report", | 
					
						
							| 
									
										
										
										
											2022-10-11 04:54:31 -07:00
										 |  |  | ], parallel = true } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [tasks.get_sharedlib_lcov_report] | 
					
						
							|  |  |  | description = "Generates `lcov` report for `shared-lib`" | 
					
						
							|  |  |  | script_runner = "@shell" | 
					
						
							| 
									
										
										
										
											2023-02-02 23:02:49 +08:00
										 |  |  | script = [""" | 
					
						
							| 
									
										
										
										
											2022-10-11 04:54:31 -07:00
										 |  |  |   echo Getting 'lcov' results for 'shared-lib' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   cd ../shared-lib | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   grcov . \ | 
					
						
							|  |  |  |   --binary-path target/debug/deps \ | 
					
						
							|  |  |  |   --source-dir . \ | 
					
						
							|  |  |  |   --output-type lcov \ | 
					
						
							|  |  |  |   --branch \ | 
					
						
							|  |  |  |   --ignore-not-existing \ | 
					
						
							|  |  |  |   --log-level WARN \ | 
					
						
							|  |  |  |   --output-path target/coverage.lcov | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   echo "--- Done! Generated 'target/coverage.lcov' sharedlib." | 
					
						
							| 
									
										
										
										
											2023-02-02 23:02:49 +08:00
										 |  |  |   """] | 
					
						
							| 
									
										
										
										
											2022-10-11 04:54:31 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | [tasks.get_rustlib_lcov_report] | 
					
						
							|  |  |  | description = "Generates `lcov` report for `rust-lib`" | 
					
						
							|  |  |  | script_runner = "@shell" | 
					
						
							| 
									
										
										
										
											2023-02-02 23:02:49 +08:00
										 |  |  | script = [""" | 
					
						
							| 
									
										
										
										
											2022-10-11 04:54:31 -07:00
										 |  |  |   echo Getting 'lcov' results for 'rust-lib' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   cd rust-lib/ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   grcov . \ | 
					
						
							|  |  |  |   --binary-path target/debug/deps \ | 
					
						
							|  |  |  |   --source-dir . \ | 
					
						
							|  |  |  |   --output-type lcov \ | 
					
						
							|  |  |  |   --branch \ | 
					
						
							|  |  |  |   --ignore-not-existing \ | 
					
						
							|  |  |  |   --log-level WARN \ | 
					
						
							|  |  |  |   --output-path target/coverage.lcov | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   echo "--- Done! Generated 'target/coverage.lcov' for rustlib." | 
					
						
							| 
									
										
										
										
											2023-02-02 23:02:49 +08:00
										 |  |  |   """] | 
					
						
							| 
									
										
										
										
											2022-10-11 04:54:31 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | [tasks.get_lcov_report] | 
					
						
							|  |  |  | description = "Get `lcov` reports for test coverage" | 
					
						
							|  |  |  | run_task = { name = [ | 
					
						
							|  |  |  |   "get_sharedlib_lcov_report", | 
					
						
							| 
									
										
										
										
											2023-02-02 23:02:49 +08:00
										 |  |  |   "get_rustlib_lcov_report", | 
					
						
							| 
									
										
										
										
											2022-10-11 04:54:31 -07:00
										 |  |  | ], parallel = true } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-19 10:47:40 +08:00
										 |  |  | [tasks.rust_unit_test_with_coverage] | 
					
						
							|  |  |  | description = "Run rust unit test with code coverage" | 
					
						
							| 
									
										
										
										
											2022-10-11 04:54:31 -07:00
										 |  |  | run_task = { name = [ | 
					
						
							| 
									
										
										
										
											2023-02-02 23:02:49 +08:00
										 |  |  |   "check_grcov", | 
					
						
							|  |  |  |   'appflowy-flutter-deps-tools', | 
					
						
							|  |  |  |   "run_rustlib_coverage_tests", | 
					
						
							|  |  |  |   "run_sharedlib_coverage_tests", | 
					
						
							|  |  |  |   "get_lcov_report", | 
					
						
							|  |  |  |   "clean_profraw_files", | 
					
						
							|  |  |  | ] } | 
					
						
							| 
									
										
										
										
											2023-05-02 17:10:35 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [tasks.build_test_backend] | 
					
						
							|  |  |  | script = ''' | 
					
						
							|  |  |  | cargo make --profile test-macos-$(uname -m) inner_build_test_backend | 
					
						
							|  |  |  | ''' | 
					
						
							|  |  |  | script_runner = "@shell" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [tasks.build_test_backend.windows] | 
					
						
							|  |  |  | script = ''' | 
					
						
							|  |  |  | cargo make --profile test-windows inner_build_test_backend | 
					
						
							|  |  |  | ''' | 
					
						
							|  |  |  | script_runner = "@shell" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [tasks.build_test_backend.linux] | 
					
						
							|  |  |  | script = ''' | 
					
						
							|  |  |  | cargo make --profile test-linux inner_build_test_backend | 
					
						
							|  |  |  | ''' | 
					
						
							|  |  |  | script_runner = "@shell" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [tasks.inner_build_test_backend] | 
					
						
							|  |  |  | category = "Build" | 
					
						
							|  |  |  | dependencies = ["env_check"] | 
					
						
							|  |  |  | run_task = { name = [ | 
					
						
							|  |  |  |   "setup-test-crate-type", | 
					
						
							|  |  |  |   "compile_test_backend", | 
					
						
							|  |  |  |   "copy-to-sandbox-folder", | 
					
						
							|  |  |  |   "restore-test-crate-type", | 
					
						
							|  |  |  | ] } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [tasks.compile_test_backend] | 
					
						
							|  |  |  | mac_alias = "compile_test_backend_default" | 
					
						
							|  |  |  | windows_alias = "compile_test_backend_windows" | 
					
						
							|  |  |  | linux_alias = "compile_test_backend_default" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [tasks.compile_test_backend_default] | 
					
						
							|  |  |  | private = true | 
					
						
							|  |  |  | script = [ | 
					
						
							|  |  |  |   """ | 
					
						
							|  |  |  |     cd rust-lib/ | 
					
						
							|  |  |  |     rustup show | 
					
						
							|  |  |  |     echo RUST_LOG=${RUST_LOG} cargo build --package=dart-ffi --target ${TEST_COMPILE_TARGET} --features "${FLUTTER_DESKTOP_FEATURES}" | 
					
						
							|  |  |  |     RUST_LOG=${RUST_LOG} cargo build --package=dart-ffi --target ${TEST_COMPILE_TARGET} --features "${FLUTTER_DESKTOP_FEATURES}" | 
					
						
							|  |  |  |     cd ../ | 
					
						
							|  |  |  |   """, | 
					
						
							|  |  |  | ] | 
					
						
							|  |  |  | script_runner = "@shell" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [tasks.compile_test_backend_windows] | 
					
						
							|  |  |  | private = true | 
					
						
							|  |  |  | script = [ | 
					
						
							|  |  |  |   """ | 
					
						
							|  |  |  |     cd rust-lib/ | 
					
						
							|  |  |  |     rustup show | 
					
						
							|  |  |  |     echo cargo build --package=dart-ffi --target ${TEST_COMPILE_TARGET} --features "${FLUTTER_DESKTOP_FEATURES}" | 
					
						
							|  |  |  |     RUST_LOG=${RUST_LOG} cargo build --package=dart-ffi --target ${TEST_COMPILE_TARGET} --features "${FLUTTER_DESKTOP_FEATURES}" | 
					
						
							|  |  |  |     cd ../ | 
					
						
							|  |  |  |   """, | 
					
						
							|  |  |  | ] | 
					
						
							|  |  |  | script_runner = "@shell" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [tasks.copy-to-sandbox-folder] | 
					
						
							|  |  |  | mac_alias = "copy-to-sandbox-folder-default" | 
					
						
							|  |  |  | windows_alias = "copy-to-sandbox-folder-windows" | 
					
						
							|  |  |  | linux_alias = "copy-to-sandbox-folder-default" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [tasks.copy-to-sandbox-folder-windows] | 
					
						
							|  |  |  | private = true | 
					
						
							|  |  |  | script = [ | 
					
						
							|  |  |  |   """ | 
					
						
							|  |  |  |     # Copy the appflowy_backend lib to system temp directory for flutter unit test. | 
					
						
							|  |  |  |     lib = set ${LIB_NAME}.${TEST_LIB_EXT} | 
					
						
							|  |  |  |     dest = set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/appflowy_flutter/.sandbox/${lib} | 
					
						
							|  |  |  |     rm ${dest} | 
					
						
							|  |  |  |     cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/${TEST_COMPILE_TARGET}/${TEST_BUILD_FLAG}/${lib} \ | 
					
						
							|  |  |  |     ${dest} | 
					
						
							|  |  |  |   """, | 
					
						
							|  |  |  | ] | 
					
						
							|  |  |  | script_runner = "@duckscript" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [tasks.copy-to-sandbox-folder-default] | 
					
						
							|  |  |  | private = true | 
					
						
							|  |  |  | script = [ | 
					
						
							|  |  |  |   """ | 
					
						
							|  |  |  |     # Copy the appflowy_backend lib to system temp directory for flutter unit test. | 
					
						
							|  |  |  |     lib = set lib${LIB_NAME}.${TEST_LIB_EXT} | 
					
						
							|  |  |  |     dest = set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/appflowy_flutter/.sandbox/${lib} | 
					
						
							|  |  |  |     rm ${dest} | 
					
						
							|  |  |  |     cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/${TEST_COMPILE_TARGET}/${TEST_BUILD_FLAG}/${lib} \ | 
					
						
							|  |  |  |     ${dest} | 
					
						
							|  |  |  |   """, | 
					
						
							|  |  |  | ] | 
					
						
							|  |  |  | script_runner = "@duckscript" |