test utils: add failfast option to our testrunner.py
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 21 Jun 2019 14:30:11 +0000 (10:30 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 18 Jul 2019 15:53:32 +0000 (11:53 -0400)
commit29e15f4be64d2efc07bda7de5f21cfdec755c770
tree351a85d1ec9482a8cec2e3302f915755d8da37c3
parentadaf70852f3bc44cefa3faac54b0f4e0db9fdaef
test utils: add failfast option to our testrunner.py

When iterating on a test, I like using the -f|--failfast option of the
unittest module.  This patch adds the option to pass it to our
testrunner.

Here's one way to use it (with the babeltrace build dir as the current working
directory):

    tests/utils/test_python_bt2_env python3 /home/smarchi/src/babeltrace/tests/utils/python/testrunner.py /home/smarchi/src/babeltrace/tests/bindings/python/bt2/ -f

Note that this is not absolutely essential, it is also possible to call
unittest directly:

    tests/utils/test_python_bt2_env python3 -m unittest discover -s /home/smarchi/src/babeltrace/tests/bindings/python/bt2/ -f

However, I prefer using the same runner as what the testsuite uses.

To facilitate the handling of optional arguments, I made the script use
argparse.

Change-Id: Ia4c082dc0952cc8649491b2410ab2d99f1477c1b
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1528
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
tests/utils/python/testrunner.py
This page took 0.025102 seconds and 4 git commands to generate.