summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMaciej Barć <xgqt@gentoo.org>2024-02-03 14:23:28 +0100
committerMaciej Barć <xgqt@gentoo.org>2024-02-10 17:24:45 +0100
commitf7df4a89670128538ea91352b878b6aa56253a36 (patch)
treec64aac47b7c0cbf23c333783ca70939567c5f2f1 /eclass
parenteclass/dotnet-pkg-base.eclass: deprecate wrong-style names (diff)
downloadgentoo-f7df4a89670128538ea91352b878b6aa56253a36.tar.gz
gentoo-f7df4a89670128538ea91352b878b6aa56253a36.tar.bz2
gentoo-f7df4a89670128538ea91352b878b6aa56253a36.zip
eclass/dotnet-pkg-base.eclass: dotnet-pkg-base_test - remove directory magic
remove broken directory magic from the "dotnet-pkg-base_test" function, now the eclass consumers can pass the directory as the last argument and let the dotnet executable handle arguments instead of putting the weight on the eclass, also update the "dotnet-pkg-base_restore_tools" function documentation Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/dotnet-pkg-base.eclass24
1 files changed, 8 insertions, 16 deletions
diff --git a/eclass/dotnet-pkg-base.eclass b/eclass/dotnet-pkg-base.eclass
index 8ac8939ac559..ff93c1db9636 100644
--- a/eclass/dotnet-pkg-base.eclass
+++ b/eclass/dotnet-pkg-base.eclass
@@ -402,8 +402,8 @@ dotnet-pkg-base_restore_tools() {
# Build is performed in current directory unless a different directory is
# passed via "args".
#
-# Additionally any number of "args" maybe be given, they are appended to
-# the "dotnet" command invocation.
+# Any number of "args" maybe be given, they are appended to the "dotnet"
+# command invocation.
#
# Used by "dotnet-pkg_src_compile" from the "dotnet-pkg" eclass.
dotnet-pkg-base_build() {
@@ -434,27 +434,19 @@ dotnet-pkg-base_build() {
}
# @FUNCTION: dotnet-pkg-base_test
-# @USAGE: [directory] [args] ...
+# @USAGE: [args] ...
# @DESCRIPTION:
# Test the package using "dotnet test" in a specified directory.
+# Test is performed in current directory unless a different directory is
+# passed via "args".
#
-# Optional "directory" argument defaults to the current directory path.
-#
-# Additionally any number of "args" maybe be given, they are appended to
-# the "dotnet" command invocation.
+# Any number of "args" maybe be given, they are appended to the "dotnet"
+# command invocation.
#
# Used by "dotnet-pkg_src_test" from the "dotnet-pkg" eclass.
dotnet-pkg-base_test() {
debug-print-function "${FUNCNAME[0]}" "${@}"
- local directory
- if [[ -n "${1}" ]] ; then
- directory="${1}"
- shift
- else
- directory="$(pwd)"
- fi
-
local -a test_args=(
--configuration "${DOTNET_PKG_CONFIGURATION}"
--no-restore
@@ -462,7 +454,7 @@ dotnet-pkg-base_test() {
"${@}"
)
- edotnet test "${test_args[@]}" "${directory}"
+ edotnet test "${test_args[@]}"
}
# @FUNCTION: dotnet-pkg-base_install