From 9823ed5aaa3c2e41848e4f0c91379c4a0e092738 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 7 Dec 2020 16:00:10 +0100 Subject: [PATCH] Moar logging tweaks --- package_check.sh | 3 +++ sub_scripts/common.sh | 2 +- sub_scripts/testing_process.sh | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package_check.sh b/package_check.sh index 5a50000..0f5cef2 100755 --- a/package_check.sh +++ b/package_check.sh @@ -16,6 +16,9 @@ TEST_CONTEXT="./.tmp_test_context" rm -rf $TEST_CONTEXT mkdir -p $TEST_CONTEXT +# Redirect fd 3 (=debug steam) to complete log +exec 3>>$complete_log + #================================================= # Starting and checking #================================================= diff --git a/sub_scripts/common.sh b/sub_scripts/common.sh index 9806875..6468fca 100755 --- a/sub_scripts/common.sh +++ b/sub_scripts/common.sh @@ -66,7 +66,7 @@ function log_small_title() function log_debug() { - echo "$1" + echo "$1" >&3 } function log_info() diff --git a/sub_scripts/testing_process.sh b/sub_scripts/testing_process.sh index 7cb3e51..4d85897 100755 --- a/sub_scripts/testing_process.sh +++ b/sub_scripts/testing_process.sh @@ -30,7 +30,7 @@ RUN_YUNOHOST_CMD() { # --output-as none is to disable the json-like output for some commands like backup create LXC_START "sudo PACKAGE_CHECK_EXEC=1 yunohost --output-as none --debug $1" \ | grep --line-buffered -v --extended-regexp '^[0-9]+\s+.{1,15}DEBUG' \ - | grep -v 'processing action' + | grep --line-buffered -v 'processing action' returncode=${PIPESTATUS[0]} check_witness_files