core: run command and check return code on same line in tools scripts

v2.8-utf8proc
Sébastien Helleu 2019-11-28 21:25:47 +01:00
parent c0e48b0370
commit a727516e0d
2 changed files with 2 additions and 4 deletions

View File

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

View File

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