mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 05:48:05 +00:00
zdtm: show logs only in verbose mode
It's may be useful for Jenkins or other auto executors, but human would prefer to open log file in text editor rather than scroll a terminal history. The error message in non-verbose mode contains only critical information such as error messages and paths to log files. Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
b24d488dc9
commit
a4118a6e82
18
test/zdtm.sh
18
test/zdtm.sh
@ -155,6 +155,7 @@ CRIU_CPT=$CRIU
|
|||||||
TMP_TREE=""
|
TMP_TREE=""
|
||||||
SCRIPTDIR=`dirname $CRIU`/test
|
SCRIPTDIR=`dirname $CRIU`/test
|
||||||
POSTDUMP="--action-script $SCRIPTDIR/post-dump.sh"
|
POSTDUMP="--action-script $SCRIPTDIR/post-dump.sh"
|
||||||
|
VERBOSE=0
|
||||||
|
|
||||||
ARGS=""
|
ARGS=""
|
||||||
|
|
||||||
@ -578,10 +579,12 @@ EOF
|
|||||||
if [ -e "$DUMP_PATH/dump.log" ]; then
|
if [ -e "$DUMP_PATH/dump.log" ]; then
|
||||||
echo "Dump log : $DUMP_PATH/dump.log"
|
echo "Dump log : $DUMP_PATH/dump.log"
|
||||||
cat $DUMP_PATH/dump.log* | grep Error
|
cat $DUMP_PATH/dump.log* | grep Error
|
||||||
cat <<EOF
|
if [ $VERBOSE -gt 0 ]; then
|
||||||
|
cat <<EOF
|
||||||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
EOF
|
EOF
|
||||||
tail -n 40 $DUMP_PATH/dump.log*
|
tail -n 40 $DUMP_PATH/dump.log*
|
||||||
|
fi
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
EOF
|
EOF
|
||||||
@ -589,10 +592,12 @@ EOF
|
|||||||
if [ -e "$DUMP_PATH/restore.log" ]; then
|
if [ -e "$DUMP_PATH/restore.log" ]; then
|
||||||
echo "Restore log: $DUMP_PATH/restore.log"
|
echo "Restore log: $DUMP_PATH/restore.log"
|
||||||
cat $DUMP_PATH/restore.log* | grep Error
|
cat $DUMP_PATH/restore.log* | grep Error
|
||||||
cat <<EOF
|
if [ $VERBOSE -gt 0 ]; then
|
||||||
|
cat <<EOF
|
||||||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
EOF
|
EOF
|
||||||
tail -n 40 $DUMP_PATH/restore.log*
|
tail -n 40 $DUMP_PATH/restore.log*
|
||||||
|
fi
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
EOF
|
EOF
|
||||||
@ -650,6 +655,7 @@ Options:
|
|||||||
-g : Generate executables only
|
-g : Generate executables only
|
||||||
-n : Batch test
|
-n : Batch test
|
||||||
-r : Run test with specified name directly without match or check
|
-r : Run test with specified name directly without match or check
|
||||||
|
-v : Verbose mode
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -723,6 +729,10 @@ while :; do
|
|||||||
echo $TEST_LIST | tr ' ' '\n'
|
echo $TEST_LIST | tr ' ' '\n'
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
-v)
|
||||||
|
VERBOSE=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
-h)
|
-h)
|
||||||
usage
|
usage
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user