File tree Expand file tree Collapse file tree
tests/riscv/riscv-vector-tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33XLEN=${XLEN:- " @XLEN@" }
44TOOLDIR=${TOOLDIR:- " @TOOLDIR@" }
5+ RISCV_TOOLCHAIN_PATH64=${RISCV_TOOLCHAIN_PATH:- " $TOOLDIR /riscv64-gnu-toolchain" }
56RISCV_TOOLCHAIN_PATH=${RISCV_TOOLCHAIN_PATH:- " $TOOLDIR /riscv$XLEN -gnu-toolchain" }
67SCRIPT_DIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd )
78PREV_DIR=$( pwd)
@@ -10,7 +11,10 @@ sudo apt-get install device-tree-compiler
1011wget -O- -q https://go.dev/dl/go1.24.0.linux-amd64.tar.gz | tar -xzf -
1112
1213export RISCV=$RISCV_TOOLCHAIN_PATH
13- export PATH=$PATH :$PREV_DIR /go/bin:$RISCV /bin
14+ export PATH=$PATH :$PREV_DIR /go/bin
15+ if [ " $XLEN " -ne 64 ]; then
16+ export PATH=$PATH :RISCV_TOOLCHAIN_PATH64/bin
17+ fi
1418
1519git clone --recursive https://github.com/chipsalliance/riscv-vector-tests.git
1620cd riscv-vector-tests
Original file line number Diff line number Diff line change @@ -83,22 +83,22 @@ for testcase in ${testcases[@]}; do
8383 rm -f " $testcase *.bin" " $testcase *.dump" " $testcase *.log" > /dev/null 2>&1
8484done
8585
86- export passed=0
87- export failed=0
86+ passed=0
87+ failed=0
8888
8989for testcase in ${testcases[@]} ; do
9090 echo " Testcase: $testcase "
9191 find . -type f -name " ${testcase} *" 2> /dev/null | while read -r f; do
9292 " $RISCV_TOOLCHAIN_PATH /bin/riscv$XLEN -unknown-elf-objdump" -D " $f " > " $f .dump"
9393 " $RISCV_TOOLCHAIN_PATH /bin/riscv$XLEN -unknown-elf-objcopy" -O binary " $f " " $f .bin"
9494 echo " running $SCRIPT_DIR /../../../sim/simx/simx -v $f .bin"
95- " $SCRIPT_DIR /../../../sim/simx/simx" -v " $f .bin" > " $f .log"
95+ " $SCRIPT_DIR /../../../sim/simx/simx" -v " $f .bin" & > " $f .log"
9696 if [ $? -eq 1 ]; then
9797 echo " $f PASSED"
98- export passed= $ (( passed+ 1 ))
98+ (( passed++ ))
9999 else
100100 echo " $f FAILED"
101- export failed= $ (( failed+ 1 ))
101+ (( failed++ ))
102102 fi
103103 # REG_TESTS=1 informs the script to delete the previous binary after each vector test to save disk space
104104 # Otherwise, the vector regression tests would run out of disk space eventually
You can’t perform that action at this time.
0 commit comments