Show duration of extension tests

pull/119/head
Michele Locati 2020-02-16 18:48:55 +01:00
parent 3e14522293
commit dc8ae7f666
No known key found for this signature in database
GPG Key ID: 98B7CE2E7234E28B
1 changed files with 4 additions and 1 deletions

View File

@ -237,9 +237,12 @@ testExtensionFor() {
fi
printf ' - Docker image: %s\n' "$testExtensionFor_Image"
testExtensionFor_out="$(mktemp)"
testExtensionFor_start=$(date +%s)
if $(docker run --rm --volume "$CI_BUILD_DIR:/app" --workdir /app "$testExtensionFor_Image" sh -c "./install-php-extensions $1 && php ./scripts/check-installed-extension.php $1" >"$testExtensionFor_out" 2>&1); then
testExtensionFor_end=$(date +%s)
testExtensionFor_delta=$(expr $testExtensionFor_end - $testExtensionFor_start)
rm -rf "$testExtensionFor_out"
printf ' - Passed\n'
printf ' - Passed in %s seconds\n' $testExtensionFor_delta
return 0
fi
printf ' - FAILED!\n' >&2