[libvirt PATCH] gitlab: enable debug output for test suite

Daniel P. Berrangé posted 1 patch 2 years, 12 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20210505150417.552417-1-berrange@redhat.com
.gitlab-ci.yml      | 2 ++
ci/cirrus/build.yml | 2 ++
2 files changed, 4 insertions(+)
[libvirt PATCH] gitlab: enable debug output for test suite
Posted by Daniel P. Berrangé 2 years, 12 months ago
When CI jobs fail on the test suite, we don't see much helpful
information by default:

stderr:
TEST: bhyvexml2argvtest
      ......!!.............!......!........... 40
      ........................!......          71  FAIL
Some tests failed. Run them using:
VIR_TEST_DEBUG=1 VIR_TEST_RANGE=7-8,22,29,65
/tmp/cirrus-ci-build/build/meson-private/dist-build/tests/bhyvexml2argvtest

Following the instructions to re-run the test with VIR_TEST_DEBUG=1 is
great if running locally, but quite unfriendly for CI.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---

Compare before:

  https://gitlab.com/libvirt/libvirt/-/jobs/1237988893

and after:

  https://gitlab.com/berrange/libvirt/-/jobs/1238324746

 .gitlab-ci.yml      | 2 ++
 ci/cirrus/build.yml | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 35ec626113..89f618e678 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,6 +11,8 @@ stages:
   export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
   export CCACHE_MAXSIZE="500M"
   export PATH="$CCACHE_WRAPPERSDIR:$PATH"
+  export VIR_TEST_VERBOSE="1"
+  export VIR_TEST_DEBUG="1"
 
 # Common templates
 
diff --git a/ci/cirrus/build.yml b/ci/cirrus/build.yml
index 2d3c46a77c..f7ef5c2d13 100644
--- a/ci/cirrus/build.yml
+++ b/ci/cirrus/build.yml
@@ -9,6 +9,8 @@ env:
   PKG_CONFIG_PATH: "@PKG_CONFIG_PATH@"
   PYTHON: "@PYTHON@"
   MAKE: "@MAKE@"
+  VIR_TEST_VERBOSE: "1"
+  VIR_TEST_DEBUG: "1"
 
 build_task:
   install_script:
-- 
2.31.1

Re: [libvirt PATCH] gitlab: enable debug output for test suite
Posted by Andrea Bolognani 2 years, 12 months ago
On Wed, May 05, 2021 at 04:04:17PM +0100, Daniel P. Berrangé wrote:
> When CI jobs fail on the test suite, we don't see much helpful
> information by default:
>
> stderr:
> TEST: bhyvexml2argvtest
>       ......!!.............!......!........... 40
>       ........................!......          71  FAIL
> Some tests failed. Run them using:
> VIR_TEST_DEBUG=1 VIR_TEST_RANGE=7-8,22,29,65
> /tmp/cirrus-ci-build/build/meson-private/dist-build/tests/bhyvexml2argvtest
>
> Following the instructions to re-run the test with VIR_TEST_DEBUG=1 is
> great if running locally, but quite unfriendly for CI.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>
> Compare before:
>
>   https://gitlab.com/libvirt/libvirt/-/jobs/1237988893
>
> and after:
>
>   https://gitlab.com/berrange/libvirt/-/jobs/1238324746

Better.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization