commit:     af8bbe837be84424051c66815370eb411ba231c4
Author:     Davide Pesavento <pesa <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 10 00:36:34 2016 +0000
Commit:     Davide Pesavento <pesa <AT> gentoo <DOT> org>
CommitDate: Fri Jun 10 00:54:21 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af8bbe83

dev-util/qbs: make sure we skip all tests that have automagic deps

...to avoid spurious failures.

Gentoo-Bug: 585398

Package-Manager: portage-2.3.0_rc1

 dev-util/qbs/qbs-1.4.5.ebuild | 18 ++++++++++++------
 dev-util/qbs/qbs-1.5.0.ebuild | 13 ++++++++++++-
 2 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/dev-util/qbs/qbs-1.4.5.ebuild b/dev-util/qbs/qbs-1.4.5.ebuild
index bdbca00..f789f54 100644
--- a/dev-util/qbs/qbs-1.4.5.ebuild
+++ b/dev-util/qbs/qbs-1.4.5.ebuild
@@ -40,10 +40,6 @@ S=${WORKDIR}/${MY_P}
 src_prepare() {
        default
 
-       # disable tests that require nodejs (bug 527652)
-       sed -i -e 's/!haveNodeJs()/true/' \
-               tests/auto/blackbox/tst_blackbox.cpp || die
-
        if ! use examples; then
                sed -i -e '/INSTALLS +=/ s:examples::' static.pro || die
        fi
@@ -53,6 +49,16 @@ src_prepare() {
        else
                sed -i -e '/SUBDIRS =/ d' tests/tests.pro || die
        fi
+
+       # skip several tests that fail and/or have additional deps
+       sed -i \
+               -e 's/findArchiver("7z")/""/'           `# requires p7zip, 
fails` \
+               -e 's/findArchiver(binaryName,.*/"";/'  `# requires zip and 
jar` \
+               -e 's/p\.value("java\./true||&/'        `# requires jdk, fails, 
bug 585398` \
+               -e 's/!haveMakeNsis/true/'              `# requires nsis` \
+               -e 's/!haveWiX(profile)/true/'          `# requires wix` \
+               -e 's/!haveNodeJs()/true/'              `# requires nodejs, bug 
527652` \
+               tests/auto/blackbox/tst_blackbox.cpp || die
 }
 
 src_configure() {
@@ -74,14 +80,14 @@ src_test() {
        export HOME=${T}
        export LD_LIBRARY_PATH=${S}/$(get_libdir)
 
-       "${S}"/bin/qbs-setup-toolchains "${EROOT}usr/bin/gcc" gcc || die
+       "${S}"/bin/qbs-setup-toolchains /usr/bin/gcc gcc || die
        "${S}"/bin/qbs-setup-qt "$(qt5_get_bindir)/qmake" qbs_autotests || die
 
        einfo "Running autotests"
 
        # simply exporting LD_LIBRARY_PATH doesn't work
        # we have to use a custom testrunner script
-       local testrunner=${S}/gentoo-testrunner
+       local testrunner=${WORKDIR}/gentoo-testrunner
        cat <<-EOF > "${testrunner}"
        #!/bin/sh
        export 
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH}"

diff --git a/dev-util/qbs/qbs-1.5.0.ebuild b/dev-util/qbs/qbs-1.5.0.ebuild
index 9913d03..0f9c5e4 100644
--- a/dev-util/qbs/qbs-1.5.0.ebuild
+++ b/dev-util/qbs/qbs-1.5.0.ebuild
@@ -50,6 +50,17 @@ src_prepare() {
        else
                sed -i -e '/SUBDIRS =/ d' tests/tests.pro || die
        fi
+
+       # skip several tests that fail and/or have additional deps
+       sed -i \
+               -e 's/findArchiver("7z")/""/'           `# requires p7zip, 
fails` \
+               -e 's/findArchiver(binaryName,.*/"";/'  `# requires zip and 
jar` \
+               -e 's/p\.value("java\./true||&/'        `# requires jdk, fails, 
bug 585398` \
+               -e 's/!haveMakeNsis/true/'              `# requires nsis` \
+               -e 's/!haveWiX(profile)/true/'          `# requires wix` \
+               -e 's/p\.value("nodejs\./true||&/'      `# requires nodejs, bug 
527652` \
+               -e 
's/\(p\.value\|m_qbsStderr\.contains\)("typescript\./true||&/' `# requires 
nodejs and typescript` \
+               tests/auto/blackbox/tst_blackbox.cpp || die
 }
 
 src_configure() {
@@ -78,7 +89,7 @@ src_test() {
 
        # simply exporting LD_LIBRARY_PATH doesn't work
        # we have to use a custom testrunner script
-       local testrunner=${S}/gentoo-testrunner
+       local testrunner=${WORKDIR}/gentoo-testrunner
        cat <<-EOF > "${testrunner}"
        #!/bin/sh
        export 
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH}"

Reply via email to