File tree Expand file tree Collapse file tree 5 files changed +21
-10
lines changed Expand file tree Collapse file tree 5 files changed +21
-10
lines changed Original file line number Diff line number Diff line change 44SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
55source " ${SCRIPT_DIR} /common.sh"
66
7+ # Clean up any existing semu processes before starting tests
8+ cleanup
9+
710ASSERT expect << DONE
811set timeout ${TIMEOUT}
912spawn make check
Original file line number Diff line number Diff line change 22
33set -euo pipefail
44
5- # Get list of source files into array
6- mapfile -t SOURCES < <( git ls-files ' *.c' ' *.cxx' ' *.cpp' ' *.h' ' *.hpp' )
5+ # Get list of source files into array (POSIX-compatible for macOS bash 3.2)
6+ SOURCES=()
7+ while IFS= read -r file; do
8+ SOURCES+=(" $file " )
9+ done < <( git ls-files ' *.c' ' *.cxx' ' *.cpp' ' *.h' ' *.hpp' )
710
811# Use clang-format dry-run mode with --Werror to fail on format violations
912# This eliminates the need for temporary files and manual diff comparisons
Original file line number Diff line number Diff line change @@ -18,17 +18,15 @@ trap cleanup EXIT INT TERM
1818
1919# ASSERT function - executes command and exits on failure
2020ASSERT () {
21- local cmd_output
2221 local exit_code
2322
2423 set +e
25- cmd_output= " $( " $@ " 2>&1 ) "
24+ " $@ "
2625 exit_code=$?
2726 set -e
2827
2928 if [ " $exit_code " -ne 0 ]; then
3029 echo " Assert failed: $* " >&2
31- echo " Output: $cmd_output " >&2
3230 exit " $exit_code "
3331 fi
3432}
@@ -69,10 +67,10 @@ COLOR_RESET='\e[0m'
6967
7068# Print success message
7169print_success () {
72- printf " \n[ ${COLOR_GREEN} $1 $ {COLOR_RESET} ]\n"
70+ printf " \n[ ${COLOR_GREEN} %s $ {COLOR_RESET} ]\n" " $1 "
7371}
7472
7573# Print error message
7674print_error () {
77- printf " \n[ ${COLOR_RED} $1 $ {COLOR_RESET} ]\n" >&2
75+ printf " \n[ ${COLOR_RED} %s $ {COLOR_RESET} ]\n" " $1 " >&2
7876}
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ case "${OS_TYPE}" in
1818 ;;
1919esac
2020
21+ # Clean up any existing semu processes before starting tests
22+ cleanup
23+
2124# Test network device functionality
2225TEST_NETDEV () {
2326 local NETDEV=" $1 "
Original file line number Diff line number Diff line change @@ -8,11 +8,13 @@ concurrency:
88
99permissions :
1010 contents : read
11+ actions : write
1112
1213jobs :
1314 semu-linux :
1415 runs-on : ubuntu-24.04
1516 strategy :
17+ fail-fast : false
1618 matrix :
1719 dependency :
1820 - none
6668 - name : netdev test
6769 run : .ci/test-netdev.sh
6870 shell : bash
69- if : ${{ success() }}
7071 timeout-minutes : 10
7172
7273 semu-macOS :
@@ -137,8 +138,11 @@ jobs:
137138 run : |
138139 set -euo pipefail
139140
140- # Get list of source files into array
141- mapfile -t SOURCES < <(git ls-files '*.c' '*.cxx' '*.cpp' '*.h' '*.hpp')
141+ # Get list of source files into array (POSIX-compatible for macOS bash 3.2)
142+ SOURCES=()
143+ while IFS= read -r file; do
144+ SOURCES+=("$file")
145+ done < <(git ls-files '*.c' '*.cxx' '*.cpp' '*.h' '*.hpp')
142146
143147 # Register cleanup function to restore files on exit
144148 cleanup_files() {
You can’t perform that action at this time.
0 commit comments