forked from Mirrors/btrfs-progs
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>master
parent
bd52df0502
commit
402ac7a140
|
@ -52,7 +52,7 @@ do
|
||||||
name=$(basename "$i")
|
name=$(basename "$i")
|
||||||
cd "$i"
|
cd "$i"
|
||||||
if [ -x test.sh ]; then
|
if [ -x test.sh ]; then
|
||||||
echo "=== Entering $i" >> "$RESULTS"
|
echo "=== START TEST $i" >> "$RESULTS"
|
||||||
echo " [TEST/cli] $name"
|
echo " [TEST/cli] $name"
|
||||||
./test.sh
|
./test.sh
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
|
10
tests/common
10
tests/common
|
@ -136,7 +136,7 @@ run_check()
|
||||||
cmd=$(eval echo "\${$spec}")
|
cmd=$(eval echo "\${$spec}")
|
||||||
spec=$(_cmd_spec "${@:$spec}")
|
spec=$(_cmd_spec "${@:$spec}")
|
||||||
set -- "${@:1:$(($ins-1))}" $spec "${@: $ins}"
|
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 [[ $TEST_LOG =~ tty ]]; then echo "CMD: $@" > /dev/tty; fi
|
||||||
if [ "$1" = 'root_helper' ]; then
|
if [ "$1" = 'root_helper' ]; then
|
||||||
"$@" >> "$RESULTS" 2>&1 || _fail "failed: $@"
|
"$@" >> "$RESULTS" 2>&1 || _fail "failed: $@"
|
||||||
|
@ -158,7 +158,7 @@ run_check_stdout()
|
||||||
cmd=$(eval echo "\${$spec}")
|
cmd=$(eval echo "\${$spec}")
|
||||||
spec=$(_cmd_spec "${@:$spec}")
|
spec=$(_cmd_spec "${@:$spec}")
|
||||||
set -- "${@:1:$(($ins-1))}" $spec "${@: $ins}"
|
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 [[ $TEST_LOG =~ tty ]]; then echo "CMD(stdout): $@" > /dev/tty; fi
|
||||||
if [ "$1" = 'root_helper' ]; then
|
if [ "$1" = 'root_helper' ]; then
|
||||||
"$@" 2>&1 | tee -a "$RESULTS"
|
"$@" 2>&1 | tee -a "$RESULTS"
|
||||||
|
@ -185,7 +185,7 @@ run_mayfail()
|
||||||
cmd=$(eval echo "\${$spec}")
|
cmd=$(eval echo "\${$spec}")
|
||||||
spec=$(_cmd_spec "${@:$spec}")
|
spec=$(_cmd_spec "${@:$spec}")
|
||||||
set -- "${@:1:$(($ins-1))}" $spec "${@: $ins}"
|
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 [[ $TEST_LOG =~ tty ]]; then echo "CMD(mayfail): $@" > /dev/tty; fi
|
||||||
if [ "$1" = 'root_helper' ]; then
|
if [ "$1" = 'root_helper' ]; then
|
||||||
"$@" >> "$RESULTS" 2>&1
|
"$@" >> "$RESULTS" 2>&1
|
||||||
|
@ -226,7 +226,7 @@ run_mustfail()
|
||||||
cmd=$(eval echo "\${$spec}")
|
cmd=$(eval echo "\${$spec}")
|
||||||
spec=$(_cmd_spec "${@:$spec}")
|
spec=$(_cmd_spec "${@:$spec}")
|
||||||
set -- "${@:1:$(($ins-1))}" $spec "${@: $ins}"
|
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 [[ $TEST_LOG =~ tty ]]; then echo "CMD(mustfail): $@" > /dev/tty; fi
|
||||||
if [ "$1" = 'root_helper' ]; then
|
if [ "$1" = 'root_helper' ]; then
|
||||||
"$@" >> "$RESULTS" 2>&1
|
"$@" >> "$RESULTS" 2>&1
|
||||||
|
@ -272,7 +272,7 @@ run_mustfail_stdout()
|
||||||
cmd=$(eval echo "\${$spec}")
|
cmd=$(eval echo "\${$spec}")
|
||||||
spec=$(_cmd_spec "${@:$spec}")
|
spec=$(_cmd_spec "${@:$spec}")
|
||||||
set -- "${@:1:$(($ins-1))}" $spec "${@: $ins}"
|
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 [[ $TEST_LOG =~ tty ]]; then echo "CMD(mustfail): $@" > /dev/tty; fi
|
||||||
if [ "$1" = 'root_helper' ]; then
|
if [ "$1" = 'root_helper' ]; then
|
||||||
"$@" 2>&1 > "$tmp_output"
|
"$@" 2>&1 > "$tmp_output"
|
||||||
|
|
|
@ -58,7 +58,7 @@ run_one_test() {
|
||||||
testname=$(basename "$testdir")
|
testname=$(basename "$testdir")
|
||||||
echo " [TEST/conv] $testname"
|
echo " [TEST/conv] $testname"
|
||||||
cd "$testdir"
|
cd "$testdir"
|
||||||
echo "=== Entering $testname" >> "$RESULTS"
|
echo "=== START TEST $testname" >> "$RESULTS"
|
||||||
if [ -x test.sh ]; then
|
if [ -x test.sh ]; then
|
||||||
# Only support custom test scripts
|
# Only support custom test scripts
|
||||||
./test.sh
|
./test.sh
|
||||||
|
|
|
@ -54,7 +54,7 @@ run_one_test() {
|
||||||
testname="$1"
|
testname="$1"
|
||||||
echo " [TEST/fsck] $(basename $testname)"
|
echo " [TEST/fsck] $(basename $testname)"
|
||||||
cd "$testname"
|
cd "$testname"
|
||||||
echo "=== Entering $testname" >> "$RESULTS"
|
echo "=== START TEST $testname" >> "$RESULTS"
|
||||||
if [ -x test.sh ]; then
|
if [ -x test.sh ]; then
|
||||||
# Type 2
|
# Type 2
|
||||||
./test.sh
|
./test.sh
|
||||||
|
|
|
@ -51,7 +51,7 @@ do
|
||||||
name=$(basename "$i")
|
name=$(basename "$i")
|
||||||
cd $i
|
cd $i
|
||||||
if [ -x test.sh ]; then
|
if [ -x test.sh ]; then
|
||||||
echo "=== Entering $i" >> "$RESULTS"
|
echo "=== START TEST $i" >> "$RESULTS"
|
||||||
echo " [TEST/fuzz] $name"
|
echo " [TEST/fuzz] $name"
|
||||||
./test.sh
|
./test.sh
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
|
|
@ -57,7 +57,7 @@ for i in $(find "$TEST_TOP/misc-tests" -maxdepth 1 -mindepth 1 -type d \
|
||||||
do
|
do
|
||||||
echo " [TEST/misc] $(basename $i)"
|
echo " [TEST/misc] $(basename $i)"
|
||||||
cd "$i"
|
cd "$i"
|
||||||
echo "=== Entering $i" >> "$RESULTS"
|
echo "=== START TEST $i" >> "$RESULTS"
|
||||||
if [ -x test.sh ]; then
|
if [ -x test.sh ]; then
|
||||||
./test.sh
|
./test.sh
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
|
|
@ -52,7 +52,7 @@ for i in $(find "$TEST_TOP/mkfs-tests" -maxdepth 1 -mindepth 1 -type d \
|
||||||
do
|
do
|
||||||
echo " [TEST/mkfs] $(basename $i)"
|
echo " [TEST/mkfs] $(basename $i)"
|
||||||
cd "$i"
|
cd "$i"
|
||||||
echo "=== Entering $i" >> "$RESULTS"
|
echo "=== START TEST $i" >> "$RESULTS"
|
||||||
if [ -x test.sh ]; then
|
if [ -x test.sh ]; then
|
||||||
./test.sh
|
./test.sh
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
|
Loading…
Reference in New Issue