diff options
Diffstat (limited to 'desktop/modules/ai/test-ai-state.sh')
| -rwxr-xr-x | desktop/modules/ai/test-ai-state.sh | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/desktop/modules/ai/test-ai-state.sh b/desktop/modules/ai/test-ai-state.sh index aac83fb..e4a6b0d 100755 --- a/desktop/modules/ai/test-ai-state.sh +++ b/desktop/modules/ai/test-ai-state.sh @@ -11,8 +11,8 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -# The one runnable check for ai-state.sh. It puts stub curl, pgrep -# and llamachat on PATH and a stub assistant.sh beside them, then runs +# The one runnable check for ai-state.sh. It puts stub curl and pgrep +# on PATH and a stub assistant.sh beside them, then runs # the real script, so nothing here touches the live stack. T_* variables pick # the state each stub reports. # @@ -61,11 +61,6 @@ case "$*" in esac STUB -cat > "$stub/llamachat" <<'STUB' -#!/bin/bash -[[ "$1" == --ping && -n "${T_CHAT:-}" ]] -STUB - cat > "$stub/assistant.sh" <<'STUB' #!/bin/bash [[ "$1" == status && -n "${T_ASSIST:-}" ]] @@ -96,7 +91,7 @@ run() { bash "$here/ai-state.sh" } -apps_down="$(l app assistant stopped -; l app chat stopped -)" +apps_down="$(l app assistant stopped -)" want="$(l engine llama down idle -; l engine sd down idle -) $apps_down" @@ -130,8 +125,8 @@ check "sd-cli running" "$(l engine sd up busy "Krea-2-Turbo-Q6_K.gguf (sd-cli)") got="$(run T_CLI=1 T_SD=1 | sed -n 2p)" check "sd-cli wins over an idle web UI" "$(l engine sd up busy "Krea-2-Turbo-Q6_K.gguf (sd-cli)")" "$got" -want="$(l app assistant running -; l app chat running -)" -got="$(run T_ASSIST=1 T_CHAT=1 | tail -n2)" +want="$(l app assistant running -)" +got="$(run T_ASSIST=1 | tail -n1)" check "every app running" "$want" "$got" printf '\n%d passed, %d failed\n' "$pass" "$fail" |
