diff options
Diffstat (limited to 'abuild.in')
-rw-r--r-- | abuild.in | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -73,6 +73,7 @@ want_check() { [ -n "$ABUILD_BOOTSTRAP" ] && return 1 cross_compiling && return 1 options_has "!check" && return 1 + options_has "checkx11" && checkdepends="$checkdepends xvfb dbus-x11" return 0 } @@ -1533,6 +1534,9 @@ build_abuildrepo() { if options_has "checkroot"; then _check=check_fakeroot fi + if options_has "checkx11"; then + _check=check_x11 + fi if ! want_check; then _check=true fi @@ -1787,6 +1791,14 @@ check_fakeroot() { do_fakeroot "$abuild_path" $forceroot $color_opt $keep_build check } +# wrap check() for tests requiring X11 and/or D-Bus +check_x11() { + cd "$startdir" + Xvfb :7 -screen 0 1280x1024x24 -fbdir /tmp & + trap "kill %1" 0 + env DISPLAY=:7 dbus-run-session "$abuild_path" $forceroot $color_opt $keep_build check +} + # build and package in fakeroot rootpkg() { cd "$startdir" |