Add test directives to the spec file which would instruct rpmbuild to run regression and unit tests for the package. rpmbuild should probably also get an option to run these tests. The interface could be exposed in the build service with the possibility to consider a package not passing its tests as failed to build.
What would be the difference with the %check section?
about 3 years ago by dmuhamedagic | Reply
This would effectively be a post installation task, i.e. after the package got built, so it should better support testing integration. The test may also require installing extra packages. I used to have a postinst script for this, look for withregressiontests in https://build.opensuse.org/package/view_file/network:ha-clustering:Factory/crmsh/crmsh.spec This would add support for cases like that.