From dba2fb5fff318b797c424c82c4e92508de4b8de2 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 27 Jan 2023 17:23:07 +0100 Subject: [PATCH] gitlab-ci: use "meson test" for running unit tests It seems that `meson test` is preferred over `ninja test`. Also, pass "--print-errorlogs" to meson, and pass "-v" to the build steps. Note that `ninja test` already ends up calling `meson test --print-errorlogs`, but it doesn't use "-v", so the logs are truncated. --- contrib/scripts/nm-ci-run.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/contrib/scripts/nm-ci-run.sh b/contrib/scripts/nm-ci-run.sh index 374dde95b3..676780b2c8 100755 --- a/contrib/scripts/nm-ci-run.sh +++ b/contrib/scripts/nm-ci-run.sh @@ -262,18 +262,19 @@ run_meson() { export NM_TEST_CLIENT_CHECK_L10N=1 - ninja -C build + ninja -C build -v ninja -C build install - if ! ninja -C build test ; then + if ! meson test -C build -v --print-errorlogs ; then echo ">>>> RUN SECOND TEST (start)" - NMTST_DEBUG="debug,TRACE,no-expect-message" ninja -C build test || : + NMTST_DEBUG="debug,TRACE,no-expect-message" \ + meson test -C build -v --print-errorlogs || : echo ">>>> RUN SECOND TEST (done)" die "meson test failed" fi if _with_valgrind; then - if ! NMTST_USE_VALGRIND=1 ninja -C build test; then + if ! NMTST_USE_VALGRIND=1 meson test -C build -v --print-errorlogs ; then _print_test_logs "(valgrind test)" die "meson+valgrind test failed" fi