summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-07-02 09:08:33 +0200
committerMichał Górny <mgorny@gentoo.org>2020-07-02 10:29:15 +0200
commitf60282d584bf9456f4a2ec2a1ebdf87f33b82ea2 (patch)
treefb6c801b51ed85a764405aea05c1ad7b0756e7f9 /eclass
parenteclass/tests/distutils-r1.sh: update for EAPI=7 / py3.8 (diff)
downloadgentoo-f60282d584bf9456f4a2ec2a1ebdf87f33b82ea2.tar.gz
gentoo-f60282d584bf9456f4a2ec2a1ebdf87f33b82ea2.tar.bz2
gentoo-f60282d584bf9456f4a2ec2a1ebdf87f33b82ea2.zip
eclass/tests/distutils-r1.sh: Normalize whitespace
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rwxr-xr-xeclass/tests/distutils-r1.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/eclass/tests/distutils-r1.sh b/eclass/tests/distutils-r1.sh
index b511e19d9e72..237fc1eebae1 100755
--- a/eclass/tests/distutils-r1.sh
+++ b/eclass/tests/distutils-r1.sh
@@ -31,13 +31,16 @@ test-distutils_enable_tests() {
distutils_enable_tests "${runner}"
- local ret var
+ local ret var val
for var in IUSE RESTRICT BDEPEND; do
local exp_var=exp_${var}
- if [[ ${!var} != "${!exp_var}" ]]; then
+ # (this normalizes whitespace)
+ read -a val <<<"${!var}"
+ val=${val[*]}
+ if [[ ${val} != "${!exp_var}" ]]; then
eindent
eerror "${var} expected: ${!exp_var}"
- eerror "${var} actual: ${!var}"
+ eerror "${var} actual: ${val}"
eoutdent
ret=1
tret=1
@@ -64,15 +67,15 @@ einfo distutils_enable_tests
eindent
BASE_IUSE="python_targets_python3_8"
BASE_DEPS="python_targets_python3_8? ( dev-lang/python:3.8 ) >=dev-lang/python-exec-2:=[python_targets_python3_8(-)?,-python_single_target_python3_8(-)]"
-TEST_RESTRICT=" !test? ( test )"
+TEST_RESTRICT="!test? ( test )"
einfo "empty RDEPEND"
eindent
RDEPEND=""
test-distutils_enable_tests pytest \
- "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? ( >=dev-python/pytest-4.5.0[${PYTHON_USEDEP}] )"
+ "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? ( >=dev-python/pytest-4.5.0[${PYTHON_USEDEP}] )"
test-distutils_enable_tests nose \
- "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? ( >=dev-python/nose-1.3.7-r4[${PYTHON_USEDEP}] )"
+ "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? ( >=dev-python/nose-1.3.7-r4[${PYTHON_USEDEP}] )"
test-distutils_enable_tests unittest \
"${BASE_IUSE}" "" "${BASE_DEPS}"
test-distutils_enable_tests setup.py \