From a727516e0d57d80f0d4aa6add1ff6607e3d9b676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Thu, 28 Nov 2019 21:25:47 +0100 Subject: core: run command and check return code on same line in tools scripts --- tools/build-debian.sh | 3 +-- tools/build-test.sh | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'tools') diff --git a/tools/build-debian.sh b/tools/build-debian.sh index 3cca2ac55..c1d503e8c 100755 --- a/tools/build-debian.sh +++ b/tools/build-debian.sh @@ -111,8 +111,7 @@ test_patches () PATCHES_ERROR=0 for file in "${ROOT_DIR}"/tools/debian/patches/*.patch; do echo "=== Testing patch ${file} ===" - git apply --check "${file}" - if [ $? -eq 0 ]; then + if git apply --check "${file}"; then PATCHES_OK=$((PATCHES_OK+1)) else PATCHES_ERROR=$((PATCHES_ERROR+1)) diff --git a/tools/build-test.sh b/tools/build-test.sh index 270d3c50a..551195a9b 100755 --- a/tools/build-test.sh +++ b/tools/build-test.sh @@ -71,8 +71,7 @@ if [ "$BUILDTOOL" = "cmake" ]; then run "cmake .. -DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_TESTS=ON ${BUILDARGS}" run "make VERBOSE=1 -j$(nproc)" run "sudo make install" - run "ctest -V" - if [ $? -eq 0 ] && [ "$CODECOVERAGE" = "1" ]; then + if run "ctest -V" && [ "$CODECOVERAGE" = "1" ]; then run "lcov --directory . --capture --output-file coverage.info" run "lcov --remove coverage.info '/usr/*' --output-file coverage.info" run "lcov --list coverage.info" -- cgit v1.2.3