✅ test(lsp_server): update test scripts and tsf cases
This commit is contained in:
@@ -19,16 +19,16 @@ find_test_symbol() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
find "$search_dir" -type f -name test_symbol -path "*/test/test_symbol/*" -print -quit 2>/dev/null
|
||||
find "$search_dir" -type f -name test_symbol \( -path "*/test/test_symbol" -o -path "*/test/test_symbol/*" \) -print -quit 2>/dev/null
|
||||
}
|
||||
|
||||
BUILD_PRESET=${BUILD_PRESET:-clang-ninja}
|
||||
TEST_SYMBOL="${TEST_SYMBOL_OVERRIDE:-$(find "$REPO_ROOT/build/$BUILD_PRESET" -type f -name test_symbol -path "*/test/test_symbol/*" -print -quit 2>/dev/null)}"
|
||||
IGNORES=("IDS_AuditExpr.tsf")
|
||||
|
||||
# 需要测试的目录列表(可以自行添加)
|
||||
DIRECTORIES=(
|
||||
"$REPO_ROOT/test/test_tree_sitter/test"
|
||||
"$HOME/windows_share/tsf"
|
||||
# "./another_directory"
|
||||
)
|
||||
|
||||
@@ -86,6 +86,9 @@ while [[ $# -gt 0 ]]; do
|
||||
esac
|
||||
done
|
||||
|
||||
# 解析参数后再定位 test_symbol
|
||||
TEST_SYMBOL="${TEST_SYMBOL_OVERRIDE:-$(find_test_symbol "$REPO_ROOT/build/$BUILD_PRESET")}"
|
||||
|
||||
# 检查 test_symbol 是否存在
|
||||
if [ -z "$TEST_SYMBOL" ] || [ ! -f "$TEST_SYMBOL" ]; then
|
||||
echo -e "${RED}错误: 找不到 test_symbol 可执行文件${NC}"
|
||||
|
||||
Reference in New Issue
Block a user