yosys/tests/cxxrtl/run-test.sh

18 lines
521 B
Bash
Raw Normal View History

2023-12-13 06:02:30 -06:00
#!/bin/bash
set -ex
run_subtest () {
local subtest=$1; shift
2023-12-13 06:27:06 -06:00
${CC:-gcc} -std=c++11 -O2 -o cxxrtl-test-${subtest} -I../../backends/cxxrtl/runtime test_${subtest}.cc -lstdc++
2023-12-13 06:02:30 -06:00
./cxxrtl-test-${subtest}
}
run_subtest value
run_subtest value_fuzz
# Compile-only test.
../../yosys -p "read_verilog test_unconnected_output.v; proc; clean; write_cxxrtl cxxrtl-test-unconnected_output.cc"
${CC:-gcc} -std=c++11 -c -o cxxrtl-test-unconnected_output -I../../backends/cxxrtl/runtime cxxrtl-test-unconnected_output.cc