Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix linux integration test (#1571)

Divanshu Grover9ee77011bbb5
diff --git a/.github/scripts/check_logs.sh b/.github/scripts/check_logs.sh
index 5fbf57f71..7ddf6d5d2 100755
--- a/.github/scripts/check_logs.sh
+++ b/.github/scripts/check_logs.sh
@@ -4,7 +4,7 @@ if grep -q "panic" screenpipe_output.log; then
echo "CLI crashed"
exit 1
fi
-if ! grep -q "Server starting on 127.0.0.1:3030" screenpipe_output.log; then
+if ! grep -q "Server listening on 127.0.0.1:3030" screenpipe_output.log; then
echo "Server did not start correctly"
exit 1
fi
diff --git a/.github/scripts/install_dependencies.sh b/.github/scripts/install_dependencies.sh
index 2a16f5264..87c6443a8 100755
--- a/.github/scripts/install_dependencies.sh
+++ b/.github/scripts/install_dependencies.sh
@@ -1,3 +1,3 @@
#!/bin/bash
sudo apt-get update
-sudo apt-get install -y xvfb ffmpeg libasound2-dev libgtk-3-dev libavformat-dev libavfilter-dev libavdevice-dev x11-utils x11-apps xdotool openbox xterm fonts-liberation tesseract-ocr libtesseract-dev imagemagick fonts-dejavu alsa-utils pulseaudio pulseaudio-utils libxdo-dev
+sudo apt-get install -y xvfb ffmpeg libasound2-dev libgtk-3-dev libavformat-dev libavfilter-dev libavdevice-dev x11-utils x11-apps xdotool sqlitebrowser openbox xterm fonts-liberation tesseract-ocr libtesseract-dev imagemagick fonts-dejavu alsa-utils pulseaudio pulseaudio-utils libxdo-dev
diff --git a/.github/scripts/test_ocr.sh b/.github/scripts/test_ocr.sh
index b5f247043..42a7a3059 100755
--- a/.github/scripts/test_ocr.sh
+++ b/.github/scripts/test_ocr.sh
@@ -9,7 +9,12 @@ do
ps -p $(cat screenpipe.pid) -o %cpu,%mem,cmd
done
kill $DISPLAY_PID
-if grep -qi "Hello, Screenpipe OCR" screenpipe_output.log; then
+
+# Extract OCR text from SQLite
+OCR_TEXT=$(sqlite3 $HOME/.screenpipe/db.sqlite "SELECT text FROM ocr_text;")
+
+# Check if OCR detected the expected text
+if echo "$OCR_TEXT" | grep -qi "Hello, Screenpipe OCR"; then
echo "OCR test passed: Text was recognized"
else
echo "OCR test failed: Text was not recognized"