commit:     ce3ab4da0104f11777d55456c935783f27d8b1cb
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 18 16:44:11 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Sep 18 16:55:56 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce3ab4da

dev-util/scons: Apply test cleanup only with USE=test

Closes: https://bugs.gentoo.org/743373
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-util/scons/scons-4.0.1.ebuild | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/dev-util/scons/scons-4.0.1.ebuild 
b/dev-util/scons/scons-4.0.1.ebuild
index 11498c389cf..2b0730c7f7c 100644
--- a/dev-util/scons/scons-4.0.1.ebuild
+++ b/dev-util/scons/scons-4.0.1.ebuild
@@ -63,15 +63,17 @@ src_prepare() {
        sed -i -e '/cmdclass/,/},$/d' \
                -e '/data_files/s:man/:share/man/:' "${S}"/setup.py || die
 
-       local remove_tests=(
-               # TODO: does not respect PATH?
-               test/Clang
-               # broken
-               test/DVIPDF/DVIPDFFLAGS.py
-               test/Java/swig-dependencies.py
-               test/Java/multi-step.py
-       )
-       rm -r "${remove_tests[@]}" || die
+       if use test; then
+               local remove_tests=(
+                       # TODO: does not respect PATH?
+                       test/Clang
+                       # broken
+                       test/DVIPDF/DVIPDFFLAGS.py
+                       test/Java/swig-dependencies.py
+                       test/Java/multi-step.py
+               )
+               rm -r "${remove_tests[@]}" || die
+       fi
 }
 
 python_test() {

Reply via email to