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

Subversion Repositories amber

[/] [amber/] [trunk/] [hw/] [tools/] [set_timeout.sh] - Blame information for rev 82

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

Line No. Rev Author Line
1 15 csantifort
#!/bin/sh -f
2
 
3
#--------------------------------------------------------------#
4
#                                                              #
5
#  set_timeout.sh                                              #
6
#                                                              #
7
#  This file is part of the Amber project                      #
8
#  http://www.opencores.org/project,amber                      #
9
#                                                              #
10
#  Description                                                 #
11
#  Set a timeout value for a test in the file                  #
12
#    ../tests/timeouts.txt                                     #
13
#                                                              #
14
#  Author(s):                                                  #
15
#      - Conor Santifort, csantifort.amber@gmail.com           #
16
#                                                              #
17
#//////////////////////////////////////////////////////////////#
18
#                                                              #
19
# Copyright (C) 2010 Authors and OPENCORES.ORG                 #
20
#                                                              #
21
# This source file may be used and distributed without         #
22
# restriction provided that this copyright statement is not    #
23
# removed from the file and that any derivative work contains  #
24
# the original copyright notice and the associated disclaimer. #
25
#                                                              #
26
# This source file is free software; you can redistribute it   #
27
# and/or modify it under the terms of the GNU Lesser General   #
28
# Public License as published by the Free Software Foundation; #
29
# either version 2.1 of the License, or (at your option) any   #
30
# later version.                                               #
31
#                                                              #
32
# This source is distributed in the hope that it will be       #
33
# useful, but WITHOUT ANY WARRANTY; without even the implied   #
34
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      #
35
# PURPOSE.  See the GNU Lesser General Public License for more #
36
# details.                                                     #
37
#                                                              #
38
# You should have received a copy of the GNU Lesser General    #
39
# Public License along with this source; if not, download it   #
40
# from http://www.opencores.org/lgpl.shtml                     #
41
#                                                              #
42
#--------------------------------------------------------------#
43
 
44
TOFILE=../tests/timeouts.txt
45
TEST=$1
46
TICKS=$2
47
 
48
# is test already in list ?
49 56 csantifort
if [ -e $TOFILE ]; then
50
    egrep "^${TEST} " $TOFILE > /dev/null
51
    TEST_LISTED=$?
52 15 csantifort
 
53 56 csantifort
    # If the test is already in the list
54
    if [ $TEST_LISTED == 0 ]; then
55
        egrep -v "^${TEST} " $TOFILE > ${TOFILE}1
56
        mv ${TOFILE}1 $TOFILE
57
    fi
58
else
59
    echo "Creating $TOFILE"
60 15 csantifort
fi
61
echo "${TEST} ${TICKS}" >> ${TOFILE}
62
 

powered by: WebSVN 2.1.0

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