games-emulation/dosbox-x: Set XDG_CONFIG_HOME for tests

Since upstream commit 25f23a25c (Log loaded conf file, 2024-11-09),
DOSBox-X creates a default configuration file if an existing file does
not exist when its binary is launched, even when it is just to run self
tests.  When Portage runs the tests, to ensure the tests can start
without an error or even a segmentation fault, the 'portage' user must
have permission to the path where DOSBox-X will create the configuration
file.

Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
This commit is contained in:
Yuan Liao
2024-12-14 11:30:38 -05:00
parent 6b08df8927
commit 08f413c387

View File

@@ -151,6 +151,7 @@ src_compile() {
}
src_test() {
local -x XDG_CONFIG_HOME="${T}" # Tests may create configuration files
set -- src/dosbox-x -tests
echo "${@}" >&2
"${@}" || die "Unit tests failed"