diff --git a/backends/btor/test_cells.sh b/backends/btor/test_cells.sh index 0a011932d..f8bd79782 100755 --- a/backends/btor/test_cells.sh +++ b/backends/btor/test_cells.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/backends/firrtl/test.sh b/backends/firrtl/test.sh index fe7e3a329..dd675e917 100644 --- a/backends/firrtl/test.sh +++ b/backends/firrtl/test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex cd ../../ diff --git a/backends/simplec/test00.sh b/backends/simplec/test00.sh index ede757273..9895a97e4 100644 --- a/backends/simplec/test00.sh +++ b/backends/simplec/test00.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex ../../yosys -p 'synth -top test; write_simplec -verbose -i8 test00_uut.c' test00_uut.v clang -o test00_tb test00_tb.c diff --git a/backends/smt2/test_cells.sh b/backends/smt2/test_cells.sh index 34adb7af3..3f84d65a2 100644 --- a/backends/smt2/test_cells.sh +++ b/backends/smt2/test_cells.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/backends/smv/test_cells.sh b/backends/smv/test_cells.sh index 145b9c33b..1347b7044 100644 --- a/backends/smv/test_cells.sh +++ b/backends/smv/test_cells.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/libs/bigint/run-testsuite b/libs/bigint/run-testsuite index ff7372916..8436ebda0 100755 --- a/libs/bigint/run-testsuite +++ b/libs/bigint/run-testsuite @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash bad= diff --git a/techlibs/ice40/tests/test_bram.sh b/techlibs/ice40/tests/test_bram.sh index d4d641a9c..5c30db644 100644 --- a/techlibs/ice40/tests/test_bram.sh +++ b/techlibs/ice40/tests/test_bram.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/techlibs/ice40/tests/test_dsp_map.sh b/techlibs/ice40/tests/test_dsp_map.sh index 3f7f134e4..8523a4676 100644 --- a/techlibs/ice40/tests/test_dsp_map.sh +++ b/techlibs/ice40/tests/test_dsp_map.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex for iter in {1..100} diff --git a/techlibs/ice40/tests/test_dsp_model.sh b/techlibs/ice40/tests/test_dsp_model.sh index 1e564d1b2..c79456f70 100644 --- a/techlibs/ice40/tests/test_dsp_model.sh +++ b/techlibs/ice40/tests/test_dsp_model.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex 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 diff --git a/techlibs/ice40/tests/test_ffs.sh b/techlibs/ice40/tests/test_ffs.sh index ff79ec534..438629c3e 100644 --- a/techlibs/ice40/tests/test_ffs.sh +++ b/techlibs/ice40/tests/test_ffs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex for CLKPOL in 0 1; do for ENABLE_EN in 0 1; do diff --git a/techlibs/xilinx/tests/bram1.sh b/techlibs/xilinx/tests/bram1.sh index 7451a1b3e..7e9936804 100644 --- a/techlibs/xilinx/tests/bram1.sh +++ b/techlibs/xilinx/tests/bram1.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/techlibs/xilinx/tests/bram2.sh b/techlibs/xilinx/tests/bram2.sh index 5d9c84dac..5c18d30e2 100644 --- a/techlibs/xilinx/tests/bram2.sh +++ b/techlibs/xilinx/tests/bram2.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex unisims=/opt/Xilinx/Vivado/2014.4/data/verilog/src/unisims diff --git a/techlibs/xilinx/tests/test_dsp48_model.sh b/techlibs/xilinx/tests/test_dsp48_model.sh index 9a73f9b0c..bd72572d5 100644 --- a/techlibs/xilinx/tests/test_dsp48_model.sh +++ b/techlibs/xilinx/tests/test_dsp48_model.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex if [ -z $ISE_DIR ]; then ISE_DIR=/opt/Xilinx/ISE/14.7 diff --git a/techlibs/xilinx/tests/test_dsp48a1_model.sh b/techlibs/xilinx/tests/test_dsp48a1_model.sh index a14a78e72..02ce2fef9 100644 --- a/techlibs/xilinx/tests/test_dsp48a1_model.sh +++ b/techlibs/xilinx/tests/test_dsp48a1_model.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex if [ -z $ISE_DIR ]; then ISE_DIR=/opt/Xilinx/ISE/14.7 diff --git a/techlibs/xilinx/tests/test_dsp_model.sh b/techlibs/xilinx/tests/test_dsp_model.sh index d005cd40c..b2a2bb445 100644 --- a/techlibs/xilinx/tests/test_dsp_model.sh +++ b/techlibs/xilinx/tests/test_dsp_model.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex if [ -z $VIVADO_DIR ]; then VIVADO_DIR=/opt/Xilinx/Vivado/2019.1 diff --git a/tests/aiger/run-test.sh b/tests/aiger/run-test.sh index bcf2b964a..ca7339ff0 100755 --- a/tests/aiger/run-test.sh +++ b/tests/aiger/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/tests/arch/run-test.sh b/tests/arch/run-test.sh index 5d923db56..a14b79509 100755 --- a/tests/arch/run-test.sh +++ b/tests/arch/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/tests/asicworld/run-test.sh b/tests/asicworld/run-test.sh index c22ab6928..5131ed646 100755 --- a/tests/asicworld/run-test.sh +++ b/tests/asicworld/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash OPTIND=1 seed="" # default to no seed specified diff --git a/tests/blif/run-test.sh b/tests/blif/run-test.sh index 44ce7e674..e9698386e 100755 --- a/tests/blif/run-test.sh +++ b/tests/blif/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e for x in *.ys; do echo "Running $x.." diff --git a/tests/bram/run-single.sh b/tests/bram/run-single.sh index 429a79e3c..358423f32 100644 --- a/tests/bram/run-single.sh +++ b/tests/bram/run-single.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e ../../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 diff --git a/tests/bram/run-test.sh b/tests/bram/run-test.sh index d6ba0de43..37fc91d0e 100755 --- a/tests/bram/run-test.sh +++ b/tests/bram/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # 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' diff --git a/tests/fmt/run-test.sh b/tests/fmt/run-test.sh index 914a72347..6c5becd5f 100644 --- a/tests/fmt/run-test.sh +++ b/tests/fmt/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/tests/fsm/run-test.sh b/tests/fsm/run-test.sh index fbdcbf048..dc60c69c4 100755 --- a/tests/fsm/run-test.sh +++ b/tests/fsm/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # run this test many times: # time bash -c 'for ((i=0; i<100; i++)); do echo "-- $i --"; bash run-test.sh || exit 1; done' diff --git a/tests/hana/run-test.sh b/tests/hana/run-test.sh index 878c80b3f..99be37f5e 100755 --- a/tests/hana/run-test.sh +++ b/tests/hana/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash OPTIND=1 seed="" # default to no seed specified diff --git a/tests/liberty/run-test.sh b/tests/liberty/run-test.sh index 61f19b09b..19ce0667d 100755 --- a/tests/liberty/run-test.sh +++ b/tests/liberty/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e for x in *.lib; do diff --git a/tests/lut/run-test.sh b/tests/lut/run-test.sh index f8964f146..a10559cac 100755 --- a/tests/lut/run-test.sh +++ b/tests/lut/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e for x in *.v; do echo "Running $x.." diff --git a/tests/memfile/run-test.sh b/tests/memfile/run-test.sh index e43ddd093..db0ec54ee 100755 --- a/tests/memfile/run-test.sh +++ b/tests/memfile/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/tests/memlib/run-test.sh b/tests/memlib/run-test.sh index abe88a6cb..5f230a03e 100755 --- a/tests/memlib/run-test.sh +++ b/tests/memlib/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -eu OPTIND=1 diff --git a/tests/memories/run-test.sh b/tests/memories/run-test.sh index c65066a9c..4f1da7ce7 100755 --- a/tests/memories/run-test.sh +++ b/tests/memories/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/tests/opt/run-test.sh b/tests/opt/run-test.sh index 2007cd6e4..74589dfeb 100755 --- a/tests/opt/run-test.sh +++ b/tests/opt/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -eu source ../gen-tests-makefile.sh run_tests --yosys-scripts diff --git a/tests/opt_share/run-test.sh b/tests/opt_share/run-test.sh index e0008a259..e80cd4214 100755 --- a/tests/opt_share/run-test.sh +++ b/tests/opt_share/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # run this test many times: # time bash -c 'for ((i=0; i<100; i++)); do echo "-- $i --"; bash run-test.sh || exit 1; done' diff --git a/tests/proc/run-test.sh b/tests/proc/run-test.sh index 44ce7e674..e9698386e 100755 --- a/tests/proc/run-test.sh +++ b/tests/proc/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e for x in *.ys; do echo "Running $x.." diff --git a/tests/realmath/run-test.sh b/tests/realmath/run-test.sh index e1a36c694..833e8c3f4 100755 --- a/tests/realmath/run-test.sh +++ b/tests/realmath/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e OPTIND=1 diff --git a/tests/rpc/run-test.sh b/tests/rpc/run-test.sh index eeb309347..624043750 100755 --- a/tests/rpc/run-test.sh +++ b/tests/rpc/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e for x in *.ys; do echo "Running $x.." diff --git a/tests/select/run-test.sh b/tests/select/run-test.sh index 44ce7e674..e9698386e 100755 --- a/tests/select/run-test.sh +++ b/tests/select/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e for x in *.ys; do echo "Running $x.." diff --git a/tests/share/run-test.sh b/tests/share/run-test.sh index 1bcd8e423..a7b5fc4a0 100755 --- a/tests/share/run-test.sh +++ b/tests/share/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # run this test many times: # time bash -c 'for ((i=0; i<100; i++)); do echo "-- $i --"; bash run-test.sh || exit 1; done' diff --git a/tests/simple/run-test.sh b/tests/simple/run-test.sh index 47bcfd6da..b9e79f34a 100755 --- a/tests/simple/run-test.sh +++ b/tests/simple/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash OPTIND=1 seed="" # default to no seed specified diff --git a/tests/simple_abc9/run-test.sh b/tests/simple_abc9/run-test.sh index 4a5bf01a3..b75e54dd3 100755 --- a/tests/simple_abc9/run-test.sh +++ b/tests/simple_abc9/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash OPTIND=1 seed="" # default to no seed specified diff --git a/tests/smv/run-single.sh b/tests/smv/run-single.sh index a261f4ea6..a0a6eba0a 100644 --- a/tests/smv/run-single.sh +++ b/tests/smv/run-single.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash cat > $1.tpl <&2; exit 1' ERR diff --git a/tests/various/logger_fail.sh b/tests/various/logger_fail.sh index 19b650007..c318b648d 100755 --- a/tests/various/logger_fail.sh +++ b/tests/various/logger_fail.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash fail() { echo "$1" >&2 diff --git a/tests/various/smtlib2_module.sh b/tests/various/smtlib2_module.sh index 491f65148..a2206eea7 100755 --- a/tests/various/smtlib2_module.sh +++ b/tests/various/smtlib2_module.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex ../../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 diff --git a/tests/various/sv_implicit_ports.sh b/tests/various/sv_implicit_ports.sh index 9a01447f7..5266fffe5 100755 --- a/tests/various/sv_implicit_ports.sh +++ b/tests/various/sv_implicit_ports.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash trap 'echo "ERROR in sv_implicit_ports.sh" >&2; exit 1' ERR diff --git a/tests/various/svalways.sh b/tests/various/svalways.sh index 2cc09f801..7765907c7 100755 --- a/tests/various/svalways.sh +++ b/tests/various/svalways.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash trap 'echo "ERROR in svalways.sh" >&2; exit 1' ERR diff --git a/tests/verilog/dynamic_range_lhs.sh b/tests/verilog/dynamic_range_lhs.sh index 618204aed..77b4a2918 100755 --- a/tests/verilog/dynamic_range_lhs.sh +++ b/tests/verilog/dynamic_range_lhs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash run() { alt=$1 diff --git a/tests/vloghtb/run-test.sh b/tests/vloghtb/run-test.sh index 3c0689619..29f7c2680 100755 --- a/tests/vloghtb/run-test.sh +++ b/tests/vloghtb/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/tests/vloghtb/test_febe.sh b/tests/vloghtb/test_febe.sh index 482d44d9a..af0fe1b98 100644 --- a/tests/vloghtb/test_febe.sh +++ b/tests/vloghtb/test_febe.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e source common.sh diff --git a/tests/vloghtb/test_mapopt.sh b/tests/vloghtb/test_mapopt.sh index 61528c2b4..c76e036a3 100644 --- a/tests/vloghtb/test_mapopt.sh +++ b/tests/vloghtb/test_mapopt.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e source common.sh diff --git a/tests/vloghtb/test_share.sh b/tests/vloghtb/test_share.sh index 67cfe44e8..87fac67fe 100644 --- a/tests/vloghtb/test_share.sh +++ b/tests/vloghtb/test_share.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e source common.sh diff --git a/tests/xprop/run-test.sh b/tests/xprop/run-test.sh index db4b7ca82..84b7c4ac4 100755 --- a/tests/xprop/run-test.sh +++ b/tests/xprop/run-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e python3 generate.py $@