btrfs-progs: tests: update log markers

Use visual markers that separate tests and individual commands run via
the run_* helpers.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2018-05-08 19:04:41 +02:00
parent bd52df0502
commit 402ac7a140
7 changed files with 11 additions and 11 deletions

View File

@ -52,7 +52,7 @@ do
name=$(basename "$i")
cd "$i"
if [ -x test.sh ]; then
echo "=== Entering $i" >> "$RESULTS"
echo "=== START TEST $i" >> "$RESULTS"
echo " [TEST/cli] $name"
./test.sh
if [ $? -ne 0 ]; then

View File

@ -136,7 +136,7 @@ run_check()
cmd=$(eval echo "\${$spec}")
spec=$(_cmd_spec "${@:$spec}")
set -- "${@:1:$(($ins-1))}" $spec "${@: $ins}"
echo "############### $@" >> "$RESULTS" 2>&1
echo "====== RUN CHECK $@" >> "$RESULTS" 2>&1
if [[ $TEST_LOG =~ tty ]]; then echo "CMD: $@" > /dev/tty; fi
if [ "$1" = 'root_helper' ]; then
"$@" >> "$RESULTS" 2>&1 || _fail "failed: $@"
@ -158,7 +158,7 @@ run_check_stdout()
cmd=$(eval echo "\${$spec}")
spec=$(_cmd_spec "${@:$spec}")
set -- "${@:1:$(($ins-1))}" $spec "${@: $ins}"
echo "############### $@" >> "$RESULTS" 2>&1
echo "====== RUN CHECK $@" >> "$RESULTS" 2>&1
if [[ $TEST_LOG =~ tty ]]; then echo "CMD(stdout): $@" > /dev/tty; fi
if [ "$1" = 'root_helper' ]; then
"$@" 2>&1 | tee -a "$RESULTS"
@ -185,7 +185,7 @@ run_mayfail()
cmd=$(eval echo "\${$spec}")
spec=$(_cmd_spec "${@:$spec}")
set -- "${@:1:$(($ins-1))}" $spec "${@: $ins}"
echo "############### $@" >> "$RESULTS" 2>&1
echo "====== RUN MAYFAIL $@" >> "$RESULTS" 2>&1
if [[ $TEST_LOG =~ tty ]]; then echo "CMD(mayfail): $@" > /dev/tty; fi
if [ "$1" = 'root_helper' ]; then
"$@" >> "$RESULTS" 2>&1
@ -226,7 +226,7 @@ run_mustfail()
cmd=$(eval echo "\${$spec}")
spec=$(_cmd_spec "${@:$spec}")
set -- "${@:1:$(($ins-1))}" $spec "${@: $ins}"
echo "############### $@" >> "$RESULTS" 2>&1
echo "====== RUN MUSTFAIL $@" >> "$RESULTS" 2>&1
if [[ $TEST_LOG =~ tty ]]; then echo "CMD(mustfail): $@" > /dev/tty; fi
if [ "$1" = 'root_helper' ]; then
"$@" >> "$RESULTS" 2>&1
@ -272,7 +272,7 @@ run_mustfail_stdout()
cmd=$(eval echo "\${$spec}")
spec=$(_cmd_spec "${@:$spec}")
set -- "${@:1:$(($ins-1))}" $spec "${@: $ins}"
echo "############### $@" >> "$RESULTS" 2>&1
echo "====== RUN MUSTFAIL $@" >> "$RESULTS" 2>&1
if [[ $TEST_LOG =~ tty ]]; then echo "CMD(mustfail): $@" > /dev/tty; fi
if [ "$1" = 'root_helper' ]; then
"$@" 2>&1 > "$tmp_output"

View File

@ -58,7 +58,7 @@ run_one_test() {
testname=$(basename "$testdir")
echo " [TEST/conv] $testname"
cd "$testdir"
echo "=== Entering $testname" >> "$RESULTS"
echo "=== START TEST $testname" >> "$RESULTS"
if [ -x test.sh ]; then
# Only support custom test scripts
./test.sh

View File

@ -54,7 +54,7 @@ run_one_test() {
testname="$1"
echo " [TEST/fsck] $(basename $testname)"
cd "$testname"
echo "=== Entering $testname" >> "$RESULTS"
echo "=== START TEST $testname" >> "$RESULTS"
if [ -x test.sh ]; then
# Type 2
./test.sh

View File

@ -51,7 +51,7 @@ do
name=$(basename "$i")
cd $i
if [ -x test.sh ]; then
echo "=== Entering $i" >> "$RESULTS"
echo "=== START TEST $i" >> "$RESULTS"
echo " [TEST/fuzz] $name"
./test.sh
if [ $? -ne 0 ]; then

View File

@ -57,7 +57,7 @@ for i in $(find "$TEST_TOP/misc-tests" -maxdepth 1 -mindepth 1 -type d \
do
echo " [TEST/misc] $(basename $i)"
cd "$i"
echo "=== Entering $i" >> "$RESULTS"
echo "=== START TEST $i" >> "$RESULTS"
if [ -x test.sh ]; then
./test.sh
if [ $? -ne 0 ]; then

View File

@ -52,7 +52,7 @@ for i in $(find "$TEST_TOP/mkfs-tests" -maxdepth 1 -mindepth 1 -type d \
do
echo " [TEST/mkfs] $(basename $i)"
cd "$i"
echo "=== Entering $i" >> "$RESULTS"
echo "=== START TEST $i" >> "$RESULTS"
if [ -x test.sh ]; then
./test.sh
if [ $? -ne 0 ]; then