diff options
author | Yuan Liao <liaoyuan@gmail.com> | 2022-12-05 10:01:05 -0800 |
---|---|---|
committer | Yuan Liao <liaoyuan@gmail.com> | 2022-12-05 10:01:05 -0800 |
commit | b010132352bb0f511b673b208ce080af29023b9a (patch) | |
tree | 51f2cfab55d58e9dba9a7e4a8cedac6125968939 /games-emulation | |
parent | net-p2p/p2pool: fix metadata.xml (diff) | |
download | guru-b010132352bb0f511b673b208ce080af29023b9a.tar.gz guru-b010132352bb0f511b673b208ce080af29023b9a.tar.bz2 guru-b010132352bb0f511b673b208ce080af29023b9a.zip |
games-emulation/dosbox-x: Enable unit tests
Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
Diffstat (limited to 'games-emulation')
-rw-r--r-- | games-emulation/dosbox-x/dosbox-x-2022.08.0.ebuild | 8 | ||||
-rw-r--r-- | games-emulation/dosbox-x/dosbox-x-9999.ebuild | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/games-emulation/dosbox-x/dosbox-x-2022.08.0.ebuild b/games-emulation/dosbox-x/dosbox-x-2022.08.0.ebuild index 55b6b1acc..396f0023f 100644 --- a/games-emulation/dosbox-x/dosbox-x-2022.08.0.ebuild +++ b/games-emulation/dosbox-x/dosbox-x-2022.08.0.ebuild @@ -25,6 +25,8 @@ LICENSE="GPL-2" SLOT="0" IUSE="X debug ffmpeg fluidsynth freetype opengl png slirp" +# Unit tests are only available in debug builds +RESTRICT="!debug? ( test )" BDEPEND=" dev-lang/nasm @@ -151,6 +153,12 @@ src_compile() { emake AR="$(tc-getAR)" } +src_test() { + set -- src/dosbox-x -tests + echo "${@}" >&2 + "${@}" || die "Unit tests failed" +} + pkg_preinst() { xdg_pkg_preinst diff --git a/games-emulation/dosbox-x/dosbox-x-9999.ebuild b/games-emulation/dosbox-x/dosbox-x-9999.ebuild index 3fb2d9f29..fba8467c0 100644 --- a/games-emulation/dosbox-x/dosbox-x-9999.ebuild +++ b/games-emulation/dosbox-x/dosbox-x-9999.ebuild @@ -25,6 +25,8 @@ LICENSE="GPL-2" SLOT="0" IUSE="X debug ffmpeg fluidsynth freetype opengl png slirp" +# Unit tests are only available in debug builds +RESTRICT="!debug? ( test )" BDEPEND=" dev-lang/nasm @@ -118,6 +120,12 @@ src_compile() { emake AR="$(tc-getAR)" } +src_test() { + set -- src/dosbox-x -tests + echo "${@}" >&2 + "${@}" || die "Unit tests failed" +} + pkg_preinst() { xdg_pkg_preinst |