I asked about an existing test suite for ebuilds and was told there was none or everyone writes their own.
Well, I did write my own … maybe someone can use it or help me improve it.
Link to github:ebuild-test-suite
From the manual:
This is a test suite for portage ebuilds in Gentoo!
An ebuild with several use flags can be time consuming to test – especially when the use flags trigger dependencies. Then serious testing can require installing most or all possible combinations of use flags – to make sure that all dependencies are correct.
So this test suite should automate these tests. The tests will still be time consuming, but one does not have to manually start each new installation.
So once an ebuild is considered ready for publication, I can start these test-scripts and look at the output hours later.
The basic idea about using this test-suite is:
- Define packages to be tested, optionally restrict to specific versions
- The test-suite will then loop over all packages and available versions
- For each package-version, it will grab its USE flags and
Loop over all possible combinations of USE flags, installing each combination
Defining packages (and versions) is a matter of creating a folder. That’s it!
- Optionally, the list of flags or flag combinations can be filtered.
- Optionally, post-installation tests for each package(-version) can be defined.
The optional parts follow a similar concept to Gentoos ebuilds. Simply implement specific functions if you want to use a feature.
- A test run can include several packages and/or versions
- Restart a test run where it was stopped.
- Customizable per package, even per version
- Uses binary packages when possible