OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [rel-0-3-0-rc2/] [or1ksim/] [testbench/] [test] - Rev 308

Go to most recent revision | Compare with Previous | Blame | View Log

#! /bin/sh
#
# Usage:
# test simulator_binary file_to_test
echo -n "Testing $2... "

temp1="/tmp/$2_output_ok"
temp2="/tmp/$2_output"
temp3="/tmp/$2_output_tail"
temp4="/tmp/$2_error"

# Last two lines should look like:
echo "MTSPR(0x1234, deaddead);" >$temp1
echo "syscall exit(0)" >>$temp1

# run the simulator
$1 $2 2>$temp4 >$temp2
simerr=$?
tail $temp2 -n 2 >$temp3
if cmp -s $temp1 $temp3; then
  echo "OK";
  rm $temp2
  rm $temp4
else
  echo -e "FAILED\nSee: output '$temp2', error '$temp4'";
fi

# cleanup
rm $temp1
rm $temp3

# exit the test
exit $simerr

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.