public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: "Jason Pyeron" <jpyeron@pdinc.us>
To: <cygwin-apps@cygwin.com>
Subject: RE: cygport test has zero exit status on failures
Date: Mon, 17 May 2021 18:29:34 -0400	[thread overview]
Message-ID: <009c01d74b6c$1ce8f7e0$56bae7a0$@pdinc.us> (raw)
In-Reply-To: <87h7jbuqir.fsf@Otto.invalid>

> -----Original Message-----
> From: ASSI
> Sent: Monday, May 10, 2021 1:06 AM
> 
> Jason Pyeron writes:
> > Cygport test is not returning a non zero exit status on failure! Is
> > this expected?
> 
> Yes, it is using 'make -k' under the hood.  Again, if you need to do
> something else than what the standard invocation provides, you would
> generally write your own src_test() function.

$ cat -n /usr/share/cygport/lib/src_test.cygpart
<snip/>
    33  cygtest() {
    34          if [ -e Makefile -o -e GNUmakefile -o -e makefile ]
    35          then
    36                  if make -n check &> /dev/null
    37                  then
    38                          make -k check || true
    39                  elif make -n test &> /dev/null
    40                  then
    41                          make -k test || true
    42                  else
    43                          inform "No testsuite detected.";
    44                  fi
    45          else
    46                  inform "No testsuite detected.";
    47          fi
    48  }
<snip/>

What is the historic rationale behind the "OR true" after the make check?

It seems silly to have to redefine src_test() as {
        cd ${B}
        make check
}, just to have a failure exit code if the test fail. It seems to have come in at https://github.com/cygwin/cygport/commit/ef93794f35de38b28f473b8f14c4a9e5a4a4a5a6 and never changed since. The commit does not indicate why the exit status is suppressed.

-Jason


  reply	other threads:[~2021-05-17 22:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-09 21:12 Jason Pyeron
2021-05-10  5:06 ` ASSI
2021-05-17 22:29   ` Jason Pyeron [this message]
2021-05-18  4:36     ` ASSI
2021-05-18 19:17       ` Jason Pyeron
2021-05-18 20:16         ` Achim Gratz
2021-05-18 20:57           ` Jason Pyeron
2021-05-19  5:16             ` ASSI
2021-05-19  7:05               ` Marco Atzeri
2021-05-19 16:32                 ` Jason Pyeron
2021-05-19 17:14                   ` Achim Gratz
2021-05-19 17:24                   ` Marco Atzeri
2021-05-19 17:30                     ` Achim Gratz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='009c01d74b6c$1ce8f7e0$56bae7a0$@pdinc.us' \
    --to=jpyeron@pdinc.us \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).