From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.77) (envelope-from ) id 1SkmUh-0003xy-Hp for garchives@archives.gentoo.org; Sat, 30 Jun 2012 01:29:03 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B5221E06FC; Sat, 30 Jun 2012 00:51:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 817A3E06FC for ; Sat, 30 Jun 2012 00:51:48 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E42091B4010 for ; Sat, 30 Jun 2012 00:51:47 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 50103E5438 for ; Sat, 30 Jun 2012 00:41:33 +0000 (UTC) From: "Davide Pesavento" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Davide Pesavento" Message-ID: <1341016802.21332a01b0600087a93411ca7524bd76e14d82d9.pesa@gentoo> Subject: [gentoo-commits] proj/qt:master commit in: eclass/ X-VCS-Repository: proj/qt X-VCS-Files: eclass/qt5-build.eclass X-VCS-Directories: eclass/ X-VCS-Committer: pesa X-VCS-Committer-Name: Davide Pesavento X-VCS-Revision: 21332a01b0600087a93411ca7524bd76e14d82d9 X-VCS-Branch: master Date: Sat, 30 Jun 2012 00:41:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: ec5e3f56-500c-470e-8972-81466c9ae34c X-Archives-Hash: 919e09da46777523fb601b93e0f9b2db commit: 21332a01b0600087a93411ca7524bd76e14d82d9 Author: Davide Pesavento gmail com> AuthorDate: Sat Jun 30 00:40:02 2012 +0000 Commit: Davide Pesavento gentoo org> CommitDate: Sat Jun 30 00:40:02 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/qt.git;a=3Dco= mmit;h=3D21332a01 [qt5-build.eclass] Initial implementation of src_test(). Still a work-in-progress. --- eclass/qt5-build.eclass | 27 +++++++++++++++++++++++---- 1 files changed, 23 insertions(+), 4 deletions(-) diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass index cf5df3a..f69eed6 100644 --- a/eclass/qt5-build.eclass +++ b/eclass/qt5-build.eclass @@ -48,12 +48,15 @@ case ${QT5_BUILD_TYPE} in ;; esac =20 -IUSE=3D"+c++11 debug +pch" +IUSE=3D"+c++11 debug +pch test" =20 DEPEND=3D"virtual/pkgconfig" -if [[ ${QT5_BUILD_TYPE} =3D=3D live ]]; then +if [[ ${QT5_BUILD_TYPE} =3D=3D "live" ]]; then DEPEND+=3D" dev-lang/perl" fi +if [[ ${PN} !=3D "qt-core" && ${PN} !=3D "qt-test" ]]; then + DEPEND+=3D" test? ( ~x11-libs/qt-test-${PV}[debug=3D] )" +fi =20 # @ECLASS-VARIABLE: PATCHES # @DEFAULT_UNSET @@ -282,8 +285,17 @@ qt5-build_src_compile() { # @DESCRIPTION: # Runs tests in target directories. qt5-build_src_test() { - # TODO - : + # TODO: find a way to avoid a circular dep between qt-core and qt-test + # TODO: generate a custom TESTRUNNER script that setups LD_LIBRARY_PATH + if [[ ${PN} !=3D "qt-core" ]]; then + tests() { + "${QT5_BUILD_DIR}"/bin/qmake \ + "${S}/${subdir}/${subdir##*/}.pro" \ + || die "qmake failed" + emake check + } + qt5_foreach_target_subdir tests + fi } =20 # @FUNCTION: qt5-build_src_install @@ -387,10 +399,17 @@ qt5_symlink_tools_to_buildtree() { qt5_foreach_target_subdir() { local subdir for subdir in "${QT5_TARGET_SUBDIRS[@]}"; do + if [[ ${EBUILD_PHASE} =3D=3D "test" ]]; then + subdir=3D${subdir/#src/tests\/auto} + [[ -d ${subdir} ]] || continue + fi + mkdir -p "${QT5_BUILD_DIR}/${subdir}" || die pushd "${QT5_BUILD_DIR}/${subdir}" > /dev/null || die + einfo "Running $* in ${subdir}" "$@" + popd > /dev/null || die done }