tests/client: rework error handling in "test-client.sh" script

The script runs with "set -e", as such `cmd && r=ok` seems wrong.
It worked apparently, but I don't understand why. Anyway, change
it.

Fixes: e643703418 ('tests/client: run "test-client.py" also for meson')
This commit is contained in:
Thomas Haller 2021-03-19 11:37:41 +01:00
parent c2265dd8a9
commit 571fdaafac
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -56,8 +56,8 @@ export NM_TEST_CLIENT_BUILDDIR="$BUILDDIR"
# afterwards. The only reason is that when you run with `make -j` that the
# test output is grouped together.
r=""
"$PYTHON" "$SRCDIR/src/tests/client/test-client.py" -v &> "$BUILDDIR/src/tests/client/test-client.log" && r=ok
r="ok"
"$PYTHON" "$SRCDIR/src/tests/client/test-client.py" -v &> "$BUILDDIR/src/tests/client/test-client.log" || r=fail
cat "$BUILDDIR/src/tests/client/test-client.log"