mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-25 15:01:22 +01:00
FIX: tests return value that was always 255
Return values tells the number of failed tests up to 254 255 being the return value for runtime errors
This commit is contained in:
parent
9ba0361be0
commit
13c88c7da2
@ -27,8 +27,8 @@ if [ ! -f "$dockerfile" ] ; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trap 'docker rm debian_cis_test_${target}' EXIT HUP INT
|
|
||||||
|
|
||||||
docker build -f "$dockerfile" -t "debian_cis_test:${target}" "$(dirname "$0")"/../
|
docker build -f "$dockerfile" -t "debian_cis_test:${target}" "$(dirname "$0")"/../
|
||||||
|
|
||||||
docker run --name debian_cis_test_"${target}" debian_cis_test:"${target}" "$@"
|
docker run --rm debian_cis_test:"${target}" "$@"
|
||||||
|
|
||||||
|
@ -7,10 +7,11 @@ set -u
|
|||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
mytmpdir=$(mktemp -d -t debian-cis-test.XXXXXX)
|
mytmpdir=$(mktemp -d -t debian-cis-test.XXXXXX)
|
||||||
|
totalerrors=255
|
||||||
|
|
||||||
cleanup_and_exit() {
|
cleanup_and_exit() {
|
||||||
rm -rf "$mytmpdir"
|
rm -rf "$mytmpdir"
|
||||||
exit 255
|
exit $totalerrors
|
||||||
}
|
}
|
||||||
trap "cleanup_and_exit" EXIT HUP INT
|
trap "cleanup_and_exit" EXIT HUP INT
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user