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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [net/] [autotest/] [current/] [host/] [sendack.sh] - Blame information for rev 868

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

Line No. Rev Author Line
1 786 skrzyp
#!/bin/sh
2
 
3
if [ $# -gt 2 ] || [ $# -lt 1 ]; then
4
    echo "Usage: $0 [XFAIL] target-IP [port]" > /dev/stderr
5
    exit 1
6
fi
7
 
8
[ "xXFAIL" == "x$1" ] && { XFAIL="XFAIL"; shift; }
9
 
10
TARGET=$1; shift
11
 
12
PORT=9990; [ "x" != "x$1" ] && { PORT=$1; shift; }
13
 
14
while [ true ]; do
15
 
16
    read -a RESULT || { exit 0; }
17
 
18
    echo "$TARGET: result ${RESULT[@]}"
19
 
20
    # I really want it to try quite hard to get the message through
21
    # (but not too hard if XFAIL)
22
    echo "${RESULT[@]} ($TARGET)" > /dev/tcp/$TARGET/$PORT || \
23
    echo "${RESULT[@]} ($TARGET)" > /dev/tcp/$TARGET/$PORT || \
24
    { sleep 1 && { \
25
    echo "${RESULT[@]} ($TARGET)" > /dev/tcp/$TARGET/$PORT || \
26
    echo "${RESULT[@]} ($TARGET)" > /dev/tcp/$TARGET/$PORT || \
27
    { sleep 3 && { \
28
    echo "${RESULT[@]} ($TARGET)" > /dev/tcp/$TARGET/$PORT || \
29
    echo "${RESULT[@]} ($TARGET)" > /dev/tcp/$TARGET/$PORT || \
30
    { [ "x$XFAIL" != "xXFAIL" ] && sleep 5 && { \
31
    echo "${RESULT[@]} ($TARGET)" > /dev/tcp/$TARGET/$PORT || \
32
    echo "${RESULT[@]} ($TARGET)" > /dev/tcp/$TARGET/$PORT || \
33
    { sleep 10 && { \
34
    echo "${RESULT[@]} ($TARGET)" > /dev/tcp/$TARGET/$PORT || \
35
    echo "${RESULT[@]} ($TARGET)" > /dev/tcp/$TARGET/$PORT || \
36
    echo "***FAILED TO SEND RESULT TO $TARGET: result ${RESULT[@]}" \
37
    ;};};};};};};};}
38
    # brute force seems as good as any means...
39
 
40
done
41
 
42
# EOF

powered by: WebSVN 2.1.0

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