• [gentoo-dev] [PATCH 2/6] eclass/tests/python-utils-r1.sh: Streamline th

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Sun May 8 20:30:01 2022
    Streamline the python-utils-r1.eclass tests to use a for loop instead
    of copying the same tests over and over again. While at it, group tests
    by purpose.

    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/tests/python-utils-r1.sh | 112 ++++++++------------------------
    1 file changed, 28 insertions(+), 84 deletions(-)

    diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh index e0fc0aab3c03..d971c524b373 100755
    --- a/eclass/tests/python-utils-r1.sh
    +++ b/eclass/tests/python-utils-r1.sh
    @@ -64,6 +64,8 @@ tmpfile=$(mktemp)

    inherit python-utils-r1

    +ebegin "Testing python2.7"
    +eindent
    test_var EPYTHON python2_7 python2.7
    test_var PYTHON python2_7 /usr/bin/python2.7
    if [[ -x /usr/bin/python2.7 ]]; then
    @@ -76,91 +78,29 @@ if [[ -x /usr/bin/python2.7 ]]; then
    fi
    test_var PYTHON_PKG_DEP python2_7 '*dev-lang/python*:2.7'
    test_var PYTHON_SCRIPTDIR python2_7 /usr/lib/python-exec/python2.7
    +eoutdent

    -test_var EPYTHON python3_6 python3.6
    -test_var PYTHON python3_6 /usr/bin/python3.6
    -if [[ -x /usr/bin/python3.6 ]]; then
    - abiflags=$(/usr/bin/python3.6 -c 'import sysconfig; print(sysconfig.get_config_var("ABIFLAGS"))')
    - test_var PYTHON_SITEDIR pytho