From 5d25fcb702406286a17806dd53d10eec1d2cc34f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Fri, 1 Dec 2023 09:36:33 +0000 Subject: gitlab: add optional job to run flaky avocado tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One problem with flaky tests is they often only fail under CI conditions which makes it hard to debug. We add an optional allow_fail job so developers can trigger the only the flaky tests in the CI environment if they are debugging. Reviewed-by: Richard Henderson Acked-by: Stefan Hajnoczi Signed-off-by: Alex Bennée Message-Id: <20231201093633.2551497-8-alex.bennee@linaro.org> --- docs/devel/testing.rst | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'docs/devel') diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 76465b8..bd13230 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -1387,16 +1387,17 @@ the code snippet below: def test(self): do_something() -Tests should not live in this state forever and should either be fixed -or eventually removed. - -To run such tests locally you will need to set the environment -variable. For example: +You can also add ``:avocado: tags=flaky`` to the test meta-data so +only the flaky tests can be run as a group: .. code:: - env QEMU_TEST_FLAKY_TESTS=1 ./pyvenv/bin/avocado run \ - tests/avocado/boot_linux.py:BootLinuxPPC64.test_pseries_tcg + env QEMU_TEST_FLAKY_TESTS=1 ./pyvenv/bin/avocado \ + run tests/avocado -filter-by-tags=flaky + +Tests should not live in this state forever and should either be fixed +or eventually removed. + Uninstalling Avocado ~~~~~~~~~~~~~~~~~~~~ -- cgit v1.1