URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 511 |
Rev 840 |
Line 5... |
Line 5... |
echo -n "Testing $2... "
|
echo -n "Testing $2... "
|
|
|
# clean . and / characters
|
# clean . and / characters
|
fn=`echo $2 | sed 's/[\/\.]//g'`
|
fn=`echo $2 | sed 's/[\/\.]//g'`
|
default_cfg_fn="default.cfg"
|
default_cfg_fn="default.cfg"
|
|
pre_sh_file="$2.pre.sh"
|
|
post_sh_file="$2.post.sh"
|
temp1="/tmp/${fn}_output_ok"
|
temp1="/tmp/${fn}_output_ok"
|
temp2="/tmp/${fn}_output"
|
temp2="/tmp/${fn}_output"
|
temp3="/tmp/${fn}_output_tail"
|
temp3="/tmp/${fn}_output_tail"
|
temp4="/tmp/${fn}_error"
|
temp4="/tmp/${fn}_error"
|
|
|
|
# run pre-execution script file
|
|
test -f $pre_sh_file
|
|
if test $? -eq 0; then
|
|
echo -n "(pre-exec $pre_sh_file) "
|
|
source $pre_sh_file
|
|
fi
|
|
|
# prepare simulator parameters
|
# prepare simulator parameters
|
sim_param=
|
sim_param=
|
cfg_file="$2.cfg"
|
cfg_file="$2.cfg"
|
test -f $cfg_file
|
test -f $cfg_file
|
if test $? -eq 0; then
|
if test $? -eq 0; then
|
Line 49... |
Line 58... |
else
|
else
|
echo "Cannot run: '$1 $2 $sim_param 2>$temp4 >$temp2'"
|
echo "Cannot run: '$1 $2 $sim_param 2>$temp4 >$temp2'"
|
cat $temp4;
|
cat $temp4;
|
fi
|
fi
|
|
|
|
# run post-execution script file
|
|
test -f $post_sh_file
|
|
if test $? -eq 0; then
|
|
echo "(post-exec $post_sh_file)"
|
|
source $post_sh_file
|
|
fi
|
|
|
# cleanup
|
# cleanup
|
rm $temp1
|
rm $temp1
|
rm $temp3
|
rm $temp3
|
|
|
# exit the test
|
# exit the test
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.