diff --git a/eclass/crystal-utils.eclass b/eclass/crystal-utils.eclass index 3c0b7d48aa..8456c5af64 100644 --- a/eclass/crystal-utils.eclass +++ b/eclass/crystal-utils.eclass @@ -164,4 +164,12 @@ crystal_build() { ecrystal build "${build_args[@]}" "${@}" } +# @FUNCTION: crystal_spec +# @USAGE: [...] +# @DESCRIPTION: +# Function for running tests. All arguments are passed to crystal. +crystal_spec() { + ecrystal spec --verbose "${@}" || die -n "Tests failed" +} + fi diff --git a/eclass/shards.eclass b/eclass/shards.eclass index 122464cc51..5fd9f6c100 100644 --- a/eclass/shards.eclass +++ b/eclass/shards.eclass @@ -87,7 +87,7 @@ shards_src_test() { debug-print-function ${FUNCNAME} "${@}" if [[ -d "spec" ]]; then - ecrystal spec --verbose "${@}" || die "Tests failed" + crystal_spec "${@}" fi return 0