From: Colin Clark Date: Wed, 2 Aug 2023 15:54:36 +0000 (+0100) Subject: Bug fix: Include Lua tests X-Git-Tag: v2.2~167 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=7bd21d17cee90515412dc32db9ac2527d113f408 Bug fix: Include Lua tests When running as a GitHub action, error messages such as: (geeqie:12363): dbind-WARNING **: 13:24:40.471: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files are included at the head of the run output. Work around the problem by taking the last n lines of output. --- diff --git a/scripts/lua-test.sh b/scripts/lua-test.sh index c50a98d8..939a024a 100644 --- a/scripts/lua-test.sh +++ b/scripts/lua-test.sh @@ -65,15 +65,18 @@ base_lua=$(basename "$lua_test_file") result=$(xvfb-run --auto-servernum "$1" --remote --lua:"$lua_test_image","$base_lua") xvfb-run --auto-servernum "$1" --remote --quit +## @FIXME Running on GitHub gives additional dbind-WARNINGs. The data required is the last n lines. +result_tail=$(printf "%s" "$result" | tail --lines=7) + expected=$(printf "%s\n.%s\n%s\n%s\n%s\n%s\n%s" "$(basename "$lua_test_image")" jpeg "$lua_test_image" "$(stat -c %Y "$lua_test_image")" "$(stat -c %s "$lua_test_image")" 0 200) -printf " Result Expected\n" -printf '%s\n' "$result" "$expected"| pr -2 --omit-header +printf "Result Expected\n" +printf '%s\n' "$result_tail" "$expected"| pr -2 --omit-header rm "$lua_test_image" rm "$lua_test_file" -if [ "$result" = "$expected" ] +if [ "$result_tail" = "$expected" ] then exit 0 else