tests: use /usr/bin/env for bash.

This commit is contained in:
Charlotte 2023-08-12 11:59:39 +10:00
parent 860e3e4056
commit d130f7fca2
56 changed files with 56 additions and 56 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -ex set -ex

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -ex set -ex
cd ../../ cd ../../

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -ex set -ex
../../yosys -p 'synth -top test; write_simplec -verbose -i8 test00_uut.c' test00_uut.v ../../yosys -p 'synth -top test; write_simplec -verbose -i8 test00_uut.c' test00_uut.v
clang -o test00_tb test00_tb.c clang -o test00_tb test00_tb.c

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -ex set -ex

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -ex set -ex

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
bad= bad=

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -ex set -ex

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -ex set -ex
for iter in {1..100} for iter in {1..100}

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -ex set -ex
sed 's/SB_MAC16/SB_MAC16_UUT/; /SB_MAC16_UUT/,/endmodule/ p; d;' < ../cells_sim.v > test_dsp_model_uut.v sed 's/SB_MAC16/SB_MAC16_UUT/; /SB_MAC16_UUT/,/endmodule/ p; d;' < ../cells_sim.v > test_dsp_model_uut.v
if [ ! -f "test_dsp_model_ref.v" ]; then if [ ! -f "test_dsp_model_ref.v" ]; then

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -ex set -ex
for CLKPOL in 0 1; do for CLKPOL in 0 1; do
for ENABLE_EN in 0 1; do for ENABLE_EN in 0 1; do

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -ex set -ex
unisims=/opt/Xilinx/Vivado/2014.4/data/verilog/src/unisims unisims=/opt/Xilinx/Vivado/2014.4/data/verilog/src/unisims

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -ex set -ex
if [ -z $ISE_DIR ]; then if [ -z $ISE_DIR ]; then
ISE_DIR=/opt/Xilinx/ISE/14.7 ISE_DIR=/opt/Xilinx/ISE/14.7

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -ex set -ex
if [ -z $ISE_DIR ]; then if [ -z $ISE_DIR ]; then
ISE_DIR=/opt/Xilinx/ISE/14.7 ISE_DIR=/opt/Xilinx/ISE/14.7

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -ex set -ex
if [ -z $VIVADO_DIR ]; then if [ -z $VIVADO_DIR ]; then
VIVADO_DIR=/opt/Xilinx/Vivado/2019.1 VIVADO_DIR=/opt/Xilinx/Vivado/2019.1

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
OPTIND=1 OPTIND=1
seed="" # default to no seed specified seed="" # default to no seed specified

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e
for x in *.ys; do for x in *.ys; do
echo "Running $x.." echo "Running $x.."

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e
../../yosys -qq -f verilog -p "proc; opt; memory -nomap -bram temp/brams_${2}.txt; opt -fast -full" \ ../../yosys -qq -f verilog -p "proc; opt; memory -nomap -bram temp/brams_${2}.txt; opt -fast -full" \
-l temp/synth_${1}_${2}.log -o temp/synth_${1}_${2}.v temp/brams_${1}.v -l temp/synth_${1}_${2}.log -o temp/synth_${1}_${2}.v temp/brams_${1}.v

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# run this test many times: # run this test many times:
# MAKE="make -j8" time bash -c 'for ((i=0; i<100; i++)); do echo "-- $i --"; bash run-test.sh || exit 1; done' # MAKE="make -j8" time bash -c 'for ((i=0; i<100; i++)); do echo "-- $i --"; bash run-test.sh || exit 1; done'

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -ex set -ex

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# run this test many times: # run this test many times:
# time bash -c 'for ((i=0; i<100; i++)); do echo "-- $i --"; bash run-test.sh || exit 1; done' # time bash -c 'for ((i=0; i<100; i++)); do echo "-- $i --"; bash run-test.sh || exit 1; done'

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
OPTIND=1 OPTIND=1
seed="" # default to no seed specified seed="" # default to no seed specified

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e
for x in *.lib; do for x in *.lib; do

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e
for x in *.v; do for x in *.v; do
echo "Running $x.." echo "Running $x.."

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -eu set -eu
OPTIND=1 OPTIND=1

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -eu set -eu
source ../gen-tests-makefile.sh source ../gen-tests-makefile.sh
run_tests --yosys-scripts run_tests --yosys-scripts

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# run this test many times: # run this test many times:
# time bash -c 'for ((i=0; i<100; i++)); do echo "-- $i --"; bash run-test.sh || exit 1; done' # time bash -c 'for ((i=0; i<100; i++)); do echo "-- $i --"; bash run-test.sh || exit 1; done'

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e
for x in *.ys; do for x in *.ys; do
echo "Running $x.." echo "Running $x.."

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e
OPTIND=1 OPTIND=1

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e
for x in *.ys; do for x in *.ys; do
echo "Running $x.." echo "Running $x.."

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e
for x in *.ys; do for x in *.ys; do
echo "Running $x.." echo "Running $x.."

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# run this test many times: # run this test many times:
# time bash -c 'for ((i=0; i<100; i++)); do echo "-- $i --"; bash run-test.sh || exit 1; done' # time bash -c 'for ((i=0; i<100; i++)); do echo "-- $i --"; bash run-test.sh || exit 1; done'

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
OPTIND=1 OPTIND=1
seed="" # default to no seed specified seed="" # default to no seed specified

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
OPTIND=1 OPTIND=1
seed="" # default to no seed specified seed="" # default to no seed specified

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
cat > $1.tpl <<EOT cat > $1.tpl <<EOT
%module main %module main

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -ex set -ex

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -ex set -ex

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Run a simple test with a .ys file # Run a simple test with a .ys file

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
TESTNAME=$1 TESTNAME=$1

View File

@ -1,3 +1,3 @@
#!/bin/bash #!/usr/bin/env bash
exec ../tools/autotest.sh -G -j $@ -p 'proc; opt; memory -nomap; techmap -map ../mem_simple_4x1_map.v;; techmap; opt; abc;; stat' mem_simple_4x1_uut.v exec ../tools/autotest.sh -G -j $@ -p 'proc; opt; memory -nomap; techmap -map ../mem_simple_4x1_map.v;; techmap; opt; abc;; stat' mem_simple_4x1_uut.v

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -ex set -ex
../../yosys -q -o async_syn.v -r uut -p 'synth; rename uut syn' async.v ../../yosys -q -o async_syn.v -r uut -p 'synth; rename uut syn' async.v
../../yosys -q -o async_prp.v -r uut -p 'prep; rename uut prp' async.v ../../yosys -q -o async_prp.v -r uut -p 'prep; rename uut prp' async.v

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
trap 'echo "ERROR in chparam.sh" >&2; exit 1' ERR trap 'echo "ERROR in chparam.sh" >&2; exit 1' ERR

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
fail() { fail() {
echo "$1" >&2 echo "$1" >&2

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -ex set -ex
../../yosys -q -p 'read_verilog -formal smtlib2_module.v; prep; write_smt2 smtlib2_module.smt2' ../../yosys -q -p 'read_verilog -formal smtlib2_module.v; prep; write_smt2 smtlib2_module.smt2'
sed 's/; SMT-LIBv2 description generated by Yosys .*/; SMT-LIBv2 description generated by Yosys $VERSION/;s/ *$//' smtlib2_module.smt2 > smtlib2_module-filtered.smt2 sed 's/; SMT-LIBv2 description generated by Yosys .*/; SMT-LIBv2 description generated by Yosys $VERSION/;s/ *$//' smtlib2_module.smt2 > smtlib2_module-filtered.smt2

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
trap 'echo "ERROR in sv_implicit_ports.sh" >&2; exit 1' ERR trap 'echo "ERROR in sv_implicit_ports.sh" >&2; exit 1' ERR

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
trap 'echo "ERROR in svalways.sh" >&2; exit 1' ERR trap 'echo "ERROR in svalways.sh" >&2; exit 1' ERR

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
run() { run() {
alt=$1 alt=$1

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -ex set -ex

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e
source common.sh source common.sh

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e
source common.sh source common.sh

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e
source common.sh source common.sh

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e
python3 generate.py $@ python3 generate.py $@