crystal-utils.eclass: add crystal_spec function

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
Anna (cybertailor) Vyalkova
2023-05-08 23:53:50 +05:00
parent a908862549
commit 4711450809
2 changed files with 9 additions and 1 deletions

View File

@@ -164,4 +164,12 @@ crystal_build() {
ecrystal build "${build_args[@]}" "${@}"
}
# @FUNCTION: crystal_spec
# @USAGE: [<args>...]
# @DESCRIPTION:
# Function for running tests. All arguments are passed to crystal.
crystal_spec() {
ecrystal spec --verbose "${@}" || die -n "Tests failed"
}
fi

View File

@@ -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