commit: f7df4a89670128538ea91352b878b6aa56253a36 Author: Maciej Barć <xgqt <AT> gentoo <DOT> org> AuthorDate: Sat Feb 3 13:23:28 2024 +0000 Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org> CommitDate: Sat Feb 10 16:24:45 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7df4a89
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 <AT> gentoo.org> eclass/dotnet-pkg-base.eclass | 24 ++++++++---------------- 1 file 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