summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-09-23 04:03:12 +0000
committerMike Frysinger <vapier@gentoo.org>2011-09-23 04:03:12 +0000
commit09e892693aac154d9744858deb1f207f6f511e19 (patch)
treef7f41d6df01866b702f5ba090a85dca719c50d0f /eclass/tests
parentVersion bump. (diff)
downloadgentoo-2-09e892693aac154d9744858deb1f207f6f511e19.tar.gz
gentoo-2-09e892693aac154d9744858deb1f207f6f511e19.tar.bz2
gentoo-2-09e892693aac154d9744858deb1f207f6f511e19.zip
add die and has_version helpers
Diffstat (limited to 'eclass/tests')
-rw-r--r--eclass/tests/tests-common.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/eclass/tests/tests-common.sh b/eclass/tests/tests-common.sh
index 8b6869bc5b47..4de0f7bac46b 100644
--- a/eclass/tests/tests-common.sh
+++ b/eclass/tests/tests-common.sh
@@ -11,7 +11,7 @@ inherit() {
debug-print() {
[[ ${#} -eq 0 ]] && return
-
+
if [[ ${ECLASS_DEBUG_OUTPUT} == on ]]; then
printf 'debug: %s\n' "${@}" >&2
elif [[ -n ${ECLASS_DEBUG_OUTPUT} ]]; then
@@ -37,3 +37,12 @@ has() {
done
return 1
}
+
+die() {
+ echo "die: $*" 1>&2
+ exit 1
+}
+
+has_version() {
+ portageq has_version / "$@"
+}