summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2023-03-25 09:14:42 +0100
committerHans de Graaff <graaff@gentoo.org>2023-03-26 08:29:43 +0200
commitd953ea8c71c24e2af21db0554ed18f7c17f13162 (patch)
tree6cf9129eb569415c8c12f5b303acbc944b5331f5 /eclass/ruby-ng.eclass
parenteclass/ruby-fakegem.eclass: warn when using an unknown test recipe (diff)
downloadgentoo-d953ea8c71c24e2af21db0554ed18f7c17f13162.tar.gz
gentoo-d953ea8c71c24e2af21db0554ed18f7c17f13162.tar.bz2
gentoo-d953ea8c71c24e2af21db0554ed18f7c17f13162.zip
eclass/ruby-fakegem.eclass: add support for sus test runner
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'eclass/ruby-ng.eclass')
-rw-r--r--eclass/ruby-ng.eclass25
1 files changed, 25 insertions, 0 deletions
diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass
index f85a933f81d9..c273a431c5b1 100644
--- a/eclass/ruby-ng.eclass
+++ b/eclass/ruby-ng.eclass
@@ -757,6 +757,31 @@ ruby-ng_cucumber() {
CUCUMBER_PUBLISH_QUIET=true ${RUBY} -S cucumber ${cucumber_params} "$@" || die -n "cucumber failed"
}
+# @FUNCTION: ruby-ng_sus
+# @DESCRIPTION:
+# This is simply a wrapper around the sus-parallel command (executed by $RUBY})
+# which also respects TEST_VERBOSE and NOCOLOR environment variables.
+ruby-ng_sus() {
+ debug-print-function ${FUNCNAME} "${@}"
+
+ if [[ "${DEPEND}${BDEPEND}" != *"dev-ruby/sus"* ]]; then
+ ewarn "Missing test dependency dev-ruby/sus"
+ fi
+
+ local sus_params=
+
+ # sus has a --verbose argument but it does not seem to impact the output (yet?)
+ case ${TEST_VERBOSE} in
+ 1|yes|true)
+ sus_params+=" --verbose"
+ ;;
+ *)
+ ;;
+ esac
+
+ ${RUBY} -S sus-parallel ${sus_params} "$@" || die -n "sus failed"
+}
+
# @FUNCTION: ruby-ng_testrb-2
# @DESCRIPTION:
# This is simply a replacement for the testrb command that load the test