fish-shell/docker/context/fish_run_tests.sh

25 lines
572 B
Bash
Raw Normal View History

#!/bin/bash
# This script is copied into the root directory of our Docker tests.
# It is the entry point for running Docker-based tests.
cd ~/fish-build
git config --global --add safe.directory /fish-source
2024-01-12 11:18:27 +00:00
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug /fish-source "$@"
# Spawn a shell if FISH_RUN_SHELL_BEFORE_TESTS is set.
if test -n "$FISH_RUN_SHELL_BEFORE_TESTS"
then
bash -i || exit
fi
ninja && ninja fish_run_tests
RES=$?
# Drop the user into a shell if FISH_RUN_SHELL_AFTER_TESTS is set.
if test -n "$FISH_RUN_SHELL_AFTER_TESTS"; then
bash -i
fi
exit $RES