Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up tests #682

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 18 additions & 28 deletions test/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,51 +51,44 @@ SAILLIBDIR="$DIR/../../lib/"

cd $RISCVDIR

# Do 'make clean' to avoid cross-arch pollution.
make clean

printf "Building 32-bit RISCV specification...\n"

if ARCH=RV32 make c_emulator/riscv_sim_RV32;
then
green "Building 32-bit RISCV C emulator" "ok"

for test in $DIR/riscv-tests/rv32*.elf; do
if timeout 5 $RISCVDIR/c_emulator/riscv_sim_RV32 -p $test > ${test%.elf}.cout 2>&1 && grep -q SUCCESS ${test%.elf}.cout
then
green "C-32 $(basename $test)" "ok"
else
red "C-32 $(basename $test)" "fail"
fi
done
else
red "Building 32-bit RISCV C emulator" "fail"
fi
for test in $DIR/riscv-tests/rv32*.elf; do
if timeout 5 $RISCVDIR/c_emulator/riscv_sim_RV32 -p $test > ${test%.elf}.cout 2>&1 && grep -q SUCCESS ${test%.elf}.cout
then
green "C-32 $(basename $test)" "ok"
else
red "C-32 $(basename $test)" "fail"
fi
done
finish_suite "32-bit RISCV C tests"

# Do 'make clean' to avoid cross-arch pollution.
make clean

printf "Building 64-bit RISCV specification...\n"

if make c_emulator/riscv_sim_RV64;
then
green "Building 64-bit RISCV C emulator" "ok"

for test in $DIR/riscv-tests/rv64*.elf; do
if timeout 5 $RISCVDIR/c_emulator/riscv_sim_RV64 -p $test > ${test%.elf}.cout 2>&1 && grep -q SUCCESS ${test%.elf}.cout
then
green "C-64 $(basename $test)" "ok"
else
red "C-64 $(basename $test)" "fail"
fi
done
else
red "Building 64-bit RISCV C emulator" "fail"
fi
for test in $DIR/riscv-tests/rv64*.elf; do
if timeout 5 $RISCVDIR/c_emulator/riscv_sim_RV64 -p $test > ${test%.elf}.cout 2>&1 && grep -q SUCCESS ${test%.elf}.cout
then
green "C-64 $(basename $test)" "ok"
else
red "C-64 $(basename $test)" "fail"
fi
done
finish_suite "64-bit RISCV C tests"

# Do 'make clean' to avoid cross-arch pollution.
make clean

if ARCH=RV32 make c_emulator/riscv_rvfi_RV32;
then
green "Building 32-bit RISCV RVFI C emulator" "ok"
Expand All @@ -104,9 +97,6 @@ else
fi
finish_suite "32-bit RISCV RVFI C tests"

# Do 'make clean' to avoid cross-arch pollution.
make clean

if ARCH=RV64 make c_emulator/riscv_rvfi_RV64;
then
green "Building 64-bit RISCV RVFI C emulator" "ok"
Expand Down