@@ -15,9 +15,11 @@ set -euo pipefail
1515REPO_ROOT=" $( cd " $( dirname " $0 " ) /.." && pwd) "
1616TESTS_DIR=" $REPO_ROOT /tests"
1717
18- # Per-framework pass/fail tracking (0 = passed, 1 = failed)
18+ # Per-framework pass/fail/skip tracking (0 = passed/not-skipped , 1 = failed/skipped )
1919bats_failed=0
20+ bats_skipped=0
2021cram_failed=0
22+ cram_skipped=0
2123remake_failed=0
2224
2325# ---------------------------------------------------------------------------
@@ -61,7 +63,8 @@ echo " ✅ bats, cram, remake all found"
6163section " bats (shell script unit tests)"
6264bats_files=(" $TESTS_DIR " /bats/* .bats)
6365if [ ! -e " ${bats_files[0]} " ]; then
64- echo " ⚠️ No .bats files found in tests/bats/ – nothing to run"
66+ echo " ⚠️ No .bats files found in tests/bats/ – skipping bats suite"
67+ bats_skipped=1
6568else
6669 for bats_file in " ${bats_files[@]} " ; do
6770 echo " "
7881section " cram (CLI integration tests)"
7982cram_files=(" $TESTS_DIR " /cram/* .t)
8083if [ ! -e " ${cram_files[0]} " ]; then
81- echo " ⚠️ No .t files found in tests/cram/ – nothing to run"
84+ echo " ⚠️ No .t files found in tests/cram/ – skipping cram suite"
85+ cram_skipped=1
8286else
8387 export REPO_ROOT
8488 if cram --shell=bash " ${cram_files[@]} " ; then
@@ -105,12 +109,15 @@ overall_failed=$(( bats_failed + cram_failed + remake_failed ))
105109
106110echo " "
107111echo " ╔══════════════════════════════════════╗"
108- if [ " $overall_failed " -eq 0 ]; then
112+ if [ " $overall_failed " -eq 0 ] && [ " $bats_skipped " -eq 0 ] && [ " $cram_skipped " -eq 0 ] ; then
109113 echo " ║ ✅ All test suites passed ║"
110114else
111115 [ " $bats_failed " -eq 1 ] && echo " ║ ❌ bats suite FAILED ║"
112116 [ " $cram_failed " -eq 1 ] && echo " ║ ❌ cram suite FAILED ║"
113117 [ " $remake_failed " -eq 1 ] && echo " ║ ❌ remake suite FAILED ║"
118+ [ " $bats_skipped " -eq 1 ] && echo " ║ ⚠️ bats suite SKIPPED (no files) ║"
119+ [ " $cram_skipped " -eq 1 ] && echo " ║ ⚠️ cram suite SKIPPED (no files) ║"
120+ [ " $overall_failed " -eq 0 ] && echo " ║ ✅ No failures (some suites skipped)║"
114121fi
115122echo " ╚══════════════════════════════════════╝"
116123exit " $overall_failed "
0 commit comments