Skip to content

Commit 81b243a

Browse files
committed
test(llama.cpp): require runnable quickstart lines
Signed-off-by: 游雁 <zhifu.gzf@alibaba-inc.com>
1 parent 634469c commit 81b243a

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

runtime/llama.cpp/tests/test_download_funasr_model.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,23 +146,23 @@ assert_readme_quickstart() {
146146
exit 1
147147
fi
148148

149-
if ! grep -F "bash download-funasr-model.sh sensevoice ./gguf" <<<"$quickstart" >/dev/null; then
149+
if ! grep -Eq '^bash download-funasr-model\.sh sensevoice \./gguf([[:space:]]+#.*)?$' <<<"$quickstart"; then
150150
printf 'missing default SenseVoice download command in %s\n' "$readme" >&2
151151
exit 1
152152
fi
153-
if ! grep -F "./llama-funasr-sensevoice -m ./gguf/$DEFAULT_SENSEVOICE_MODEL --vad ./gguf/fsmn-vad.gguf -a audio.wav" <<<"$quickstart" >/dev/null; then
153+
if ! grep -Fx "./llama-funasr-sensevoice -m ./gguf/$DEFAULT_SENSEVOICE_MODEL --vad ./gguf/fsmn-vad.gguf -a audio.wav" <<<"$quickstart" >/dev/null; then
154154
printf 'README command does not run the default sensevoice-small-q8.gguf in %s\n' "$readme" >&2
155155
exit 1
156156
fi
157-
if ! grep -F "hf download FunAudioLLM/SenseVoiceSmall-GGUF $DEFAULT_SENSEVOICE_MODEL --local-dir .\\gguf" <<<"$powershell" >/dev/null; then
157+
if ! grep -Fx "hf download FunAudioLLM/SenseVoiceSmall-GGUF $DEFAULT_SENSEVOICE_MODEL --local-dir .\\gguf" <<<"$powershell" >/dev/null; then
158158
printf 'missing Windows SenseVoice download command in %s\n' "$readme" >&2
159159
exit 1
160160
fi
161-
if ! grep -F 'hf download FunAudioLLM/fsmn-vad-GGUF fsmn-vad.gguf --local-dir .\gguf' <<<"$powershell" >/dev/null; then
161+
if ! grep -Fx 'hf download FunAudioLLM/fsmn-vad-GGUF fsmn-vad.gguf --local-dir .\gguf' <<<"$powershell" >/dev/null; then
162162
printf 'missing Windows FSMN-VAD download command in %s\n' "$readme" >&2
163163
exit 1
164164
fi
165-
if ! grep -F ".\\llama-funasr-sensevoice.exe -m .\\gguf\\$DEFAULT_SENSEVOICE_MODEL --vad .\\gguf\\fsmn-vad.gguf -a audio.wav" <<<"$powershell" >/dev/null; then
165+
if ! grep -Fx ".\\llama-funasr-sensevoice.exe -m .\\gguf\\$DEFAULT_SENSEVOICE_MODEL --vad .\\gguf\\fsmn-vad.gguf -a audio.wav" <<<"$powershell" >/dev/null; then
166166
printf 'missing Windows PowerShell quickstart in %s\n' "$readme" >&2
167167
exit 1
168168
fi

0 commit comments

Comments
 (0)