From 8749087c5035fbe4c0dce0893a39e0e2265fa130 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sat, 20 Jun 2026 00:51:17 +0800 Subject: Update test-all.sh --- dev_tools/scripts/test-all.ps1 | 8 ++++++++ dev_tools/scripts/test-all.sh | 6 ++++++ 2 files changed, 14 insertions(+) create mode 100644 dev_tools/scripts/test-all.ps1 create mode 100644 dev_tools/scripts/test-all.sh diff --git a/dev_tools/scripts/test-all.ps1 b/dev_tools/scripts/test-all.ps1 new file mode 100644 index 0000000..231698a --- /dev/null +++ b/dev_tools/scripts/test-all.ps1 @@ -0,0 +1,8 @@ +$starting_dir = Get-Location +Get-ChildItem -Recurse -Filter "Cargo.toml" | ForEach-Object { + $project_dir = $_.DirectoryName + Push-Location $project_dir + cargo test + Pop-Location +} +Set-Location $starting_dir diff --git a/dev_tools/scripts/test-all.sh b/dev_tools/scripts/test-all.sh new file mode 100644 index 0000000..b387463 --- /dev/null +++ b/dev_tools/scripts/test-all.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +find . -name "Cargo.toml" -type f | while read -r cargo_file; do + project_dir=$(dirname "$cargo_file") + (cd "$project_dir" && cargo test) +done -- cgit