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.
This commit is contained in:
Thomas Haller 2023-01-27 17:23:07 +01:00
parent 13d9cf75ed
commit dba2fb5fff
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -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