aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/ai/test-ai-state.sh
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/modules/ai/test-ai-state.sh')
-rwxr-xr-xdesktop/modules/ai/test-ai-state.sh22
1 files changed, 6 insertions, 16 deletions
diff --git a/desktop/modules/ai/test-ai-state.sh b/desktop/modules/ai/test-ai-state.sh
index e3e8ba0..aac83fb 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,
-# llamachat and imggen on PATH and a stub assistant.sh beside them, then runs
+# 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 real script, so nothing here touches the live stack. T_* variables pick
# the state each stub reports.
#
@@ -57,9 +57,6 @@ case "$*" in
*sd-server*)
[[ -n "${T_SD:-}" ]] || exit 1
echo "4242 sd-server --listen-port 7860 --diffusion-model /data/SD/z_image_turbo-Q8_0.gguf --vae /data/SD/vae/flux1-ae.safetensors" ;;
- *fanfictioner*)
- [[ -n "${T_FANFIC:-}" ]] || exit 1
- echo 31337 ;;
*) exit 1 ;;
esac
STUB
@@ -69,13 +66,6 @@ cat > "$stub/llamachat" <<'STUB'
[[ "$1" == --ping && -n "${T_CHAT:-}" ]]
STUB
-# The real imggen exits 0 either way and says which on stdout.
-cat > "$stub/imggen" <<'STUB'
-#!/bin/bash
-[[ "$1" == status ]] || exit 1
-if [[ -n "${T_IMG:-}" ]]; then echo '{"model": "realvis", "ready": true}'; else echo "daemon down"; fi
-STUB
-
cat > "$stub/assistant.sh" <<'STUB'
#!/bin/bash
[[ "$1" == status && -n "${T_ASSIST:-}" ]]
@@ -106,7 +96,7 @@ run() {
bash "$here/ai-state.sh"
}
-apps_down="$(l app assistant stopped -; l app chat stopped -; l app imggen stopped -; l app fanfic stopped -)"
+apps_down="$(l app assistant stopped -; l app chat stopped -)"
want="$(l engine llama down idle -; l engine sd down idle -)
$apps_down"
@@ -131,7 +121,7 @@ touch -d '1 minute ago' "$log"
got="$(run T_SD=1 | sed -n 2p)"
check "sd running, log quiet" "$(l engine sd up idle z_image_turbo-Q8_0.gguf)" "$got"
-# A one-shot sd-cli (fanfictioner's) holds VRAM and is generating for as
+# A one-shot sd-cli holds VRAM and is generating for as
# long as it runs, whatever the web UI is doing. Its prompt is free text, so
# a "-m" inside it must not be read as the model.
got="$(run T_CLI=1 | sed -n 2p)"
@@ -140,8 +130,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 -; l app imggen running realvis; l app fanfic running 31337)"
-got="$(run T_ASSIST=1 T_CHAT=1 T_IMG=1 T_FANFIC=1 | tail -n4)"
+want="$(l app assistant running -; l app chat running -)"
+got="$(run T_ASSIST=1 T_CHAT=1 | tail -n2)"
check "every app running" "$want" "$got"
printf '\n%d passed, %d failed\n' "$pass" "$fail"