generate_target() {
target_name=$1
test_command=$2
- echo "all:: $target_name"
+ echo "all: $target_name"
echo ".PHONY: $target_name"
echo "$target_name:"
printf "\t@%s\n" "$test_command"
fi
echo ".PHONY: all"
- echo "all::"
+ echo "all:"
if [[ $do_ys = true ]]; then
for x in *.ys; do
do
case "$opt" in
A) abcopt="-A $OPTARG" ;;
- S) seed="-S $OPTARG" ;;
+ S) seed="$OPTARG" ;;
esac
done
shift "$((OPTIND-1))"
-bash ../tools/autotest.sh $abcopt $seed -G *.v
+${MAKE:-make} -f ../tools/autotest.mk SEED="$seed" EXTRA_FLAGS="$abcopt" *.v
for f in `egrep -l 'expect-(wr-ports|rd-ports|rd-clk)' *.v`; do
echo -n "Testing expectations for $f .."
echo "generating tests.."
python3 generate.py -c $count $seed
+{
+ echo ".PHONY: all"
+ echo "all:"
+
+ for i in $( ls temp/*.ys | sed 's,[^0-9],,g; s,^0*\(.\),\1,g;' ); do
+ idx=$( printf "%05d" $i )
+ echo ".PHONY: test-$idx"
+ echo "all: test-$idx"
+ echo "test-$idx:"
+ printf "\t@%s\n" \
+ "echo -n [$i]" \
+ "../../yosys -ql temp/uut_${idx}.log temp/uut_${idx}.ys"
+ done
+} > temp/makefile
+
echo "running tests.."
-for i in $( ls temp/*.ys | sed 's,[^0-9],,g; s,^0*\(.\),\1,g;' ); do
- echo -n "[$i]"
- idx=$( printf "%05d" $i )
- ../../yosys -ql temp/uut_${idx}.log temp/uut_${idx}.ys
-done
+${MAKE:-make} -f temp/makefile
echo
failed_share=$( echo $( gawk '/^#job#/ { j=$2; db[j]=0; } /^Removing [246] cells/ { delete db[j]; } END { for (j in db) print(j); }' temp/all_share_log.txt ) )