mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-07-19 00:47:28 +00:00
Improve the detection of keep-going commands
Have simpler patterns related to 'test' (the central objective being to keep going if 'make test' or 'tests/...' fails, but not if 'make tests' fails). Add 'cd' as a can't-keep-going command. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
202e9b4ed4
commit
76d40fa977
|
@ -538,13 +538,19 @@ pre_setup_keep_going () {
|
||||||
# Whether it makes sense to keep a component going after the specified
|
# Whether it makes sense to keep a component going after the specified
|
||||||
# command fails (test command) or not (configure or build).
|
# command fails (test command) or not (configure or build).
|
||||||
# This doesn't have to be 100% accurate: all failures are recorded anyway.
|
# This doesn't have to be 100% accurate: all failures are recorded anyway.
|
||||||
|
# False positives result in running things that can't be expected to
|
||||||
|
# work. False negatives result in things not running after something else
|
||||||
|
# failed even though they might have given useful feedback.
|
||||||
can_keep_going_after_failure () {
|
can_keep_going_after_failure () {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"msg "*) false;;
|
"msg "*) false;;
|
||||||
*[!A-Za-z]"test"|*[!A-Za-z]"test"[!A-Za-z]*) true;;
|
"cd "*) false;;
|
||||||
"tests/"*) true;;
|
*make*[\ /]tests*) false;; # make tests, make CFLAGS=-I../tests, ...
|
||||||
"grep "*|"! grep "*) true;;
|
*test*) true;; # make test, tests/stuff, env V=v tests/stuff, ...
|
||||||
"test "*|"[ "*) true;;
|
*make*check*) true;;
|
||||||
|
"grep "*) true;;
|
||||||
|
"[ "*) true;;
|
||||||
|
"! "*) true;;
|
||||||
*) false;;
|
*) false;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue