mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-15 14:41:14 -03:00
Some changes fix actual problems, e.g. missing spaces in square bracket tests,
and backticks unintentionally causing code execution when intended as formatting.
Others, such as conservative quoting probably work fine in the old version in
most situations, but it's nice to have some additional safety.
Using `{ ..; }` instead of `(..)` is just a small performance enhancement.
Many of these issues were identified by shellcheck, which might be useful in CI
as well.
27 lines
580 B
Bash
Executable File
27 lines
580 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
# 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
|
|
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
|
|
fi
|
|
|
|
(set +e; 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
|