summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* python-utils-r1.eclass: Add pypy3_11 targetMichał Górny7 days1-2/+20
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests/llvm-r2.sh: Add tests for llvm-configMichał Górny2024-12-301-0/+87
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests: Copy llvm-r1 tests to llvm-r2.shMichał Górny2024-12-301-0/+101
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests/llvm-r1.sh: Fix function name in error messageMichał Górny2024-12-211-1/+1
| | | | | | Thanks to Sam for noticing. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests/llvm-r1.sh: Update for LLVM 19 stableMichał Górny2024-12-201-5/+5
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests/llvm-r1.sh: Remove unused functionsMichał Górny2024-12-201-58/+0
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* zig-utils.eclass: new eclassEric Joldasov2024-12-151-0/+320
| | | | | | | | | | | | | | | | This eclass handles dependency on Zig toolchain and finds appropriate versions/slots, converts "CHOST-style and CFLAGS" to "Zig target tuple and CPU" formats and sets environment variables to be used by other eclasses and ebuilds. Most of the projects written in Zig use `build.zig` system and should use `zig.eclass` from next commit instead. This eclass is more low-level and can be used when `zig` commands are called from other build systems directly. For example, when authors use `zig build-exe` or `zig test` commands in their Makefile/meson.build/Cargo etc. Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Signed-off-by: Sam James <sam@gentoo.org>
* Move {sys-devel → llvm-core}/llvmMichał Górny2024-12-111-5/+5
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* Move {sys-devel → llvm-core}/clangMichał Górny2024-12-111-5/+5
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests: New test for eapi9-pipestatus.eclassUlrich Müller2024-12-091-0/+57
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* python-utils-r1.eclass: Depend on dev-lang/pypy directlyMichał Górny2024-11-301-1/+3
| | | | | | | | | | | | Depend on `>=dev-lang/pypy-3.10:=` rather than the backwards compatibility `dev-python/pypy3` package. Note that the package needs to remain at least for some time after the next subslot bump, so that users rebuild all packages and get the updated dependency across the system. Note that this requires pkgcheck to be updated first. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Support python3_13t (freethreading) targetMichał Górny2024-10-141-7/+7
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* versionator.eclass: Remove dead eclassUlrich Müller2024-10-081-199/+0
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* eclass/tests: fix toolchain.sh tests by dropping old GCC supportSam James2024-09-191-17/+0
| | | | | | | | | eb49d171430cc2baffbf9d37493a78cc02b33fe2 dropped old GCC support but the tests weren't updated. Closes: https://bugs.gentoo.org/939817 Fixes: eb49d171430cc2baffbf9d37493a78cc02b33fe2 Signed-off-by: Sam James <sam@gentoo.org>
* Revert "eclass/tests/toolchain.sh: declare PYTHON_COMPAT"Sam James2024-09-181-2/+0
| | | | | | | | | | This reverts commit 992fc2954c2281285bc50156ba12d310a1b434e1. This should no longer be necessary now that tests are opt-in with TOOLCHAIN_HAS_TESTS. Bug: https://bugs.gentoo.org/859157 Signed-off-by: Sam James <sam@gentoo.org>
* eclass/tests/toolchain.sh: declare PYTHON_COMPATPetr Vaněk2024-09-181-0/+2
| | | | | | | | | | | | | | toolchain.sh test script requires PYTHON_COMPAT array since commit 1d93a491096f ("toolchain.eclass: rework tests more") otherwise it dies with die: PYTHON_COMPAT not declared. error. Bug: https://bugs.gentoo.org/859157 Signed-off-by: Petr Vaněk <arkamar@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* eclass/tests/dist-kernel-utils.sh: add compressed_module_cleanup testsAndrew Ammerlaan2024-08-071-0/+59
| | | | | | Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/37985 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* eclass/tests/tests-common.sh: add in_iuse functionAndrew Ammerlaan2024-08-071-0/+2
| | | | Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* eclass/tests/toolchain-funcs.sh: Cover tc-has-64bit-time_tMichał Górny2024-08-061-0/+20
| | | | | | Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/37142 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests/toolchain-funcs.sh: Cover tc-is-ltoMichał Górny2024-08-061-0/+20
| | | | | | Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/37976 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm-r1.eclass: Update tests for new stableMichał Górny2024-07-291-9/+17
| | | | | Closes: https://bugs.gentoo.org/936882 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests: Include tests in version-funcs.sh itselfUlrich Müller2024-07-283-175/+175
| | | | | | Previously, tests were in eapi7-ver.sh. Update Makefile. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* eclass/tests: Fail the .%.sh.ok Makefile recipe if the test failsUlrich Müller2024-06-131-3/+5
| | | | | | | With .ONESHELL active, only the return status of the final recipe line will be checked. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* eclass/tests: Filter version-funcs.sh from the list of testsUlrich Müller2024-06-131-1/+1
| | | | | Fixes: 16b2c5ebb2869f4132536e5eb0a465b534556fb6 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* eclass/tests: Update rebar_*.sh to EAPI 8Ulrich Müller2024-06-133-6/+10
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* eclass/tests: Rename test function in savedconfig.shUlrich Müller2024-06-131-8/+14
| | | | | | | | | | | Overriding a shell builtin command is generally a very bad idea, especially when that command is used in code that is sourced (in this case, /lib/gentoo/functions.sh). Therefore, rename test() to test_sc(). Also make sure that the directories that are used as targets for rm -rf in cleanup() are actually different from the root directory. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* eclass/tests: Drop FreeBSD test from toolchain-funcs.shUlrich Müller2024-06-121-2/+2
| | | | | | | | | Prefix targets have been dropped from toolchain-funcs.eclass in commit cab79611b07c9eb. Update tests accordingly. Fixes: cab79611b07c9ebb795c6f65562ef72ba77550b1 Closes: https://bugs.gentoo.org/934150 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* eclass/tests: Remove git-r3.shMichał Górny2024-06-121-208/+0
| | | | | | | | | Remove base git-r3 tests, they are broken for a long time and I can't figure out how to fix them properly. There is probably no point in testing these functions standalone anyway since they're extensively used by ebuilds. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests: Make *-bench.sh work with reference dcUlrich Müller2024-06-123-6/+6
| | | | | | | dc from sys-devel/bc doesn't support the -S option. Set the precision with the k command instead. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* eclass/tests: Override use() in linux-info_get_running_version.shUlrich Müller2024-06-121-2/+10
| | | | | | | | linux-info.eclass checks for the kernel_linux flag since 2018, introduced with commit 9e7c4b6d2daa9a8b1c33154f8dd296a2d1a26e92. Closes: https://bugs.gentoo.org/934130 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* eclass/tests: Copy code from eapi7-ver.eclass to version-functions.shUlrich Müller2024-05-255-157/+309
| | | | | | | With EAPI 6 banned, eapi7-ver.eclass will be removed in the foreseeable future. Copy its code because it is still needed for tests. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* edo.eclass: enhance edob for usage with noisy commandsFlorian Schmaus2024-05-141-0/+113
| | | | | | | | | | | | | | | | | Normally, edob can, or rather should, not be used with noisy commands, i.e., commands that produce an output. This is because the output destroys the concept of ebegin and eend, where the eend marker is shown on the same line that is produced by ebegin. However, it sometimes would be nice to use edob with noisy commands, but this means to redirect stdout and stderr of those commands. Instead of redirecting the output to /dev/null, we save the output in a log file under T. This allows us to present the output to the user in case the command fails, making it furthermore part of the build.log, which we expect users to attach to bug reports. Closes: https://github.com/gentoo/gentoo/pull/36117 Signed-off-by: Florian Schmaus <flow@gentoo.org>
* eclass/tests/python-utils-r1.sh: Fix pypy3 matchesMichał Górny2024-05-081-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Add python3_13Michał Górny2024-05-081-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm-r1.eclass: Initial versionMichał Górny2024-02-101-0/+151
| | | | | | | | Bug: https://bugs.gentoo.org/923228 Bug: https://bugs.gentoo.org/880671 Closes: https://bugs.gentoo.org/821955 Closes: https://bugs.gentoo.org/919150 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm-utils.eclass: Fix llvm_prepend_path to avoid duplicatesMichał Górny2024-02-101-0/+12
| | | | | | | | | | Fix llvm_prepend_path() not to append the new path multiple times, if the original PATH variable contained multiple LLVM directories. Thanks to Alexander Miller who spotted it in: https://github.com/gentoo/gentoo/pull/35196#discussion_r1480330001 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm-utils.eclass: Split out PATH prepending logicMichał Górny2024-02-101-0/+24
| | | | | | | Split the logic prepending PATH from pkg_setup() into a dedicated llvm_prepend_path() function. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm-utils.eclass: Introduce an eclass for common helpersMichał Górny2024-02-101-0/+82
| | | | | | | | Move some reusable functions from llvm.eclass to llvm-utils.eclass. This is with minimal modifications so far (only argument checks were cleaned up). Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests: Remove obsolete/broken distutils-r1 testsMichał Górny2023-11-032-264/+0
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* multiprocessing.eclass: consider (GNU)MAKEFLAGS, add get_makeopts_{jobs,loadavg}Florian Schmaus2023-10-091-2/+22
| | | | | | | | | | | | | Since --load-average may not be found in other Make implementations besides GNU Make, it is potentially found in GNUMAKEFLAGS and not in MAKEOPTS. Also, Portage is probably soon setting --load-average in GNUMAKEFLAGS as default. Thanks to floppym and mgorny for feedback. Signed-off-by: Florian Schmaus <flow@gentoo.org>
* verify-sig.eclass: Fix handling multiple/duplicate signaturesMichał Górny2023-09-141-0/+11
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* verify-sig.eclass: Support `openssl dgst` format checksumsMichał Górny2023-09-141-0/+18
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests: Add initial tests for verify-sigMichał Górny2023-09-141-0/+65
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: make pypy3 match Python 3.10 nowMichał Górny2023-07-021-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* cargo.eclass: Support separating crate names/versions via `@`Michał Górny2023-06-181-53/+58
| | | | | | | | | | | | | | | | | | Support specifying crate names and versions separated by `@` character rather than `-`. Since `@` are not valid in crate names, this makes splitting the tokens trivial and free of regular expressions. Effectively, the `@` variant is roughly 180% faster: ``` * CRATES with '@' separator real 952 it/s user 952 it/s * CRATES with '-' separator real 339 it/s user 339 it/s ``` Signed-off-by: Michał Górny <mgorny@gentoo.org>
* cargo.eclass: Add variable alternative to $(cargo_crate_uris)Michał Górny2023-06-181-1/+3
| | | | | | | | | | | | | Add a helper function that sets ${CARGO_CRATE_URIS} variable to make it possible to set SRC_URI without subshells. This gives a slight speedup (~20%): ``` real 300 it/s user 324 it/s ``` Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests: Add a minimal benchmark for cargo.eclassMichał Górny2023-06-181-0/+107
| | | | | | | | | | | The initial results on my machine are: ``` real 252 it/s user 289 it/s ``` Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests: Add a benchmark for python-utils-r1Michał Górny2023-06-171-0/+53
| | | | | | | | | | | | Initial timings on my system: ``` * Timing _python_set_impls real 1463 it/s user 1886 it/s ``` Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests: Add pypi-bench.sh for global scope logicMichał Górny2023-06-151-0/+69
| | | | | | The benchmark yield roughly 327 ops / s on my machine. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eapi8-dosym.eclass: Fix another corner case of strange inputUlrich Müller2023-06-071-0/+1
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>