Skip to content

Commit

Permalink
Update run-test.sh.in
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelJSr committed Nov 25, 2024
1 parent 33074aa commit 023148a
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions tests/riscv/riscv-vector-tests/run-test.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ XLEN=${XLEN:-32}

RISCV_TOOLCHAIN_PATH=${RISCV_TOOLCHAIN_PATH:-$TOOLDIR"/riscv"$XLEN"-gnu-toolchain"}

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
RESTORE_PREV_DIR=$(pwd)

REPOSITORY=https://github.com/MichaelJSr/testcases/raw/main
VECTOR_TESTS_BASE_NAME=vector-tests.tar.bz2

vector_tests()
{
parts=$(eval echo {a..l})
for x in $parts
do
wget $REPOSITORY/$VECTOR_TESTS_BASE_NAME.parta$x
done
cat $VECTOR_TESTS_BASE_NAME.part* > $VECTOR_TESTS_BASE_NAME
tar -xvf $VECTOR_TESTS_BASE_NAME
rm -f $VECTOR_TESTS_BASE_NAME*
}

# get selected testcases from command line or run default testcases
if [ "$#" == "0" ];
then
Expand Down Expand Up @@ -44,10 +62,9 @@ else
testcases="${@}"
fi

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
RESTORE_PREV_DIR=$(pwd)
if [ ! -d "$SCRIPT_DIR/testcases" ]; then
mkdir -p "$SCRIPT_DIR/testcases/v$VLEN"x"$XLEN"
# Fallback #3: Download testcases
vector_tests
fi
cd $SCRIPT_DIR/testcases/v$VLEN"x"$XLEN

Expand Down

0 comments on commit 023148a

Please sign in to comment.