mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-13 11:42:38 +03:00
611bbc43be
Build a new version of Serenity in CI that doesn't have all the debug symbols on, or we'd be waiting a very long time to boot. Insert a TestRunner entry into SystemServer.ini that will run a shell script that runs tests in /bin and /usr/Tests and shuts down the system in the new self-test boot mode. Also make sure enough basic services are started in self-test such that the tests will actually run properly.
36 lines
788 B
Bash
Executable File
36 lines
788 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -eo pipefail
|
|
|
|
script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
|
|
cd "$script_path/.."
|
|
|
|
if [ "$#" -eq "0" ]; then
|
|
mapfile -t files < <(
|
|
git ls-files -- \
|
|
'*.sh' \
|
|
':!:Toolchain' \
|
|
':!:Ports' \
|
|
':!:Userland/Shell/Tests' \
|
|
':!:Base/home/anon/tests'
|
|
)
|
|
else
|
|
files=()
|
|
for file in "$@"; do
|
|
if [[ "${file}" == *".sh" ]]; then
|
|
files+=("${file}")
|
|
fi
|
|
done
|
|
fi
|
|
|
|
if (( ${#files[@]} )); then
|
|
if ! command -v shellcheck &>/dev/null ; then
|
|
echo "shellcheck is not available, but shell files need linting! Either skip this script, or install shellcheck."
|
|
exit 1
|
|
fi
|
|
|
|
shellcheck "${files[@]}"
|
|
else
|
|
echo "No .sh files to check."
|
|
fi
|