Fix errors in testing scripts
authorColin Clark <colin.clark@cclark.uk>
Sat, 3 Feb 2024 11:52:43 +0000 (11:52 +0000)
committerColin Clark <colin.clark@cclark.uk>
Sat, 3 Feb 2024 11:52:43 +0000 (11:52 +0000)
.clang-tidy
meson.build
scripts/lua-test.sh [changed mode: 0644->0755]
scripts/test-all.sh

index 2c73f5c..a960389 100644 (file)
@@ -60,3 +60,5 @@ Checks: >
   -readability-simplify-boolean-expr,
   -readability-suspicious-call-argument,
   -readability-uppercase-literal-suffix
+
+WarningsAsErrors: "*"
index 9a13794..24f8c74 100644 (file)
@@ -689,8 +689,9 @@ if running_from_git
                 path_array = modified_file_path.split('/')
                 modified_file_name = path_array[path_array.length() - 1]
                 modified_file_full_path = join_paths(meson.project_source_root(), modified_file)
+                config_file = join_paths(meson.project_source_root(), '.clang-tidy')
 
-                test('Code Correctness_ ' + modified_file_name, clang_tidy_exe, args : ['-p', './build', '-quiet', modified_file_full_path], timeout : 100)
+                test('Code Correctness_ ' + modified_file_name, clang_tidy_exe, args : ['-p', './build', '-quiet', '--config-file', config_file,  modified_file_full_path], timeout : 100)
             endif
         endforeach
 
old mode 100644 (file)
new mode 100755 (executable)
index 939a024..29bc31b
 ##
 ## Create a basic image and run all lua built-in functions on it.
 ## The image file and the Lua test file are created within this script.
+set -x
+if [ -z "$XDG_CONFIG_HOME" ]
+then
+       config_home="$HOME/.config"
+else
+       config_home="$XDG_CONFIG_HOME"
+fi
 
 lua_test_image=$(mktemp --suffix=".jpeg" "${TMPDIR:-/tmp}/geeqie.XXXXXXXXXX")
-mkdir -p "$HOME/.config/geeqie/lua/"
-lua_test_file=$(mktemp --suffix=".lua" --tmpdir="$HOME/.config/geeqie/lua/" lua-test-XXXXXX)
+mkdir -p "$config_home/geeqie/lua/"
+lua_test_file=$(mktemp --suffix=".lua" --tmpdir="$config_home/geeqie/lua/" lua-test-XXXXXX)
 
 # Test image generated by:
 # convert -size 32x32 xc:white empty.jpg
@@ -54,7 +61,7 @@ printf  "%s" "$lua_test" > "$lua_test_file"
 xvfb-run --auto-servernum "$1" &
 
 # Wait for remote to initialize
-while [ ! -e "$HOME/.config/geeqie/.command" ] ;
+while [ ! -e "$config_home/geeqie/.command" ] ;
 do
        sleep 1
 done
index 666aeca..9424e35 100755 (executable)
@@ -82,6 +82,6 @@ meson test -C build
 
 cp ./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"
+rm -r "$XDG_CONFIG_HOME"
+rm -r "$XDG_CACHE_HOME"
+rm -r "$XDG_DATA_HOME"