Bug#891590: sbuild: Please signalize autopkgtest failure by exit code, at least optionally
Quoting Christoph Biedl (2018-07-02 18:43:52) > Thanks a lot, I'm fine with this as it's the "at least as an option" way. > Just a small thing, if I understand correctly, this change will not provide > command-line options to control the behaviour. Having these was last > refinement though as I'll use this feature in any automated setup where I > have to maintain a configuration file anyway. At least for now I'll not add command line options for this. The number of command line options sbuild has is already very hard to read and adding six long options --lintian-require-success --no-lintian-require-success --piuparts-require-success --no-piuparts-require-success --autopkgtest-require-success --no-autopkgtest-require-success Would increase the mess even more. Plus an entry that documents each of these six options... I think we only want command line options for things that the user might want to change on a build-to-build or package-to-package basis. But for a setting like this, I expect that a user might want to either have it for everything or for nothing. If that is the case, then there is no need for a command line option. Thanks! cheers, josch signature.asc Description: signature
Bug#891590: sbuild: Please signalize autopkgtest failure by exit code, at least optionally
Johannes Schauer wrote... > So in light of this, I instead opted for introducing three new configuration > variables. With sbuild from git you can now set: > > $lintian_require_success = 1; > $piuparts_require_success = 1; > $autopkgtest_require_success = 1; > > Sbuild will then exit with a non-zero exit status if any of these three fail. > > Does this sound good to you? Thanks a lot, I'm fine with this as it's the "at least as an option" way. Just a small thing, if I understand correctly, this change will not provide command-line options to control the behaviour. Having these was last refinement though as I'll use this feature in any automated setup where I have to maintain a configuration file anyway. Regards, Christoph signature.asc Description: PGP signature
Bug#891590: sbuild: Please signalize autopkgtest failure by exit code, at least optionally
Control: tag -1 + pending Hi, On Mon, 26 Feb 2018 22:04:10 +0100 Christoph Biedl wrote: > trying to use to autopkgtest feature of sbuild I was somewhat surprised > to learn there is no way to signalize a failing autopkgtest to the > sbuild caller. I'd expect to have something like > > --- a/lib/Sbuild/Build.pm > +++ b/lib/Sbuild/Build.pm > @@ -1845,6 +1845,7 @@ sub run_autopkgtest { > } else { > # fail if neither all tests passed nor was the package without tests > $self->log_error("Autopkgtest run failed.\n"); > + $self->set_status("failed"); > return 0; > } > > > at least as an option like --fail-from-failing-autopkgtest. So it seems > the only way was to inspect the build log. This doesn't seem right. > > Did I miss something? Else, please take this as a feature request. Also > likewise for piuparts. and probably also for lintian? While I sympathize with the idea of letting sbuild fail when the stuff it runs fails, I was met with strong opposition when I asked for opinions about this in #debian-devel and I was convinced that it would not be right for sbuild to fail if autopkgtest, piuparts or lintian fail. Arguments: - people run sbuild for building not for the other stuff it does even though it's nice to have that other stuff (lintian, autopkgtest, piuparts) in the build log - thus, it would be wrong for sbuild to fail for anything other than the package build itself failing - sbuild is already the wrong layer for running lintian, piuparts and autopkgtest. That should instead be done by a tool above sbuild. So in light of this, I instead opted for introducing three new configuration variables. With sbuild from git you can now set: $lintian_require_success = 1; $piuparts_require_success = 1; $autopkgtest_require_success = 1; Sbuild will then exit with a non-zero exit status if any of these three fail. Does this sound good to you? Thanks! cheers, josch signature.asc Description: signature
Bug#891590: sbuild: Please signalize autopkgtest failure by exit code, at least optionally
Source: sbuild Version: 0.73.0-4 Severity: wishlist Dear Maintainer, trying to use to autopkgtest feature of sbuild I was somewhat surprised to learn there is no way to signalize a failing autopkgtest to the sbuild caller. I'd expect to have something like --- a/lib/Sbuild/Build.pm +++ b/lib/Sbuild/Build.pm @@ -1845,6 +1845,7 @@ sub run_autopkgtest { } else { # fail if neither all tests passed nor was the package without tests $self->log_error("Autopkgtest run failed.\n"); + $self->set_status("failed"); return 0; } at least as an option like --fail-from-failing-autopkgtest. So it seems the only way was to inspect the build log. This doesn't seem right. Did I miss something? Else, please take this as a feature request. Also likewise for piuparts. Regards, Christoph signature.asc Description: PGP signature