Update test flags master
authorColin Clark <colin.clark@cclark.uk>
Sun, 19 May 2024 15:20:32 +0000 (16:20 +0100)
committerColin Clark <colin.clark@cclark.uk>
Sun, 19 May 2024 15:20:32 +0000 (16:20 +0100)
- Delete option devel
- Include option extended_stacktrace, which defaults to auto
- Use the unit_tests flag to run image tests
- Change tabs to spaces in meson.build

.github/workflows/appimage-aarch64.yml
.github/workflows/appimage-minimal-aarch64.yml
.github/workflows/appimage-minimal-x86_64.yml
.github/workflows/appimage-x86_64.yml
.github/workflows/check-build-actions.yml
TESTING.md
meson.build
meson_options.txt
scripts/clang-tidy-check.sh
scripts/test-all.sh

index 7049a4c..5dca335 100644 (file)
@@ -52,7 +52,7 @@ jobs:
             yes | sudo apt-get install yelp-tools
             mkdir -p $GITHUB_WORKSPACE/AppDir
             mkdir -p $GITHUB_WORKSPACE/AppDir/usr
-            meson setup -Ddevel=enabled -Ddoxygen=disabled -Dyelp-build=disabled -Dprefix=$GITHUB_WORKSPACE/AppDir/usr build
+            meson setup -Ddoxygen=disabled -Dyelp-build=disabled -Dprefix=$GITHUB_WORKSPACE/AppDir/usr build
             ninja -C build install
             tar -czvf geeqie.gz $GITHUB_WORKSPACE/
 
index 4857ab1..96f0d32 100644 (file)
@@ -36,7 +36,7 @@ jobs:
             yes | sudo apt-get install yelp-tools
             mkdir -p $GITHUB_WORKSPACE/AppDir
             mkdir -p $GITHUB_WORKSPACE/AppDir/usr
-            meson setup -Darchive=disabled -Dcms=disabled -Ddevel=disabled -Ddoxygen=disabled -Ddjvu=disabled -Devince=disabled -Dexecinfo=disabled -Dexiv2=disabled -Dgps-map=disabled -Dheif=disabled -Dj2k=disabled -Djpeg=disabled -Djpegxl=disabled -Dlibraw=disabled -Dlua=disabled -Dpdf=disabled -Dspell=disabled -Dtiff=disabled -Dvideothumbnailer=disabled -Dwebp=disabled -Dprefix=$GITHUB_WORKSPACE/AppDir/usr build
+            meson setup -Darchive=disabled -Dcms=disabled -Ddoxygen=disabled -Ddjvu=disabled -Devince=disabled -Dexecinfo=disabled -Dexiv2=disabled -Dgps-map=disabled -Dheif=disabled -Dj2k=disabled -Djpeg=disabled -Djpegxl=disabled -Dlibraw=disabled -Dlua=disabled -Dpdf=disabled -Dspell=disabled -Dtiff=disabled -Dvideothumbnailer=disabled -Dwebp=disabled -Dprefix=$GITHUB_WORKSPACE/AppDir/usr build
             ninja -C build install
             tar -czvf geeqie.gz $GITHUB_WORKSPACE/
 
index abade5d..4d0746c 100644 (file)
@@ -24,7 +24,6 @@ jobs:
         setup-options: >
           -Darchive=disabled
           -Dcms=disabled
-          -Ddevel=disabled
           -Ddjvu=disabled
           -Ddoxygen=disabled
           -Devince=disabled
index 12a9f84..f8159bd 100644 (file)
@@ -36,7 +36,6 @@ jobs:
       with:
         action: build
         directory: build
-        setup-options: -Ddevel=enabled
         options: --verbose
         meson-version: 1.0.1
 
index a67195a..3388c32 100644 (file)
@@ -42,12 +42,12 @@ jobs:
         setup-options: >
           -Darchive=disabled
           -Dcms=disabled
-          -Ddevel=disabled
           -Ddjvu=disabled
           -Ddoxygen=disabled
           -Devince=disabled
           -Dexecinfo=disabled
           -Dexiv2=disabled
+          -Dextended_stacktrace=disabled
           -Dgit=disabled
           -Dgps-map=disabled
           -Dgtk4=disabled
@@ -118,7 +118,6 @@ jobs:
         action: test
         directory: build
         setup-options: >
-          -Ddevel=enabled
           -Dunit_tests=enabled
         options: --verbose
         meson-version: 1.0.0
index 7a8ed18..0674b19 100644 (file)
@@ -74,10 +74,10 @@ Geeqie from staying running.
 
 ### Image tests
 
-The image tests are only enabled in developer mode.  You can set that with:
+The image tests are only enabled in unit_test mode.  You can set that with:
 
 ```text
-meson setup -C build -D devel=enabled
+meson setup -C build -D unit_test=enabled
 ```
 
 This tests that Geeqie can successfully open and provide metadata info about a
index 6048a09..9382f59 100644 (file)
@@ -64,14 +64,6 @@ i18n = import('i18n')
 fs = import('fs')
 configuration_inc = include_directories('.')
 
-# Extended stack trace using backward-app
-option = get_option('devel')
-if option.enabled()
-    if cc.has_link_argument('-ldwarf')
-        add_project_link_arguments('-ldwarf', language: 'cpp')
-    endif
-endif
-
 # External programs
 glib_compile_resources = find_program('glib-compile-resources', required : true)
 glib_genmarshal = find_program('glib-genmarshal', required : true)
@@ -164,14 +156,19 @@ glib_dep = dependency('glib-2.0', version : '>=2.52', required: true)
 conf_data.set('HAVE_DEVELOPER', 0)
 libdw_dep = []
 libunwind_dep = []
-option = get_option('devel')
-if option.enabled()
+option = get_option('extended_stacktrace')
+if not option.disabled()
     libdw_dep = dependency('libdw', required : true)
     if libdw_dep.found()
         libunwind_dep = dependency('libunwind', required : true)
         if libunwind_dep.found()
-            conf_data.set('HAVE_DEVELOPER', 1)
-            summary({'developer mode' : ['extended stacktrace:', true]}, section : 'Debugging', bool_yn : true)
+            if cc.has_link_argument('-ldwarf')
+                add_project_link_arguments('-ldwarf', language: 'cpp')
+                conf_data.set('HAVE_DEVELOPER', 1)
+                summary({'developer mode' : ['extended stacktrace:', true]}, section : 'Debugging', bool_yn : true)
+            else
+                summary({'developer mode' : ['link argument -ldwarf not found. extended stacktrace:', false]}, section : 'Debugging', bool_yn : true)
+            endif
         else
             summary({'developer mode' : ['libunwind not found. extended stacktrace:', false]}, section : 'Debugging', bool_yn : true)
         endif
@@ -693,11 +690,11 @@ else
 endif
 
 # The tests are run on GitHub with all options disabled, and then
-# Image tests use option devel as a flag so that normal users do not
+# Image tests use option unit_tests as a flag so that normal users do not
 # download the test image database.
 
 # Image checks
-option = get_option('devel')
+option = get_option('unit_tests')
 if option.enabled()
     if xvfb.found()
         get_test_images_sh = find_program('get-test-images.sh', dirs : scriptsdir, required : true)
@@ -812,16 +809,16 @@ endif
 # Untranslated text checks
 untranslated_text_sh = find_program('untranslated-text.sh', dirs : scriptsdir, required : true)
 if untranslated_text_sh.found()
-        foreach source_file : main_sources + pan_view_sources + view_file_sources
-               if fs.name(source_file).endswith('.cc')
-                       source_file_name = fs.name(source_file)
-                       test('Untranslated Text_ ' + source_file_name, untranslated_text_sh, args : [source_file], timeout : 200, suite : 'analysis')
-               endif
-       endforeach
+     foreach source_file : main_sources + pan_view_sources + view_file_sources
+        if fs.name(source_file).endswith('.cc')
+            source_file_name = fs.name(source_file)
+            test('Untranslated Text_ ' + source_file_name, untranslated_text_sh, args : [source_file], timeout : 200, suite : 'analysis')
+        endif
+    endforeach
 
-       summary({'Untranslated Text' : ['Test runs:', true]}, section : 'Testing', bool_yn : true)
+    summary({'Untranslated Text' : ['Test runs:', true]}, section : 'Testing', bool_yn : true)
 else
-       summary({'Untranslated Text' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
+    summary({'Untranslated Text' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
 endif
 
 # Lua test
index 3f92bd0..eadbd62 100644 (file)
@@ -25,12 +25,12 @@ option('gq_localedir', type : 'string', value : '', description : 'Location wher
 
 option('archive', type : 'feature', value : 'auto', description : 'archive files e.g. zip, gz')
 option('cms', type : 'feature', value : 'auto', description : 'color management system')
-option('devel', type : 'feature', value : 'disabled', description : 'developer mode')
 option('doxygen', type : 'feature', value : 'auto', description : 'lua api help file')
 option('djvu', type : 'feature', value : 'auto', description : 'djvu')
 option('evince', type : 'feature', value : 'auto', description : 'print preview')
 option('execinfo', type : 'feature', value : 'auto', description : 'execinfo.h')
 option('exiv2', type : 'feature', value : 'auto', description : 'exiv2')
+option('extended_stacktrace', type : 'feature', value : 'auto', description : 'extended stacktrace')
 option('git', type : 'feature', value : 'auto', description : 'lua-api and changelog.html')
 option('gps-map', type : 'feature', value : 'auto', description : 'gps map')
 option('gtk4', type : 'feature', value : 'disabled', description : 'gtk4 - do not use')
index 7f0011b..474a1a7 100755 (executable)
@@ -97,7 +97,7 @@ done
 
 if [ ! -d "build" ]
 then
-       meson setup -Ddevel=enabled build
+       meson setup build
 else
        if [ ! -d "build/test-images.p" ]
                then
index 4ce9ee3..a7c6b85 100755 (executable)
@@ -40,17 +40,18 @@ export XDG_CACHE_HOME
 export XDG_DATA_HOME
 
 rm --recursive --force build
+tmpdir=$(mktemp -d "${TMPDIR:-/tmp}/geeqie.XXXXXXXXXX")
 
 # Check with all options disabled
 meson setup \
 -Darchive=disabled \
 -Dcms=disabled \
--Ddevel=disabled \
 -Ddoxygen=disabled \
 -Ddjvu=disabled \
 -Devince=disabled \
 -Dexecinfo=disabled \
 -Dexiv2=disabled \
+-Dextended_stacktrace=disabled \
 -Dgit=disabled \
 -Dgps-map=disabled \
 -Dgtk4=disabled \
@@ -72,17 +73,20 @@ build
 
 meson test -C build
 
-tmpdir=$(mktemp -d "${TMPDIR:-/tmp}/geeqie.XXXXXXXXXX")
-cp ./build/meson-logs/testlog.txt "$tmpdir/testlog-options-disabled.txt"
+cp ./build/meson-logs/meson-log.txt "$tmpdir/testlog-options-disabled.txt"
+cat ./build/meson-logs/testlog.txt >> "$tmpdir/testlog-options-disabled.txt"
 
 rm --recursive --force build
-
-meson setup -Ddevel=enabled -Dunit_tests=enabled build
-
+meson setup -Dunit_tests=enabled build
 meson test -C build
 
-cp ./build/meson-logs/testlog.txt "$tmpdir/testlog-options-enabled.txt"
+cp ./build/meson-logs/meson-log.txt "$tmpdir/testlog-options-enabled.txt"
+cat ./build/meson-logs/testlog.txt >> "$tmpdir/testlog-options-enabled.txt"
 
 rm -r "$XDG_CONFIG_HOME"
 rm -r "$XDG_CACHE_HOME"
 rm -r "$XDG_DATA_HOME"
+
+printf "\n%s" "$tmpdir/testlog-options-disabled.txt"
+printf "\n%s\n" "$tmpdir/testlog-options-enabled.txt"
+