diff --git a/scripts/ci/desktop-linux/smoke-test.sh b/scripts/ci/desktop-linux/smoke-test.sh index 2e1f1ff2f5..1486aee818 100755 --- a/scripts/ci/desktop-linux/smoke-test.sh +++ b/scripts/ci/desktop-linux/smoke-test.sh @@ -454,7 +454,9 @@ use_names_server() { back_to_chat_list || fail "no chat list after saving the servers" } -"$ui" start "$app_dir" +# private routing to unknown servers only: the preset servers that would proxy name lookups can't reach the test SMP +# server on 127.0.0.1; developer tools at the debug level put the app's debug log in app.log +"$ui" start "$app_dir" NetworkSMPProxyMode=Unknown DeveloperTools=true LogLevel=DEBUG # onboarding to the chat list "$ui" wait "Create your profile" 180 diff --git a/scripts/ci/desktop-linux/ui b/scripts/ci/desktop-linux/ui index 38b12cfab0..a96515f988 100755 --- a/scripts/ci/desktop-linux/ui +++ b/scripts/ci/desktop-linux/ui @@ -5,7 +5,9 @@ # coordinates are screen pixels, as in the screenshots. Screenshots, the text read from them and # a log of every command (steps.log) go to UI_OUT; the app's data stays in UI_STATE between starts. # -# ui start start Xvfb, openbox and /bin/simplex, and wait for its window +# ui start [=...] +# start Xvfb, openbox and /bin/simplex, and wait for its window; the app gets +# the settings given when UI_STATE has none yet # ui shot save UI_OUT/NN-.png and NN-.txt (OCR's input and output in UI_OUT/ocr), and print the text on screen # ui text print the text on screen, one phrase per line after its centre x,y # ui find print "x y left top right bottom", the text's centre and box; fail if it is not on screen @@ -61,8 +63,9 @@ stop_process() { } start() { - local app_dir + local app_dir settings=$state/config/simplex/settings.properties app_dir=$(cd "$1" && pwd) + shift if running app; then echo "error: the app is already running" return 1 @@ -82,6 +85,10 @@ start() { echo $! > "$state/openbox.pid" mkdir -p "$state/data" "$state/config" "$state/tmp" + if [ $# -gt 0 ] && [ ! -f "$settings" ]; then + mkdir -p "$(dirname "$settings")" + printf '%s\n' "$@" > "$settings" + fi XDG_DATA_HOME="$state/data" \ XDG_CONFIG_HOME="$state/config" \ JAVA_TOOL_OPTIONS="-Djava.io.tmpdir=$state/tmp -Dskiko.renderApi=SOFTWARE" \ @@ -188,8 +195,9 @@ avatar() { case "${1:-}" in start) - log "start $2" - start "$2" + shift + log "start $*" + start "$@" ;; shot) shot "$2" ;; text) screen_ocr lines ;;