mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	tests: use /usr/bin/env for bash.
This commit is contained in:
		
							parent
							
								
									860e3e4056
								
							
						
					
					
						commit
						d130f7fca2
					
				
					 56 changed files with 56 additions and 56 deletions
				
			
		|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| set -ex | set -ex | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| set -ex | set -ex | ||||||
| 
 | 
 | ||||||
| cd ../../ | cd ../../ | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| set -ex | set -ex | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| set -ex | set -ex | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| bad= | bad= | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| set -ex | set -ex | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| set -ex | set -ex | ||||||
| 
 | 
 | ||||||
| for iter in {1..100} | for iter in {1..100} | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| set -e | set -e | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| set -e | set -e | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| set -e | set -e | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
|  |  | ||||||
|  | @ -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.." | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
|  |  | ||||||
|  | @ -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' | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| set -ex | set -ex | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -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' | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| set -e | set -e | ||||||
| 
 | 
 | ||||||
| for x in *.lib; do | for x in *.lib; do | ||||||
|  |  | ||||||
|  | @ -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.." | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| set -e | set -e | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| set -eu | set -eu | ||||||
| 
 | 
 | ||||||
| OPTIND=1 | OPTIND=1 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| set -e | set -e | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
|  |  | ||||||
|  | @ -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' | ||||||
|  |  | ||||||
|  | @ -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.." | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| set -e | set -e | ||||||
| 
 | 
 | ||||||
| OPTIND=1 | OPTIND=1 | ||||||
|  |  | ||||||
|  | @ -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.." | ||||||
|  |  | ||||||
|  | @ -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.." | ||||||
|  |  | ||||||
|  | @ -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' | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| cat > $1.tpl <<EOT | cat > $1.tpl <<EOT | ||||||
| %module main | %module main | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| set -ex | set -ex | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| set -ex | set -ex | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| TESTNAME=$1 | TESTNAME=$1 | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| fail() { | fail() { | ||||||
| 	echo "$1" >&2 | 	echo "$1" >&2 | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| run() { | run() { | ||||||
|     alt=$1 |     alt=$1 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| set -ex | set -ex | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| set -e | set -e | ||||||
| source common.sh | source common.sh | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| set -e | set -e | ||||||
| source common.sh | source common.sh | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| set -e | set -e | ||||||
| source common.sh | source common.sh | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/bash | #!/usr/bin/env bash | ||||||
| set -e | set -e | ||||||
| 
 | 
 | ||||||
| python3 generate.py $@ | python3 generate.py $@ | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue