diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-01-15 15:51:32 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-01-15 15:51:32 +0000 |
commit | 21435953e16cda318a82334ddbadb3b5c36d9ea7 (patch) | |
tree | e1810a4b135afce04b34862ef0fab2bfaeb8aeca /eclass/tests | |
parent | 7bc9c63c9da678a7e6fceb095d56c634afd22c56 (diff) |
gentoo resync : 15.01.2020
Diffstat (limited to 'eclass/tests')
-rwxr-xr-x | eclass/tests/flag-o-matic.sh | 4 | ||||
-rwxr-xr-x | eclass/tests/python-utils-r1.sh | 10 | ||||
-rwxr-xr-x | eclass/tests/toolchain.sh | 12 |
3 files changed, 18 insertions, 8 deletions
diff --git a/eclass/tests/flag-o-matic.sh b/eclass/tests/flag-o-matic.sh index b0b97ea0bc1e..90eaf3a6ffb0 100755 --- a/eclass/tests/flag-o-matic.sh +++ b/eclass/tests/flag-o-matic.sh @@ -8,7 +8,7 @@ inherit flag-o-matic CFLAGS="-a -b -c=1 --param l1-cache-size=32" CXXFLAGS="-x -y -z=2" -LDFLAGS="-l -m -n=3" +LDFLAGS="-l -m -n=3 -Wl,--remove-me" ftend() { local ret=$? local msg="Failed; flags are:" @@ -53,7 +53,7 @@ done <<<" 1 -n " -tbegin "strip-unsupported-flags" +tbegin "strip-unsupported-flags for -z=2" strip-unsupported-flags [[ ${CFLAGS} == "--param l1-cache-size=32" ]] && [[ ${CXXFLAGS} == "-z=2" ]] && [[ ${LDFLAGS} == "" ]] ftend diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh index e883da38cead..279324e163ba 100755 --- a/eclass/tests/python-utils-r1.sh +++ b/eclass/tests/python-utils-r1.sh @@ -109,7 +109,7 @@ if [[ -x /usr/bin/pypy ]]; then test_var PYTHON_SITEDIR pypy "/usr/lib*/pypy2.7/site-packages" test_var PYTHON_INCLUDEDIR pypy "/usr/lib*/pypy2.7/include" fi -test_var PYTHON_PKG_DEP pypy '*virtual/pypy*:0=' +test_var PYTHON_PKG_DEP pypy '*dev-python/pypy*:0=' test_var PYTHON_SCRIPTDIR pypy /usr/lib/python-exec/pypy test_var EPYTHON pypy3 pypy3 @@ -118,7 +118,7 @@ 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" fi -test_var PYTHON_PKG_DEP pypy3 '*virtual/pypy3*:0=' +test_var PYTHON_PKG_DEP pypy3 '*dev-python/pypy3*:0=' test_var PYTHON_SCRIPTDIR pypy3 /usr/lib/python-exec/pypy3 test_is "python_is_python3 python2.7" 1 @@ -181,16 +181,16 @@ test_is "_python_impl_supported python3_1" 1 test_is "_python_impl_supported python3_2" 1 test_is "_python_impl_supported python3_3" 1 test_is "_python_impl_supported python3_4" 1 -test_is "_python_impl_supported python3_5" 0 +test_is "_python_impl_supported python3_5" 1 test_is "_python_impl_supported python3_6" 0 test_is "_python_impl_supported python3_7" 0 test_is "_python_impl_supported python3_8" 0 test_is "_python_impl_supported pypy1_8" 1 test_is "_python_impl_supported pypy1_9" 1 test_is "_python_impl_supported pypy2_0" 1 -test_is "_python_impl_supported pypy" 0 +test_is "_python_impl_supported pypy" 1 test_is "_python_impl_supported pypy3" 0 -test_is "_python_impl_supported jython2_7" 0 +test_is "_python_impl_supported jython2_7" 1 # check _python_impl_matches behavior test_is "_python_impl_matches python2_7 -2" 0 diff --git a/eclass/tests/toolchain.sh b/eclass/tests/toolchain.sh index 56609aa180e4..1d05f6c126ba 100755 --- a/eclass/tests/toolchain.sh +++ b/eclass/tests/toolchain.sh @@ -12,6 +12,12 @@ source tests-common.sh inherit toolchain +# Ignore actually running version of gcc and fake new version +# to force downgrade test on all conditions below. +gcc-version() { + echo "99.99" +} + test_downgrade_arch_flags() { local exp msg ret=0 ver @@ -26,13 +32,14 @@ test_downgrade_arch_flags() { downgrade_arch_flags ${ver} if [[ ${CFLAGS} != ${exp} ]]; then - msg="Failure - Expected: \"${exp}\" Got: \"${CFLAGS}\"" + msg="Failure - Expected: \"${exp}\" Got: \"${CFLAGS}\" Ver: ${ver}" ret=1 fi tend ${ret} ${msg} } # ver expected given +test_downgrade_arch_flags 10 "-march=haswell" "-march=haswell" test_downgrade_arch_flags 4.9 "-march=haswell" "-march=haswell" test_downgrade_arch_flags 4.8 "-march=core-avx2" "-march=haswell" test_downgrade_arch_flags 4.7 "-march=core-avx2" "-march=haswell" @@ -64,6 +71,7 @@ test_downgrade_arch_flags 3.3 "-march=c3" "-march=c3-2" test_downgrade_arch_flags 4.5 "-march=garbage" "-march=garbage" +test_downgrade_arch_flags 10 "-mtune=intel" "-mtune=intel" test_downgrade_arch_flags 4.9 "-mtune=intel" "-mtune=intel" test_downgrade_arch_flags 4.8 "-mtune=generic" "-mtune=intel" test_downgrade_arch_flags 3.4 "" "-mtune=generic" @@ -74,9 +82,11 @@ test_downgrade_arch_flags 4.5 "-march=amdfam10 -mtune=generic" "-march=btver2 -m test_downgrade_arch_flags 3.3 "-march=k6-2" "-march=geode -mtune=barcelona" test_downgrade_arch_flags 3.4 "-march=k8" "-march=btver2 -mtune=generic" +test_downgrade_arch_flags 10 "-march=native" "-march=native" test_downgrade_arch_flags 4.2 "-march=native" "-march=native" test_downgrade_arch_flags 4.1 "-march=nocona" "-march=native" +test_downgrade_arch_flags 10 "-march=foo -mno-sha -mno-rtm -mno-avx2 -mno-avx -mno-sse4.1" "-march=foo -mno-sha -mno-rtm -mno-avx2 -mno-avx -mno-sse4.1" test_downgrade_arch_flags 4.9 "-march=foo -mno-sha -mno-rtm -mno-avx2 -mno-avx -mno-sse4.1" "-march=foo -mno-sha -mno-rtm -mno-avx2 -mno-avx -mno-sse4.1" test_downgrade_arch_flags 4.8 "-march=foo -mno-rtm -mno-avx2 -mno-avx -mno-sse4.1" "-march=foo -mno-sha -mno-rtm -mno-avx2 -mno-avx -mno-sse4.1" test_downgrade_arch_flags 4.7 "-march=foo -mno-avx2 -mno-avx -mno-sse4.1" "-march=foo -mno-sha -mno-rtm -mno-avx2 -mno-avx -mno-sse4.1" |