linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jes.Sorensen@redhat.com
To: neilb@suse.de
Cc: dledford@redhat.com, linux-raid@vger.kernel.org
Subject: [PATCH 2/4] Add --no-error argument to 'test'
Date: Fri, 25 May 2012 17:24:06 +0200	[thread overview]
Message-ID: <1337959448-5299-3-git-send-email-Jes.Sorensen@redhat.com> (raw)
In-Reply-To: <1337959448-5299-1-git-send-email-Jes.Sorensen@redhat.com>

From: Jes Sorensen <Jes.Sorensen@redhat.com>

This allows the test suite to run to completion even if one test
fails.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
 test |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/test b/test
index c7eb069..a0561ab 100755
--- a/test
+++ b/test
@@ -19,6 +19,7 @@ fi
 testdir="tests"
 logdir="$testdir/logs"
 logsave=0
+exitonerror=1
 
 # Check whether to run multipath tests
 modprobe multipath 2> /dev/null
@@ -230,7 +231,7 @@ do_test() {
     if [ "$savelogs" == "1" ]; then
       cp $targetdir/log $logdir/$_basename.log
     fi
-    if [ "$_fail" == "1" ]; then
+    if [ "$_fail" == "1" -a $"exitonerror" == "1" ]; then
       exit 1
     fi
   fi
@@ -238,7 +239,7 @@ do_test() {
 
 do_help() {
   echo "Usage: "
-  echo " $0 [--tests=<test1,test2,..>] [--disable-multipath] [--logdir] [--save-logs] [setup] [prefix]"
+  echo " $0 [--tests=<test1,test2,..>] [--disable-multipath] [--logdir] [--save-logs] [--no-error] [setup] [prefix]"
 }
 
 parse_args() {
@@ -267,6 +268,9 @@ parse_args() {
 	fi
       fi
       ;;
+    --no-error)
+      exit_on_error=0
+      ;;
     --disable-multipath)
       unset MULTIPATH
       ;;
-- 
1.7.1


  parent reply	other threads:[~2012-05-25 15:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-25 15:24 [PATCH 0/4] More test suite enchancements Jes.Sorensen
2012-05-25 15:24 ` [PATCH 1/4] Add support for saving log files in test script Jes.Sorensen
2012-05-28  0:54   ` NeilBrown
2012-05-25 15:24 ` Jes.Sorensen [this message]
2012-05-25 15:24 ` [PATCH 3/4] Improve --help message from test Jes.Sorensen
2012-05-25 15:24 ` [PATCH 4/4] Move setup code to a function and introduce matching cleanup argument Jes.Sorensen
2012-05-28  0:56   ` NeilBrown
2012-05-29  6:02     ` Jes Sorensen

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=1337959448-5299-3-git-send-email-Jes.Sorensen@redhat.com \
    --to=jes.sorensen@redhat.com \
    --cc=dledford@redhat.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    /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 NNTP newsgroup(s).