mirror of https://github.com/YosysHQ/yosys.git
Merge pull request #4814 from YosysHQ/emil/make-test-fasterer
test: every test everywhere all at once
This commit is contained in:
commit
6ab5be4a0e
151
Makefile
151
Makefile
|
@ -810,71 +810,100 @@ else
|
||||||
ABCOPT=""
|
ABCOPT=""
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# When YOSYS_NOVERIFIC is set as a make variable, also export it to the
|
# Tests that generate .mk with tests/gen-tests-makefile.sh
|
||||||
# enviornment, so that `YOSYS_NOVERIFIC=1 make test` _and_
|
MK_TEST_DIRS =
|
||||||
# `make test YOSYS_NOVERIFIC=1` will run with verific disabled.
|
MK_TEST_DIRS += tests/arch/anlogic
|
||||||
ifeq ($(YOSYS_NOVERIFIC),1)
|
MK_TEST_DIRS += tests/arch/ecp5
|
||||||
export YOSYS_NOVERIFIC
|
MK_TEST_DIRS += tests/arch/efinix
|
||||||
|
MK_TEST_DIRS += tests/arch/gatemate
|
||||||
|
MK_TEST_DIRS += tests/arch/gowin
|
||||||
|
MK_TEST_DIRS += tests/arch/ice40
|
||||||
|
MK_TEST_DIRS += tests/arch/intel_alm
|
||||||
|
MK_TEST_DIRS += tests/arch/machxo2
|
||||||
|
MK_TEST_DIRS += tests/arch/microchip
|
||||||
|
MK_TEST_DIRS += tests/arch/nanoxplore
|
||||||
|
MK_TEST_DIRS += tests/arch/nexus
|
||||||
|
MK_TEST_DIRS += tests/arch/quicklogic/pp3
|
||||||
|
MK_TEST_DIRS += tests/arch/quicklogic/qlf_k6n10f
|
||||||
|
MK_TEST_DIRS += tests/arch/xilinx
|
||||||
|
MK_TEST_DIRS += tests/opt
|
||||||
|
MK_TEST_DIRS += tests/sat
|
||||||
|
MK_TEST_DIRS += tests/sim
|
||||||
|
MK_TEST_DIRS += tests/svtypes
|
||||||
|
MK_TEST_DIRS += tests/techmap
|
||||||
|
MK_TEST_DIRS += tests/various
|
||||||
|
ifeq ($(ENABLE_VERIFIC),1)
|
||||||
|
ifneq ($(YOSYS_NOVERIFIC),1)
|
||||||
|
MK_TEST_DIRS += tests/verific
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
MK_TEST_DIRS += tests/verilog
|
||||||
|
|
||||||
|
# Tests that don't generate .mk
|
||||||
|
SH_TEST_DIRS =
|
||||||
|
SH_TEST_DIRS += tests/simple
|
||||||
|
SH_TEST_DIRS += tests/simple_abc9
|
||||||
|
SH_TEST_DIRS += tests/hana
|
||||||
|
SH_TEST_DIRS += tests/asicworld
|
||||||
|
# SH_TEST_DIRS += tests/realmath
|
||||||
|
SH_TEST_DIRS += tests/share
|
||||||
|
SH_TEST_DIRS += tests/opt_share
|
||||||
|
SH_TEST_DIRS += tests/fsm
|
||||||
|
SH_TEST_DIRS += tests/memlib
|
||||||
|
SH_TEST_DIRS += tests/bram
|
||||||
|
SH_TEST_DIRS += tests/svinterfaces
|
||||||
|
SH_TEST_DIRS += tests/xprop
|
||||||
|
SH_TEST_DIRS += tests/select
|
||||||
|
SH_TEST_DIRS += tests/proc
|
||||||
|
SH_TEST_DIRS += tests/blif
|
||||||
|
SH_TEST_DIRS += tests/arch
|
||||||
|
SH_TEST_DIRS += tests/rpc
|
||||||
|
SH_TEST_DIRS += tests/memfile
|
||||||
|
SH_TEST_DIRS += tests/fmt
|
||||||
|
SH_TEST_DIRS += tests/cxxrtl
|
||||||
|
ifeq ($(ENABLE_FUNCTIONAL_TESTS),1)
|
||||||
|
SH_TEST_DIRS += tests/functional
|
||||||
endif
|
endif
|
||||||
|
|
||||||
test: $(TARGETS) $(EXTRA_TARGETS)
|
# Tests that don't generate .mk and need special args
|
||||||
ifeq ($(ENABLE_VERIFIC),1)
|
SH_ABC_TEST_DIRS =
|
||||||
ifeq ($(YOSYS_NOVERIFIC),1)
|
SH_ABC_TEST_DIRS += tests/memories
|
||||||
@echo
|
SH_ABC_TEST_DIRS += tests/aiger
|
||||||
@echo "Running tests without verific support due to YOSYS_NOVERIFIC=1"
|
|
||||||
@echo
|
# seed-tests/ is a dummy string, not a directory
|
||||||
else
|
.PHONY: seed-tests
|
||||||
+cd tests/verific && bash run-test.sh $(SEEDOPT)
|
seed-tests: $(SH_TEST_DIRS:%=seed-tests/%)
|
||||||
endif
|
.PHONY: seed-tests/%
|
||||||
endif
|
seed-tests/%: %/run-test.sh $(TARGETS) $(EXTRA_TARGETS)
|
||||||
+cd tests/simple && bash run-test.sh $(SEEDOPT)
|
+cd $* && bash run-test.sh $(SEEDOPT)
|
||||||
+cd tests/simple_abc9 && bash run-test.sh $(SEEDOPT)
|
+@echo "...passed tests in $*"
|
||||||
+cd tests/hana && bash run-test.sh $(SEEDOPT)
|
|
||||||
+cd tests/asicworld && bash run-test.sh $(SEEDOPT)
|
# abcopt-tests/ is a dummy string, not a directory
|
||||||
# +cd tests/realmath && bash run-test.sh $(SEEDOPT)
|
.PHONY: abcopt-tests
|
||||||
+cd tests/share && bash run-test.sh $(SEEDOPT)
|
abcopt-tests: $(SH_ABC_TEST_DIRS:%=abcopt-tests/%)
|
||||||
+cd tests/opt_share && bash run-test.sh $(SEEDOPT)
|
abcopt-tests/%: %/run-test.sh $(TARGETS) $(EXTRA_TARGETS)
|
||||||
+cd tests/fsm && bash run-test.sh $(SEEDOPT)
|
+cd $* && bash run-test.sh $(ABCOPT) $(SEEDOPT)
|
||||||
+cd tests/techmap && bash run-test.sh
|
+@echo "...passed tests in $*"
|
||||||
+cd tests/memories && bash run-test.sh $(ABCOPT) $(SEEDOPT)
|
|
||||||
+cd tests/memlib && bash run-test.sh $(SEEDOPT)
|
# makefile-tests/ is a dummy string, not a directory
|
||||||
+cd tests/bram && bash run-test.sh $(SEEDOPT)
|
.PHONY: makefile-tests
|
||||||
+cd tests/various && bash run-test.sh
|
makefile-tests: $(MK_TEST_DIRS:%=makefile-tests/%)
|
||||||
+cd tests/select && bash run-test.sh
|
# this target actually emits .mk files
|
||||||
+cd tests/sat && bash run-test.sh
|
%.mk:
|
||||||
+cd tests/sim && bash run-test.sh
|
+cd $(dir $*) && bash run-test.sh
|
||||||
+cd tests/svinterfaces && bash run-test.sh $(SEEDOPT)
|
# this one spawns submake on each
|
||||||
+cd tests/svtypes && bash run-test.sh $(SEEDOPT)
|
makefile-tests/%: %/run-test.mk $(TARGETS) $(EXTRA_TARGETS)
|
||||||
+cd tests/proc && bash run-test.sh
|
$(MAKE) -C $* -f run-test.mk
|
||||||
+cd tests/blif && bash run-test.sh
|
+@echo "...passed tests in $*"
|
||||||
+cd tests/opt && bash run-test.sh
|
|
||||||
+cd tests/aiger && bash run-test.sh $(ABCOPT)
|
test: makefile-tests abcopt-tests seed-tests
|
||||||
+cd tests/arch && bash run-test.sh
|
|
||||||
+cd tests/arch/ice40 && bash run-test.sh $(SEEDOPT)
|
|
||||||
+cd tests/arch/xilinx && bash run-test.sh $(SEEDOPT)
|
|
||||||
+cd tests/arch/ecp5 && bash run-test.sh $(SEEDOPT)
|
|
||||||
+cd tests/arch/machxo2 && bash run-test.sh $(SEEDOPT)
|
|
||||||
+cd tests/arch/efinix && bash run-test.sh $(SEEDOPT)
|
|
||||||
+cd tests/arch/anlogic && bash run-test.sh $(SEEDOPT)
|
|
||||||
+cd tests/arch/gowin && bash run-test.sh $(SEEDOPT)
|
|
||||||
+cd tests/arch/intel_alm && bash run-test.sh $(SEEDOPT)
|
|
||||||
+cd tests/arch/nanoxplore && bash run-test.sh $(SEEDOPT)
|
|
||||||
+cd tests/arch/nexus && bash run-test.sh $(SEEDOPT)
|
|
||||||
+cd tests/arch/quicklogic/pp3 && bash run-test.sh $(SEEDOPT)
|
|
||||||
+cd tests/arch/quicklogic/qlf_k6n10f && bash run-test.sh $(SEEDOPT)
|
|
||||||
+cd tests/arch/gatemate && bash run-test.sh $(SEEDOPT)
|
|
||||||
+cd tests/arch/microchip && bash run-test.sh $(SEEDOPT)
|
|
||||||
+cd tests/rpc && bash run-test.sh
|
|
||||||
+cd tests/memfile && bash run-test.sh
|
|
||||||
+cd tests/verilog && bash run-test.sh
|
|
||||||
+cd tests/xprop && bash run-test.sh $(SEEDOPT)
|
|
||||||
+cd tests/fmt && bash run-test.sh
|
|
||||||
+cd tests/cxxrtl && bash run-test.sh
|
|
||||||
ifeq ($(ENABLE_FUNCTIONAL_TESTS),1)
|
|
||||||
+cd tests/functional && bash run-test.sh
|
|
||||||
endif
|
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " Passed \"make test\"."
|
@echo " Passed \"make test\"."
|
||||||
|
ifeq ($(ENABLE_VERIFIC),1)
|
||||||
|
ifeq ($(YOSYS_NOVERIFIC),1)
|
||||||
|
@echo " Ran tests without verific support due to YOSYS_NOVERIFIC=1."
|
||||||
|
endif
|
||||||
|
endif
|
||||||
@echo ""
|
@echo ""
|
||||||
|
|
||||||
VALGRIND ?= valgrind --error-exitcode=1 --leak-check=full --show-reachable=yes --errors-for-leak-kinds=all
|
VALGRIND ?= valgrind --error-exitcode=1 --leak-check=full --show-reachable=yes --errors-for-leak-kinds=all
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
source ../../gen-tests-makefile.sh
|
source ../../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
source ../../gen-tests-makefile.sh
|
source ../../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
source ../../gen-tests-makefile.sh
|
source ../../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
source ../../gen-tests-makefile.sh
|
source ../../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
source ../../gen-tests-makefile.sh
|
source ../../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
source ../../gen-tests-makefile.sh
|
source ../../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
source ../../gen-tests-makefile.sh
|
source ../../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
source ../../gen-tests-makefile.sh
|
source ../../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
source ../../gen-tests-makefile.sh
|
source ../../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
source ../../gen-tests-makefile.sh
|
source ../../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
source ../../gen-tests-makefile.sh
|
source ../../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
source ../../../gen-tests-makefile.sh
|
source ../../../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
set -eu
|
set -eu
|
||||||
python3 mem_gen.py
|
python3 mem_gen.py
|
||||||
source ../../../gen-tests-makefile.sh
|
source ../../../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts --bash
|
generate_mk --yosys-scripts --bash
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
source ../../gen-tests-makefile.sh
|
source ../../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||||
|
|
|
@ -4,7 +4,7 @@ YOSYS_BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")"/../ >/dev/null 2>&1 && pwd)
|
||||||
|
|
||||||
# $ generate_target target_name test_command
|
# $ generate_target target_name test_command
|
||||||
generate_target() {
|
generate_target() {
|
||||||
target_name=$1
|
target_name=$(basename $PWD)-$1
|
||||||
test_command=$2
|
test_command=$2
|
||||||
echo "all: $target_name"
|
echo "all: $target_name"
|
||||||
echo ".PHONY: $target_name"
|
echo ".PHONY: $target_name"
|
||||||
|
@ -105,7 +105,6 @@ generate_tests() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
run_tests() {
|
generate_mk() {
|
||||||
generate_tests "$@" > run-test.mk
|
generate_tests "$@" > run-test.mk
|
||||||
exec ${MAKE:-make} -f run-test.mk
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
source ../gen-tests-makefile.sh
|
source ../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts
|
generate_mk --yosys-scripts
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
source ../gen-tests-makefile.sh
|
source ../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts
|
generate_mk --yosys-scripts
|
||||||
|
|
|
@ -9,4 +9,4 @@ find tb/* -name tb*.v | while read name; do
|
||||||
iverilog -o tb/$test_name.out $name $verilog_name
|
iverilog -o tb/$test_name.out $name $verilog_name
|
||||||
./tb/$test_name.out -fst
|
./tb/$test_name.out -fst
|
||||||
done
|
done
|
||||||
run_tests --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
source ../gen-tests-makefile.sh
|
source ../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts --prove-sv
|
generate_mk --yosys-scripts --prove-sv
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
source ../gen-tests-makefile.sh
|
source ../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts --tcl-scripts --bash --yosys-args "-e 'select out of bounds'"
|
generate_mk --yosys-scripts --tcl-scripts --bash --yosys-args "-e 'select out of bounds'"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
source ../gen-tests-makefile.sh
|
source ../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts --bash
|
generate_mk --yosys-scripts --bash
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
source ../gen-tests-makefile.sh
|
source ../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts --bash
|
generate_mk --yosys-scripts --bash
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
source ../gen-tests-makefile.sh
|
source ../gen-tests-makefile.sh
|
||||||
run_tests --yosys-scripts --bash
|
generate_mk --yosys-scripts --bash
|
||||||
|
|
Loading…
Reference in New Issue