[CRIU] [PATCH 1/2] zdtm.py: add option --ignore-fails
Ivan Shapovalov
intelfx at intelfx.name
Wed Mar 9 03:27:10 PST 2016
On 2016-03-09 at 12:45 +0300, Pavel Emelyanov wrote:
> On 03/05/2016 01:49 AM, Andrew Vagin wrote:
> >
> > On Thu, Mar 03, 2016 at 06:13:15PM +0300, Sergey Bronnikov wrote:
> > >
> > > Introduce an option --ignore-fails to make ability to run all
> > > planned tests and
> > > ignore failed tests.
> > >
> > Here is a very similar functionality:
> > [RFC PATCH 02/21] zdtm: zdtm.py: add --keep-going and --log-
> > failures options
> The --keep-going is the same as --ignore-fails, yes :) Ivan's version
> was sent earlier, but we expect him to split the patch. So the
> question
> to him -- will he re-send the --ignore-failures only patch, or is he
> OK
> if I commit Sergey's version?
I was going to resend the patchset today (once I deal with some locking
issues and suddenly broken mnt_ext_{auto,master} tests), but I have
literally no preference about naming of this option :)
--
Ivan Shapovalov / intelfx /
>
> >
> > Will a report contains images and logs for each failed test?
> Looks like no, but I don't think that this blocks TAP report
> generation.
> Does it?
>
> -- Pavel
>
> >
> > >
> > > Signed-off-by: Sergey Bronnikov <sergeyb at openvz.org>
> > > ---
> > > test/zdtm.py | 13 +++++++++----
> > > 1 file changed, 9 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/test/zdtm.py b/test/zdtm.py
> > > index 1ace919..75e4514 100755
> > > --- a/test/zdtm.py
> > > +++ b/test/zdtm.py
> > > @@ -947,8 +947,9 @@ def do_run_test(tname, tdesc, flavs, opts):
> > > add_to_report(cr_api.logs(), "cr_logs")
> > > if opts['keep_img'] == 'never':
> > > cr_api.cleanup()
> > > - # This exit does two things -- exits
> > > from subprocess and
> > > - # aborts the main script execution on
> > > the 1st error met
> > > + # When option --ignore-fails not
> > > specified this exit
> > > + # does two things: exits from subprocess
> > > and aborts the
> > > + # main script execution on the 1st error
> > > met
> > > sys.exit(1)
> > > else:
> > > if opts['keep_img'] != 'always':
> > > @@ -1035,12 +1036,12 @@ class launcher:
> > > while self.__subs:
> > > if not self.__wait_one(os.WNOHANG):
> > > break
> > > - if self.__fail:
> > > + if (not opts['ignore_fails'] and self.__fail):
> > > raise test_fail_exc('')
> > >
> > > def wait_all(self):
> > > self.__wait_all()
> > > - if self.__fail:
> > > + if (not opts['ignore_fails'] and self.__fail):
> > > raise test_fail_exc('')
> > >
> > > def finish(self):
> > > @@ -1128,6 +1129,9 @@ def run_tests(opts):
> > > if opts['report']:
> > > init_report(opts['report'])
> > >
> > > + if opts['ignore_fails']:
> > > + print "Ignore fails and run all planned tests."
> > > +
> > > if opts['parallel'] and opts['freezecg']:
> > > print "Parallel launch with freezer not
> > > supported"
> > > opts['parallel'] = None
> > > @@ -1346,6 +1350,7 @@ if os.environ.has_key('CR_CT_TEST_INFO'):
> > > p = argparse.ArgumentParser("CRIU test suite")
> > > p.add_argument("--debug", help = "Print what's being executed",
> > > action = 'store_true')
> > > p.add_argument("--set", help = "Which set of tests to use",
> > > default = 'zdtm')
> > > +p.add_argument("--ignore-fails", help = "Ignore fails and run
> > > all planned tests", action = 'store_true')
> > >
> > > sp = p.add_subparsers(help = "Use --help for list of actions")
> > >
> > > --
> > > 2.5.0
> > >
> > >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openvz.org/pipermail/criu/attachments/20160309/3f9af455/attachment.sig>
More information about the CRIU
mailing list