ghostty/test/run-all.sh
Bryan Lee cbb3f6f64f ci: add shellcheck linting for shell scripts
Add shellcheck to CI pipeline to ensure shell scripts follow best practices
and catch common errors. Fix existing shellcheck warnings in test scripts
to pass the new linting requirements.
2025-07-11 02:54:05 +08:00

24 lines
634 B
Bash
Executable File

#!/usr/bin/env bash
#
# Run all of the test cases. All test cases are found by traversing
# the "cases" directory, finding all shell files, and executing the
# "./run-host.sh" command for each.
DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
# We always copy the bin in case it was rebuilt
cp ${DIR}/../zig-out/bin/ghostty ${DIR}/
# Unix shortcut to just execute ./run-host for each one. We can do
# this less esoterically if we ever wanted.
find ${DIR}/cases \
-type f \
-name '*.sh' | \
sort | \
parallel \
--will-cite \
${DIR}/run-host.sh \
--case '{}' \
--rewrite-abs-path \
"$@"