cygport test has zero exit status on failures

Jason Pyeron jpyeron@pdinc.us
Wed May 19 16:32:54 GMT 2021


> -----Original Message-----
> From: Marco Atzeri
> Sent: Wednesday, May 19, 2021 3:06 AM
> 
> On 19.05.2021 07:16, ASSI wrote:
> > Jason Pyeron writes:
> 
> >
> >> In any case the all or all-test does not execute the test step, so the
> >> customization of the src_test does not impact the default behaviors.
> >
> > That's beside the point.  We were only talking about the test behaviours
> > or at least I was, anyway.  Now again, if you do that in the cygport
> > file you mix that expectation of getting a return value (that really
> > comes from the way you run cygport in the CI and determine the test
> > status) with the package definition.  If you force that to satisfy your
> > CI requirements, you also break the flow for folks who (as an example)
> > rather do
> >
> > cygport $p finish prep compile inst test pkg

So for the pdfgrep that I am going to maintain, is it acceptable that I want the package to not happen until I address the test failure? Like so?

...
BUILD_REQUIRES="asciidoc gcc-g++ libpoppler-cpp-devel libgcrypt-devel libpcre-devel dejagnu texlive-collection-latex docbook-xml45"

src_test() {
        cd ${B}
        make check
}

> >
> > because a test fail would now error out before getting to the packaging
> > step.  Which is why I was musing that your preference in how to treat a
> > test fail should really be injected from the run-time environment rather
> > than the package definition.  Once that mechanism is in place I can also
> > start writing my own src_test functions that switch their behaviour
> > depending on that setting so that these package definitions would work
> > in either environment.
> 
> in general a generic test failure is not a valid reason to NOT package.
> Most of my packages have peculiar test failures that can be just ignored
> 
> In several, I just use "cygmake -i check" in src_test
> to avoid premature stop of the tests.
> 
> Others requires to be installed before the testsuite is
> properly executed.

Since it is not required to be installed, I would like to lean towards stopping to fix first.

v/r,

Jason



More information about the Cygwin-apps mailing list