summaryrefslogtreecommitdiff
path: root/eclass/tests/python-utils-r1.sh
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-01-04 01:27:12 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-01-04 01:27:12 +0000
commit3517852e3b8a68d1e997770fc0650c5053bafc6c (patch)
tree44068672445b1418489aed82de58df3c470289e7 /eclass/tests/python-utils-r1.sh
parent0f15659d48c193027158492acb726297501202c5 (diff)
gentoo resync : 04.01.2022
Diffstat (limited to 'eclass/tests/python-utils-r1.sh')
-rwxr-xr-xeclass/tests/python-utils-r1.sh48
1 files changed, 12 insertions, 36 deletions
diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index 63a94c90b715..7ba4a864ff10 100755
--- a/eclass/tests/python-utils-r1.sh
+++ b/eclass/tests/python-utils-r1.sh
@@ -151,7 +151,7 @@ test_var EPYTHON pypy3 pypy3
test_var PYTHON pypy3 /usr/bin/pypy3
if [[ -x /usr/bin/pypy3 ]]; then
test_var PYTHON_SITEDIR pypy3 "/usr/lib*/pypy3.?/site-packages"
- test_var PYTHON_INCLUDEDIR pypy3 "/usr/lib*/pypy3.?/include"
+ test_var PYTHON_INCLUDEDIR pypy3 "/usr/include/pypy3.?"
fi
test_var PYTHON_PKG_DEP pypy3 '*dev-python/pypy3*:0='
test_var PYTHON_SCRIPTDIR pypy3 /usr/lib/python-exec/pypy3
@@ -162,68 +162,44 @@ test_is "python_is_python3 pypy" 1
test_is "python_is_python3 pypy3" 0
# generic shebangs
-test_fix_shebang '#!/usr/bin/python' python2.7 '#!/usr/bin/python2.7'
test_fix_shebang '#!/usr/bin/python' python3.6 '#!/usr/bin/python3.6'
test_fix_shebang '#!/usr/bin/python' pypy3 '#!/usr/bin/pypy3'
# python2/python3 matching
-test_fix_shebang '#!/usr/bin/python2' python2.7 '#!/usr/bin/python2.7'
-test_fix_shebang '#!/usr/bin/python3' python2.7 FAIL
-test_fix_shebang '#!/usr/bin/python3' python2.7 '#!/usr/bin/python2.7' --force
test_fix_shebang '#!/usr/bin/python3' python3.6 '#!/usr/bin/python3.6'
test_fix_shebang '#!/usr/bin/python2' python3.6 FAIL
test_fix_shebang '#!/usr/bin/python2' python3.6 '#!/usr/bin/python3.6' --force
# pythonX.Y matching (those mostly test the patterns)
-test_fix_shebang '#!/usr/bin/python2.7' python2.7 '#!/usr/bin/python2.7'
test_fix_shebang '#!/usr/bin/python2.7' python3.2 FAIL
test_fix_shebang '#!/usr/bin/python2.7' python3.2 '#!/usr/bin/python3.2' --force
test_fix_shebang '#!/usr/bin/python3.2' python3.2 '#!/usr/bin/python3.2'
-test_fix_shebang '#!/usr/bin/python3.2' python2.7 FAIL
-test_fix_shebang '#!/usr/bin/python3.2' python2.7 '#!/usr/bin/python2.7' --force
-test_fix_shebang '#!/usr/bin/pypy' python2.7 FAIL
-test_fix_shebang '#!/usr/bin/pypy' python2.7 '#!/usr/bin/python2.7' --force
# fancy path handling
test_fix_shebang '#!/mnt/python2/usr/bin/python' python3.6 \
'#!/mnt/python2/usr/bin/python3.6'
-test_fix_shebang '#!/mnt/python2/usr/bin/python2' python2.7 \
- '#!/mnt/python2/usr/bin/python2.7'
-test_fix_shebang '#!/mnt/python2/usr/bin/env python' python2.7 \
- '#!/mnt/python2/usr/bin/env python2.7'
-test_fix_shebang '#!/mnt/python2/usr/bin/python2 python2' python2.7 \
- '#!/mnt/python2/usr/bin/python2.7 python2'
-test_fix_shebang '#!/mnt/python2/usr/bin/python3 python2' python2.7 FAIL
-test_fix_shebang '#!/mnt/python2/usr/bin/python3 python2' python2.7 \
- '#!/mnt/python2/usr/bin/python2.7 python2' --force
-test_fix_shebang '#!/usr/bin/foo' python2.7 FAIL
+test_fix_shebang '#!/mnt/python2/usr/bin/python3' python3.8 \
+ '#!/mnt/python2/usr/bin/python3.8'
+test_fix_shebang '#!/mnt/python2/usr/bin/env python' python3.8 \
+ '#!/mnt/python2/usr/bin/env python3.8'
+test_fix_shebang '#!/mnt/python2/usr/bin/python3 python3' python3.8 \
+ '#!/mnt/python2/usr/bin/python3.8 python3'
+test_fix_shebang '#!/mnt/python2/usr/bin/python2 python3' python3.8 FAIL
+test_fix_shebang '#!/mnt/python2/usr/bin/python2 python3' python3.8 \
+ '#!/mnt/python2/usr/bin/python3.8 python3' --force
+test_fix_shebang '#!/usr/bin/foo' python3.8 FAIL
# regression test for bug #522080
-test_fix_shebang '#!/usr/bin/python ' python2.7 '#!/usr/bin/python2.7 '
+test_fix_shebang '#!/usr/bin/python ' python3.8 '#!/usr/bin/python3.8 '
# check _python_impl_matches behavior
-test_is "_python_impl_matches python2_7 -2" 0
-test_is "_python_impl_matches python3_6 -2" 1
-test_is "_python_impl_matches python3_7 -2" 1
-test_is "_python_impl_matches pypy3 -2" 1
-test_is "_python_impl_matches python2_7 -3" 1
test_is "_python_impl_matches python3_6 -3" 0
test_is "_python_impl_matches python3_7 -3" 0
test_is "_python_impl_matches pypy3 -3" 0
-test_is "_python_impl_matches python2_7 -2 python3_6" 0
-test_is "_python_impl_matches python3_6 -2 python3_6" 0
-test_is "_python_impl_matches python3_7 -2 python3_6" 1
-test_is "_python_impl_matches pypy3 -2 python3_6" 1
-test_is "_python_impl_matches python2_7 pypy3 -2 python3_6" 0
-test_is "_python_impl_matches python3_6 pypy3 -2 python3_6" 0
-test_is "_python_impl_matches python3_7 pypy3 -2 python3_6" 1
-test_is "_python_impl_matches pypy3 pypy3 -2 python3_6" 0
set -f
-test_is "_python_impl_matches python2_7 pypy*" 1
test_is "_python_impl_matches python3_6 pypy*" 1
test_is "_python_impl_matches python3_7 pypy*" 1
test_is "_python_impl_matches pypy3 pypy*" 0
-test_is "_python_impl_matches python2_7 python*" 0
test_is "_python_impl_matches python3_6 python*" 0
test_is "_python_impl_matches python3_7 python*" 0
test_is "_python_impl_matches pypy3 python*" 1