GithubHelp home page GithubHelp logo

Comments (6)

mykaul avatar mykaul commented on August 15, 2024

Hmm, I guess this line explains it:
exit(1) if ($nfailed > 0);

from libiscsi.

jonhermansen avatar jonhermansen commented on August 15, 2024

Yes, I also encountered this. In some cases, this behavior may be desirable. You have a few options for dealing with this in a Jenkins job:

Run the cunit-to-junit.pl script like this:

perl cunit-to-junit.pl || true

or

set +e
perl cunit-to-junit.pl
set -e

and possibly

if [ perl cunit-to-junit.pl ]; then
  echo "no tests failed"
else
  echo "some test(s) failed"
fi

depending on the shell you're using.

from libiscsi.

sahlberg avatar sahlberg commented on August 15, 2024

Can you send me a small patch to add this information to the manpage ?

On Tue, Mar 25, 2014 at 11:35 AM, Jon Hermansen [email protected]:

Yes, I also encountered this. In some cases, this behavior may be
desirable. You have a few options for dealing with this in a Jenkins job:

Run the cunit-to-junit.pl script like this:

perl cunit-to-junit.pl || true

or

set +e
perl cunit-to-junit.pl
set -e

and possibly

if [ perl cunit-to-junit.pl ]; then
echo "no tests failed"
else
echo "some test(s) failed"
fi

depending on the shell you're using.

Reply to this email directly or view it on GitHubhttps://github.com//issues/102#issuecomment-38603264
.

from libiscsi.

jonhermansen avatar jonhermansen commented on August 15, 2024
diff --git a/cunit-to-junit.pl.orig b/cunit-to-junit.pl
index 7cf9320..41e3cfc 100644
--- a/cunit-to-junit.pl.orig
+++ b/cunit-to-junit.pl
@@ -226,4 +226,3 @@ foreach my $s (@suites)
 }

 print "$0: ran $nrun tests, $nfailed failed\n";
-exit(1) if ($nfailed > 0);

from libiscsi.

sahlberg avatar sahlberg commented on August 15, 2024

I meant a patch to doc/iscsi-test-cu.xml :-)

To add the useful parts of this thread to the manpage.
I added some text to discuss the return code from the script and the patch
above.

Since I don't use --xml myself, I am the wrong person to do the authorative
writeup on this.
Please have a look at the manpage and let me know if there is something
that should be added.

On Tue, Mar 25, 2014 at 12:47 PM, Jon Hermansen [email protected]:

diff --git a/cunit-to-junit.pl.orig b/cunit-to-junit.pl
index 7cf9320..9182ff0 100644
--- a/cunit-to-junit.pl.orig
+++ b/cunit-to-junit.pl
@@ -226,4 +226,4 @@ foreach my $s (@suites)
}

print "$0: ran $nrun tests, $nfailed failed\n";
-exit(1) if ($nfailed > 0);
+#exit(1) if ($nfailed > 0);

Reply to this email directly or view it on GitHubhttps://github.com//issues/102#issuecomment-38611608
.

from libiscsi.

sahlberg avatar sahlberg commented on August 15, 2024

I have updated the manpage with the relevant information about the return code from the script and how to change it if different semantics are wanted.

Closing for now, feel free to reopen issue if there are text you want added to the manpage.

from libiscsi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.