2020-11-22 05:55:15 +08:00
|
|
|
#!/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
|
2024-04-28 16:27:29 +08:00
|
|
|
git config --global --add safe.directory /fish-source
|
2024-01-12 19:18:27 +08:00
|
|
|
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug /fish-source "$@"
|
2020-11-22 05:55:15 +08:00
|
|
|
|
|
|
|
# Spawn a shell if FISH_RUN_SHELL_BEFORE_TESTS is set.
|
|
|
|
if test -n "$FISH_RUN_SHELL_BEFORE_TESTS"
|
|
|
|
then
|
|
|
|
bash -i || exit
|
|
|
|
fi
|
|
|
|
|
2021-11-27 05:13:08 +08:00
|
|
|
ninja && ninja fish_run_tests
|
2022-10-24 01:13:52 +08:00
|
|
|
RES=$?
|
2020-11-22 05:55:15 +08:00
|
|
|
|
|
|
|
# Drop the user into a shell if FISH_RUN_SHELL_AFTER_TESTS is set.
|
2022-10-24 01:13:52 +08:00
|
|
|
if test -n "$FISH_RUN_SHELL_AFTER_TESTS"; then
|
|
|
|
bash -i
|
|
|
|
fi
|
|
|
|
|
|
|
|
exit $RES
|