[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.2-136-g64ca041
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2013-01-27 22:21:50
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 64ca04193068d944f35ae2b1f55a2245fbbb8f0c (commit)
from dba083e544a2699bb0a71978ddf6f40f743c97f5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 64ca04193068d944f35ae2b1f55a2245fbbb8f0c
Author: Julien Boibessot <jul...@ar...>
Date: Sun Jan 27 23:21:01 2013 +0100
[TEST] Makes RS232 test a little more generic
-----------------------------------------------------------------------
Summary of changes:
target/test/test_rs232.sh | 39 ++++++++++++++++++++++++++++-----------
1 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/target/test/test_rs232.sh b/target/test/test_rs232.sh
index 4a83cfd..db22eae 100755
--- a/target/test/test_rs232.sh
+++ b/target/test/test_rs232.sh
@@ -3,7 +3,7 @@
#
# Script to test Armadeus Software release
#
-# Copyright (C) 2008-2011 The Armadeus Project - ARMadeus Systems
+# Copyright (C) 2008-2013 The Armadeus Project - Armadeus Systems
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,6 +17,9 @@ source ./test_env.sh
echo_jumper_help()
{
+ if [ "$HELP" == "NO" ]; then
+ return
+ fi
if [ "$1" == "APF9328" ]; then
echo " (Pin 1 & 3 of UART connector)"
elif [ "$1" == "APF27" ]; then
@@ -66,19 +69,24 @@ test_serial_port()
fi
}
-echo_available_ports()
+configure_ports_devices()
{
+ LINUX_VERSION=`uname -r`
if [ "$1" == "APF9328" ]; then
- echo " Available one: [ 1 ]"
- SERIAL_DEVICES="/dev/ttySMX"
+ if [ "$LINUX_VERSION" == "2.6.29.6" ]; then
+ SERIAL_DEVICES="/dev/ttySMX"
+ else
+ SERIAL_DEVICES="/dev/ttymxc"
+ fi
elif [ "$1" == "APF27" ]; then
- echo " Available one: [ 2 ]"
- SERIAL_DEVICES="/dev/ttySMX"
+ if [ "$LINUX_VERSION" == "2.6.29.6" ]; then
+ SERIAL_DEVICES="/dev/ttySMX"
+ else
+ SERIAL_DEVICES="/dev/ttymxc"
+ fi
elif [ "$1" == "APF51" ]; then
- echo " Available one: [ 0 ]"
SERIAL_DEVICES="/dev/ttymxc"
elif [ "$1" == "APF28" ]; then
- echo " Available one: [ 0 1 2 3 4 ]"
SERIAL_DEVICES="/dev/ttySP"
else
echo "$1 platform not supported by this test"
@@ -86,11 +94,22 @@ echo_available_ports()
fi
}
+
show_test_banner "Serial ports"
PORTS="$1"
+execute_for_target configure_ports_devices
+HELP="NO"
+# No parameter given -> script in manual/help mode
if [ "$1" == "" ]; then
+ HELP="YES"
echo "Please give the port number to test !"
- execute_for_target echo_available_ports
+ PORTS=`ls $SERIAL_DEVICES*`
+ echo -n " Available one: [ "
+ for port in $PORTS; do
+ port_num=`echo $port | awk '{print substr($0,length($0))}'`
+ echo -n "$port_num "
+ done
+ echo "]"
read -p "> " PORTS
[ "$PORTS" == "" ] && exit_failed
fi
@@ -98,5 +117,3 @@ fi
for PORT in $PORTS; do
test_serial_port $PORT
done
-
-
hooks/post-receive
--
armadeus
|