commit: aacf18af0892739127048628e6c8ea11f26fc4d2
Author: Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 12 08:18:57 2023 +0000
Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Thu Oct 12 15:52:27 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aacf18af
eclass/dotnet-pkg.eclass: add DOTNET_PKG_TEST_EXTRA_ARGS
Extra arguments to pass to the package test, in the "src_test" phase.
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>
eclass/dotnet-pkg.eclass | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/eclass/dotnet-pkg.eclass b/eclass/dotnet-pkg.eclass
index b4f0c053d69a..86ec2e5a7fc1 100644
--- a/eclass/dotnet-pkg.eclass
+++ b/eclass/dotnet-pkg.eclass
@@ -117,6 +117,28 @@ DOTNET_PKG_RESTORE_EXTRA_ARGS=()
# For more info see the "DOTNET_PROJECT" variable and "dotnet-pkg_src_compile".
DOTNET_PKG_BUILD_EXTRA_ARGS=()
+# @ECLASS_VARIABLE: DOTNET_PKG_TEST_EXTRA_ARGS
+# @DESCRIPTION:
+# Extra arguments to pass to the package test, in the "src_test" phase.
+#
+# This is passed only when testing found ".sln" solution files
+# (see also "dotnet-pkg-base_foreach-solution").
+# Other project builds do not use this variable.
+#
+# This variable should be set after inheriting "dotnet-pkg.eclass",
+# it is also advised that it is set after the variable
+# "DOTNET_PROJECT" (from "dotnet-pkg-base" eclass) is set.
+#
+# Default value is an empty array.
+#
+# Example:
+# @CODE
+# DOTNET_PKG_TEST_EXTRA_ARGS=( -p:RollForward=Major )
+# @CODE
+#
+# For more info see the "DOTNET_PROJECT" variable and "dotnet-pkg_src_test".
+DOTNET_PKG_TEST_EXTRA_ARGS=()
+
# @FUNCTION: dotnet-pkg_pkg_setup
# @DESCRIPTION:
# Default "pkg_setup" for the "dotnet-pkg" eclass.
@@ -215,7 +237,9 @@ dotnet-pkg_src_compile() {
# will execute wrong or incomplete test suite. Maintainers should inspect if
# any and/or correct tests are ran.
dotnet-pkg_src_test() {
- dotnet-pkg-base_foreach-solution "$(pwd)" dotnet-pkg-base_test
+ dotnet-pkg-base_foreach-solution \
+ "$(pwd)" \
+ dotnet-pkg-base_test "${DOTNET_PKG_TEST_EXTRA_ARGS[@]}"
}
# @FUNCTION: dotnet-pkg_src_install