with:
action: test
directory: build
+ setup-options: -Ddevel=enabled
options: --verbose
meson-version: 0.56.2
- name: Upload logs
else
summary({'gtk-builder-tool xvfb' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
endif
+
+# Image checks
+option = get_option('devel')
+if option.enabled()
+ get_test_images_sh = find_program('get-test-images.sh', dirs : scriptsdir, required : true)
+ image_test_sh = find_program('image-test.sh', dirs : scriptsdir, required : true)
+
+ images_dir = join_paths(meson.current_build_dir(), 'test-images.p')
+
+ message('Downloading test images')
+ sources_list = run_command(get_test_images_sh, images_dir, 'https://github.com/caclark/geeqie-test.git', check: true)
+
+ sources = sources_list.stdout().strip().split('\n')
+
+ foreach image : sources
+ image_path = '@0@'.format(image)
+ path_array = image_path.split('/')
+ image_name = path_array[path_array.length() - 1]
+
+ test('Image_ ' + image_name, image_test_sh, args: [geeqie_exe, image], is_parallel : false, timeout: 100)
+ endforeach
+ summary({'Image tests' : ['Test runs:', true]}, section : 'Testing', bool_yn : true)
+else
+ summary({'Image tests' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
+endif
--- /dev/null
+#!/bin/sh
+#**********************************************************************
+# Copyright (C) 2023 - The Geeqie Team
+#
+# Author: Colin Clark
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#**********************************************************************
+
+## @file
+## @brief Download test images
+##
+## $1 destination directory \n
+## $2 git test image repo. \n
+##
+
+mkdir -p "$1"
+
+if ! git clone "$2" "$1"
+then
+ exit 1
+fi
+
+for file in "$1/images/"*
+do
+ echo "$file"
+done
+
+exit 0
--- /dev/null
+#!/bin/sh
+#**********************************************************************
+# Copyright (C) 2023 - The Geeqie Team
+#
+# Author: Colin Clark
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#**********************************************************************
+
+## @file
+## @brief Run image tests
+##
+## $1 Geeqie executable
+## $2 Full path to image
+##
+##
+
+"$1" "$2" &
+
+# Wait for remote to initialize
+sleep 1
+
+result=$($1 --remote --get-file-info)
+"$1" --remote --quit
+
+if echo "$result" | grep -q "Class: Unknown"
+then
+ exit 1
+else
+ exit 0
+fi
+
'generate-appimage.sh',
'generate-linuxdeploy-for-arm.sh',
'generate-man-page.sh',
+'get-test-images.sh',
+'image-test.sh',
'keyword_merge.sh',
'new-release.sh',
'template-desktop.sh',