From c88b851ce16c3253b7f9d66c6f28c1cac7f17e08 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Tue, 20 Oct 2026 08:05:14 +1100 Subject: [PATCH 1/2] chore(cmake-helpers): bring runners to gold tip @0754c23 Replace the stale run_all_examples.sh, run_all_scratch_tests.sh/.cmd and run_all_unit_tests.sh with the misc-dev-scripts tip so that discovery excludes CMakeFiles and *.d / *.o / *.obj sidecars, and the scratch runners honour --skip-interactive. prepare_cmake.sh is unchanged and keeps -DLIBPATH_OS_SIMULATE_WINDOWS_ON_UNIX and -DSTLSOFT=... --- run_all_examples.sh | 7 +++- run_all_scratch_tests.cmd | 49 +++++++++++++++++++++++++- run_all_scratch_tests.sh | 73 ++++++++++++++++++++++++++++++++++++++- run_all_unit_tests.sh | 7 +++- 4 files changed, 132 insertions(+), 4 deletions(-) diff --git a/run_all_examples.sh b/run_all_examples.sh index 722326a..2f03c18 100755 --- a/run_all_examples.sh +++ b/run_all_examples.sh @@ -332,7 +332,12 @@ if [ $status -eq 0 ]; then break 1 fi - done < <(find "$CMakeDir" -type f \( -name 'example*' ! -name '*.md' \) \( -perm -100 -o -name '*.exe' \) -print0 2>/dev/null | sort -z) + done < <(find "$CMakeDir" -type f \( -name 'example*' ! -name '*.md' \) \ + ! -path '*/CMakeFiles/*' \ + ! -name '*.a' \ + ! -name '*.d' \ + ! -name '*.lib' \ + \( -perm -100 -o -name '*.exe' \) -print0 2>/dev/null | sort -z) if [ $NumPrograms -eq 0 ]; then diff --git a/run_all_scratch_tests.cmd b/run_all_scratch_tests.cmd index 0402fb1..b5436ef 100644 --- a/run_all_scratch_tests.cmd +++ b/run_all_scratch_tests.cmd @@ -1,11 +1,13 @@ @echo off -SETLOCAL +SETLOCAL ENABLEDELAYEDEXPANSION SET SCRIPT_DIRECTORY=%~dp0 SET SCRIPT_PATH_DOC=%~n0[%~x0] SET "ALLOWED_TO_FAIL_FILE=%SCRIPT_DIRECTORY%.sis\ci_scratch_tests_allowed_to_fail.txt" +SET "SKIP_INTERACTIVE_FILE=%SCRIPT_DIRECTORY%.sis\ci_scratch_tests_skip_interactive.txt" SET "PROGRAM_STATUS=0" +SET "SKIP_INTERACTIVE=0" IF DEFINED SIS_CMAKE_BUILD_DIR ( @@ -37,6 +39,14 @@ Flags/options: ^ behaviour: ^ +^ + + --skip-interactive ^ + + skips programs listed in .sis\ci_scratch_tests_skip_interactive.txt ^ + + ^(GUI / speech / desktop-interactive; unsuitable for headless CI^) ^ + ^ standard flags: ^ @@ -63,8 +73,19 @@ Flags/options: ^ reported as anticipated and does not stop the run ^ +^ + + .sis\ci_scratch_tests_skip_interactive.txt ^ + + list of scratch-test programs skipped when --skip-interactive ^ + + is given ^(one name per line; blank lines and '#' ignored^) ^ + EXIT /B 0 + ) ELSE IF /I {--skip-interactive}=={%%a} ( + + SET "SKIP_INTERACTIVE=1" ) ELSE ( ECHO "%SCRIPT_DIRECTORY%: unrecognised argument '%%a'; use --help for usage" 1>&2 @@ -73,6 +94,13 @@ Flags/options: ^ ) ) +IF "%SKIP_INTERACTIVE%"=="1" IF NOT EXIST "%SKIP_INTERACTIVE_FILE%" ( + + ECHO %SCRIPT_PATH_DOC%: --skip-interactive: skip list not found at '%SKIP_INTERACTIVE_FILE%' 1>&2 + + EXIT /B 1 +) + if NOT EXIST "%CMAKE_DIR%" ( ECHO "CMake build directory '%CMAKE_DIR%' does not exist" @@ -102,6 +130,13 @@ REM subroutines :run_program IF %PROGRAM_STATUS% NEQ 0 EXIT /B 0 +CALL :is_skipped_interactive "%~1" +IF DEFINED SKIPPED_INTERACTIVE ( + + ECHO . + ECHO skipping %~1 ^(interactive; --skip-interactive^) + EXIT /B 0 +) ECHO . ECHO executing %~1 "%~1" @@ -125,3 +160,15 @@ EXIT /B 0 IF /I "%~1"=="%~2" SET "ALLOWED_TO_FAIL=1" IF /I "%~1"=="%~3" SET "ALLOWED_TO_FAIL=1" EXIT /B 0 + +:is_skipped_interactive +SET "SKIPPED_INTERACTIVE=" +IF NOT "%SKIP_INTERACTIVE%"=="1" EXIT /B 0 +IF NOT EXIST "%SKIP_INTERACTIVE_FILE%" EXIT /B 0 +FOR /F "usebackq eol=# tokens=1" %%n IN ("%SKIP_INTERACTIVE_FILE%") DO CALL :match_skip "%%n" "%~n1" "%~nx1" +EXIT /B 0 + +:match_skip +IF /I "%~1"=="%~2" SET "SKIPPED_INTERACTIVE=1" +IF /I "%~1"=="%~3" SET "SKIPPED_INTERACTIVE=1" +EXIT /B 0 diff --git a/run_all_scratch_tests.sh b/run_all_scratch_tests.sh index 6e06f13..0250180 100755 --- a/run_all_scratch_tests.sh +++ b/run_all_scratch_tests.sh @@ -28,10 +28,12 @@ ProjectNameFile="$Dir/.sis/project_name.txt" ProjectName=$(tr -d '[:space:]' < "$ProjectNameFile") ScriptPath=$0 AllowedToFailFile="$Dir/.sis/ci_scratch_tests_allowed_to_fail.txt" +SkipInteractiveFile="$Dir/.sis/ci_scratch_tests_skip_interactive.txt" AlwaysUseColours=${SIS_CMAKE_ALWAYS_USE_COLOURS:-${SIS_ALWAYS_USE_COLOURS:-0}} ListOnly=0 RunMake=1 +SkipInteractive=0 SisUseColours=0 @@ -159,6 +161,35 @@ sis_is_allowed_to_fail() { return 1 } +# Succeeds if --skip-interactive is active and the program is named in +# .sis/ci_scratch_tests_skip_interactive.txt (GUI / speech / similar). +sis_is_skipped_interactive() { + + local name line + + [ $SkipInteractive -ne 0 ] || return 1 + + [ -f "$SkipInteractiveFile" ] || return 1 + + name=$(sis_program_stem "$1") + + while IFS= read -r line || [ -n "$line" ]; do + + line="${line//$'\r'/}" + + case "$line" in + ''|\#*) continue ;; + esac + + if [ "$name" = "$(sis_program_stem "$line")" ]; then + + return 0 + fi + done < "$SkipInteractiveFile" + + return 1 +} + # ########################################################## # command-line handling @@ -178,6 +209,10 @@ while [[ $# -gt 0 ]]; do RunMake=0 ;; + --skip-interactive) + + SkipInteractive=1 + ;; --help) [ -f "$Dir/.sis/script_info_lines.txt" ] && cat "$Dir/.sis/script_info_lines.txt" @@ -203,6 +238,11 @@ Flags/options: --no-make does not execute a build before running programs + --skip-interactive + skips programs listed in .sis/ci_scratch_tests_skip_interactive.txt + (GUI / speech / desktop-interactive programs unsuitable for headless + CI; principally Windows MessageBox and speech sinks) + files: @@ -213,6 +253,10 @@ Flags/options: reported as anticipated and neither stops the run nor affects the exit status + .sis/ci_scratch_tests_skip_interactive.txt + list of scratch-test programs skipped when --skip-interactive is + given (one name per line; blank lines and '#' comments ignored) + standard flags: @@ -234,6 +278,13 @@ EOF shift done +if [ $SkipInteractive -ne 0 ] && [ ! -f "$SkipInteractiveFile" ]; then + + >&2 echo "${ScriptPath}: --skip-interactive: skip list not found at '$SkipInteractiveFile'" + + exit 1 +fi + # ########################################################## # main() @@ -295,6 +346,20 @@ if [ $status -eq 0 ]; then fClr="${SisClr_Blue}${SisClr_Bold}${f}${SisClr_None}" + if sis_is_skipped_interactive "$f"; then + + if [ $ListOnly -ne 0 ]; then + + echo "would skip ${fClr} (interactive; --skip-interactive)" + else + + echo + echo "skipping ${fClr} (interactive; --skip-interactive)" + fi + + continue + fi + if [ $ListOnly -ne 0 ]; then if sis_is_allowed_to_fail "$f"; then @@ -329,7 +394,13 @@ if [ $status -eq 0 ]; then break 1 fi - done < <(find "$CMakeDir" -type f \( -name 'test_scratch*' -o -name 'test.scratch.*' \) \( -perm -100 -o -name '*.exe' \) -print0 2>/dev/null | sort -z) + done < <(find "$CMakeDir" -type f \( -name 'test_scratch*' -o -name 'test.scratch.*' \) \ + ! -path '*/CMakeFiles/*' \ + ! -name '*.a' \ + ! -name '*.d' \ + ! -name '*.lib' \ + ! -name '*.log' \ + \( -perm -100 -o -name '*.exe' \) -print0 2>/dev/null | sort -z) if [ $NumPrograms -eq 0 ]; then diff --git a/run_all_unit_tests.sh b/run_all_unit_tests.sh index 301ccae..c7250bd 100755 --- a/run_all_unit_tests.sh +++ b/run_all_unit_tests.sh @@ -282,7 +282,12 @@ if [ $status -eq 0 ]; then break 1 fi - done < <(find "$CMakeDir" -type f \( -name 'test_unit*' -o -name 'test.unit.*' \) \( -perm -100 -o -name '*.exe' \) -print0 2>/dev/null | sort -z) + done < <(find "$CMakeDir" -type f \( -name 'test_unit*' -o -name 'test.unit.*' \) \ + ! -path '*/CMakeFiles/*' \ + ! -name '*.a' \ + ! -name '*.d' \ + ! -name '*.lib' \ + \( -perm -100 -o -name '*.exe' \) -print0 2>/dev/null | sort -z) if [ $NumPrograms -eq 0 ]; then From 60f0e1a0f1a99803410ad3f3130ed6b05cb186d2 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Tue, 20 Oct 2026 08:15:59 +1100 Subject: [PATCH 2/2] chore(release): 0.3.0-beta2 with gold tip helpers Raise LIBPATH_VER_RELSTATUS to 0x82 for 0.3.0-beta2. Replace the stale run_all_examples.sh, run_all_scratch_tests.sh/.cmd and run_all_unit_tests.sh with the misc-dev-scripts tip 0754c23. Record the release in CHANGES.md and NEWS.md. --- CHANGES.md | 6 ++++++ NEWS.md | 1 + include/libpath/common/version.h | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index bb16aab..9062726 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,12 @@ # libpath - Changes +## 0.3.0-beta2 - 20th October 2026 + +* Aligned the **run_all_examples.sh**, **run_all_scratch_tests.sh** / **.cmd**, and **run_all_unit_tests.sh** helper scripts with **misc-dev-scripts** gold tip **0754c23**, excluding **CMakeFiles** and `*.d` / `*.o` / `*.obj` from discovery and adding scratch `--skip-interactive`; +* Raised `LIBPATH_VER_RELSTATUS` to `0x82` for **0.3.0-beta2**; + + ## 0.3.0-beta1 - 14th October 2026 * Applied **misc-dev-scripts** editor/Git/`.sis` drop-in templates (**.editorconfig**, **.gitattributes**, **.gitignore**, **.vimrc**, **.vscode/settings.json**); diff --git a/NEWS.md b/NEWS.md index db42639..2a0f3e3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,7 @@ | Date | News Item | Details | | ------------------- | ----------------------------------- | ------------------------------- | +| 20th October 2026 | Release of [**libpath** 0.3.0-beta2](https://github.com/synesissoftware/libpath/releases/tag/0.3.0-beta2) | Gold tip helpers | | 14th October 2026 | Release of [**libpath** 0.3.0-beta1](https://github.com/synesissoftware/libpath/releases/tag/0.3.0-beta1) | Gold helpers; modular CI; `LIBPATH_VER_RELSTATUS` | | 15th March 2025 | Release of [**libpath** 0.3.0-alpha1](https://github.com/synesissoftware/libpath/releases/tag/0.3.0-alpha1) | Changed API | | 23rd February 2025 | Release of [**libpath** 0.2.0-alpha5](https://github.com/synesissoftware/libpath/releases/tag/0.2.0-alpha5) | Boilerplate tidying | diff --git a/include/libpath/common/version.h b/include/libpath/common/version.h index 0baec80..c8ee68a 100644 --- a/include/libpath/common/version.h +++ b/include/libpath/common/version.h @@ -4,7 +4,7 @@ * Purpose: Portability discrimination for libpath library. * * Created: 9th November 2012 - * Updated: 14th October 2026 + * Updated: 20th October 2026 * * Home: https://github.com/synesissoftware/libpath * @@ -96,7 +96,7 @@ #define LIBPATH_VER_MAJOR 0 #define LIBPATH_VER_MINOR 3 #define LIBPATH_VER_PATCH 0 -#define LIBPATH_VER_RELSTATUS 0x81 +#define LIBPATH_VER_RELSTATUS 0x82 #define LIBPATH_VER \ (0\