Skip to content

Commit 3dd3079

Browse files
committed
tests: avoid interleaving lines in test output
1 parent 8371adf commit 3dd3079

File tree

13 files changed

+14
-19
lines changed

13 files changed

+14
-19
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ makefile-tests: $(MK_TEST_DIRS:%=makefile-tests/%)
955955
+cd $(dir $*) && bash run-test.sh
956956
# this one spawns submake on each
957957
makefile-tests/%: %/run-test.mk $(TARGETS) $(EXTRA_TARGETS)
958-
$(MAKE) -C $* -f run-test.mk
958+
stdbuf -oL -eL $(MAKE) -C $* -f run-test.mk
959959
+@echo "...passed tests in $*"
960960

961961
test: makefile-tests abcopt-tests seed-tests

techlibs/xilinx/tests/bram1.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ for dbits in $dbits_list; do
4343
{
4444
echo "bram1_$id/ok:"
4545
echo " @cd bram1_$id && bash run.sh"
46-
echo " @echo -n '[$id]'"
46+
echo " @echo '[$id]'"
4747
echo " @touch \$@"
4848
} >> bram1.mk
4949
all_list="$all_list bram1_$id/ok"

tests/arch/run-test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ for arch in ../../techlibs/*; do
1010
arch_name=$(basename -- $arch)
1111
if [ "${defines[$arch_name]}" ]; then
1212
for def in ${defines[$arch_name]}; do
13-
echo -n "Test $path -D$def ->"
13+
echo "Test $path -D$def ->"
1414
iverilog -t null -I$arch -D$def -DNO_ICE40_DEFAULT_ASSIGNMENTS $path
1515
echo " ok"
1616
done
1717
else
18-
echo -n "Test $path ->"
18+
echo "Test $path ->"
1919
iverilog -t null -I$arch -g2005-sv $path
2020
echo " ok"
2121
fi
2222
done
2323
done
2424

2525
for path in "../../techlibs/common/simcells.v" "../../techlibs/common/simlib.v"; do
26-
echo -n "Test $path ->"
26+
echo "Test $path ->"
2727
iverilog -t null $path
2828
echo " ok"
2929
done

tests/fsm/run-test.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ python3 generate.py -c $count $seed
2929
for i in $( ls temp/*.ys | sed 's,[^0-9],,g; s,^0*\(.\),\1,g;' ); do
3030
idx=$( printf "%05d" $i )
3131
echo "temp/uut_${idx}.log: temp/uut_${idx}.ys temp/uut_${idx}.v"
32-
echo " @echo -n '[$i]'"
3332
echo " @../../yosys -ql temp/uut_${idx}.out temp/uut_${idx}.ys"
3433
echo " @mv temp/uut_${idx}.out temp/uut_${idx}.log"
35-
echo " @grep -q 'SAT proof finished' temp/uut_${idx}.log && echo -n K || echo -n T"
34+
echo " @grep -q 'SAT proof finished' temp/uut_${idx}.log && echo K || echo T"
3635
all_targets="$all_targets temp/uut_${idx}.log"
3736
done
3837
echo "$all_targets"

tests/gen-tests-makefile.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ generate_target() {
99
echo "all: $target_name"
1010
echo ".PHONY: $target_name"
1111
echo "$target_name:"
12-
printf "\t@%s\n" "$test_command"
13-
printf "\t@echo 'Passed %s'\n" "$target_name"
12+
printf "\t@/usr/bin/env time -f \"Test $target_name took %%e\" $test_command >/dev/null 2>/dev/null\n"
1413
}
1514

1615
# $ generate_ys_test ys_file [yosys_args]

tests/memories/run-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ shift "$((OPTIND-1))"
1717
${MAKE:-make} -f ../tools/autotest.mk SEED="$seed" EXTRA_FLAGS="$abcopt" *.v
1818

1919
for f in `egrep -l 'expect-(wr-ports|rd-ports|rd-clk)' *.v`; do
20-
echo -n "Testing expectations for $f .."
20+
echo "Testing expectations for $f .."
2121
../../yosys -f verilog -qp "proc; opt; memory -nomap;; dump -outfile ${f%.v}.dmp t:\$mem_v2" $f
2222
if grep -q expect-wr-ports $f; then
2323
grep -q "parameter \\\\WR_PORTS $(gawk '/expect-wr-ports/ { print $3; }' $f)\$" ${f%.v}.dmp ||

tests/opt_share/run-test.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ python3 generate.py -c $count $seed
3232
echo "all: test-$idx"
3333
echo "test-$idx:"
3434
printf "\t@%s\n" \
35-
"echo -n [$i]" \
3635
"../../yosys -ql temp/uut_${idx}.log temp/uut_${idx}.ys"
3736
done
3837
} > temp/makefile

tests/realmath/run-test.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ python3 generate.py -c $count $seed
2121
cd temp
2222
echo "running tests.."
2323
for ((i = 0; i < $count; i++)); do
24-
echo -n "[$i]"
2524
idx=$( printf "%05d" $i )
2625
../../../yosys -qq uut_${idx}.ys
2726
iverilog -o uut_${idx}_tb uut_${idx}_tb.v uut_${idx}.v uut_${idx}_syn.v

tests/share/run-test.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ python3 generate.py -c $count $seed
2424

2525
echo "running tests.."
2626
for i in $( ls temp/*.ys | sed 's,[^0-9],,g; s,^0*\(.\),\1,g;' ); do
27-
echo -n "[$i]"
2827
idx=$( printf "%05d" $i )
2928
../../yosys -ql temp/uut_${idx}.log temp/uut_${idx}.ys
3029
done

tests/svinterfaces/run_simple.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if [ $# != 1 ]; then
77
exit 1
88
fi
99

10-
echo -n "Test: $1 ->"
10+
echo "Test: $1 ->"
1111
../../yosys $1.ys >$1.log_stdout 2>$1.log_stderr || {
1212
echo "ERROR!"
1313
exit 1

0 commit comments

Comments
 (0)