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

Subversion Repositories or1k

[/] [or1k/] [tags/] [stable_0_2_0_rc3/] [or1ksim/] [testbench/] [test] - Blame information for rev 308

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

Line No. Rev Author Line
1 308 markom
#! /bin/sh
2
#
3
# Usage:
4
# test simulator_binary file_to_test
5
echo -n "Testing $2... "
6
 
7
temp1="/tmp/$2_output_ok"
8
temp2="/tmp/$2_output"
9
temp3="/tmp/$2_output_tail"
10
temp4="/tmp/$2_error"
11
 
12
# Last two lines should look like:
13
echo "MTSPR(0x1234, deaddead);" >$temp1
14
echo "syscall exit(0)" >>$temp1
15
 
16
# run the simulator
17
$1 $2 2>$temp4 >$temp2
18
simerr=$?
19
tail $temp2 -n 2 >$temp3
20
if cmp -s $temp1 $temp3; then
21
  echo "OK";
22
  rm $temp2
23
  rm $temp4
24
else
25
  echo -e "FAILED\nSee: output '$temp2', error '$temp4'";
26
fi
27
 
28
# cleanup
29
rm $temp1
30
rm $temp3
31
 
32
# exit the test
33
exit $simerr

powered by: WebSVN 2.1.0

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