[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.3-721-g5a6ffdc
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2015-04-29 09:46:33
|
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 5a6ffdc0f9027497cbf0da95476279b08809ba8d (commit)
via b41f98dfb207f7ff225fe964eb2041ca6e01676b (commit)
via 1d55df29d4b6b331f0dd969dceb8cbb9818eddf2 (commit)
via 7c1e7371a0ff451e7544aca404808c1b15e1a4a4 (commit)
via 00f01edb8f82f139750f225c8a59caf019b9cddd (commit)
from 3135c06538c7bf7475126a412c492d463f388cb6 (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 5a6ffdc0f9027497cbf0da95476279b08809ba8d
Author: Julien Boibessot <jul...@ar...>
Date: Wed Apr 29 11:45:55 2015 +0200
[TEST] Serial: it is a bad idea to use serial port 0 (console) on APF27 in test, so remove it from choices.
commit b41f98dfb207f7ff225fe964eb2041ca6e01676b
Author: Julien Boibessot <jul...@ar...>
Date: Wed Apr 29 11:44:06 2015 +0200
[TEST] GPIO: factorize led-gpios test and use it on APF27 as others will fail due to heartbeat.
commit 1d55df29d4b6b331f0dd969dceb8cbb9818eddf2
Author: Julien Boibessot <jul...@ar...>
Date: Wed Apr 29 11:40:36 2015 +0200
[TEST] Framebuffer: fixes test with new fb-test behaviour
commit 7c1e7371a0ff451e7544aca404808c1b15e1a4a4
Author: Julien Boibessot <jul...@ar...>
Date: Wed Apr 29 11:37:11 2015 +0200
[TEST] DAC: factorize some code in test script
commit 00f01edb8f82f139750f225c8a59caf019b9cddd
Author: Julien Boibessot <jul...@ar...>
Date: Wed Apr 29 11:36:03 2015 +0200
[TEST] Python: hide killall errors if python process was already killed
-----------------------------------------------------------------------
Summary of changes:
target/test/packages/test_python.sh | 2 +-
target/test/test_dac.sh | 35 ++++++++++++++++---------
target/test/test_framebuffer.sh | 21 ++++++++------
target/test/test_gpio.sh | 48 +++++++++++++++++++++++++++--------
target/test/test_rs232.sh | 16 ++++++------
5 files changed, 80 insertions(+), 42 deletions(-)
diff --git a/target/test/packages/test_python.sh b/target/test/packages/test_python.sh
index e30cbb5..66fff0d 100755
--- a/target/test/packages/test_python.sh
+++ b/target/test/packages/test_python.sh
@@ -31,7 +31,7 @@ EOF
test_cleanup()
{
rm -f "$PYTHON_FILE"
- killall $EXEC_NAME
+ killall $EXEC_NAME 2>/dev/null
}
test_python()
diff --git a/target/test/test_dac.sh b/target/test/test_dac.sh
index 10e71a3..bae2fcf 100755
--- a/target/test/test_dac.sh
+++ b/target/test/test_dac.sh
@@ -3,7 +3,7 @@
#
# Script to test Armadeus Software release
#
-# Copyright (C) 2008-2012 The Armadeus Project - Armadeus systems
+# Copyright (C) 2008-2015 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
@@ -16,21 +16,34 @@ source ./test_helpers.sh
check_platform()
{
- if [ "$1" == "APF28" ]; then
+ if [ "$1" == "APF28" ] || [ "$1" == "APF6" ]; then
echo "Platform not supported by this test"
exit 0
fi
}
+apf9328_27_setdac()
+{
+ echo "Setting $1 channels to $2"
+ setDAC $1 $2
+}
+
+apf51_setdac()
+{
+ echo "Setting 0 & 1 channels to $1"
+ echo $1 > out0_raw
+ echo $1 > out1_raw
+}
+
do_test()
{
if [ "$1" == "APF9328" ] || [ "$1" == "APF27" ]; then
- setDAC AB 500
+ apf9328_27_setdac AB 500
if [ "$?" == 0 ]; then
sleep 2
- setDAC AB 250
+ apf9328_27_setdac AB 250
sleep 2
- setDAC AB 0
+ apf9328_27_setdac AB 0
echo_test_ok
else
echo "Hardware not found !"
@@ -39,17 +52,13 @@ do_test()
modprobe mcp49x2
cd /sys/bus/spi/devices/spi0.1/device0
ls
- echo 250 > out0_raw
- echo 250 > out1_raw
+ apf51_setdac 250
sleep 2
- echo 500 > out0_raw
- echo 500 > out1_raw
+ apf51_setdac 500
sleep 2
- echo 250 > out0_raw
- echo 250 > out1_raw
+ apf51_setdac 250
sleep 2
- echo 0 > out0_raw
- echo 0 > out1_raw
+ apf51_setdac 0
echo_test_ok
fi
}
diff --git a/target/test/test_framebuffer.sh b/target/test/test_framebuffer.sh
index 3ac5041..9c96804 100755
--- a/target/test/test_framebuffer.sh
+++ b/target/test/test_framebuffer.sh
@@ -3,7 +3,7 @@
#
# Script to test Armadeus Software release
#
-# Copyright (C) 2008 The Armadeus Project
+# Copyright (C) 2008-2015 The Armadeus Project
#
# 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
@@ -25,24 +25,27 @@ test_framebuffer()
is_package_installed $EXEC_NAME
$EXEC_NAME 0 fb-test-perf.log
- RES=$?
-
- if [ "$RES" == 0 ]; then
- EXEC_NAME="fb-test"
- is_package_installed $EXEC_NAME
- $EXEC_NAME
- RES=$?
+ if [ "$?" != 0 ]; then
+ exit_failed
fi
+ EXEC_NAME="fb-test"
+ is_package_installed $EXEC_NAME
+ $EXEC_NAME &
+ PID=$!
+ sleep 1
+
# Reactivate cursor
echo 1 > /sys/class/graphics/fbcon/cursor_blink
# Ask user for feedbacks
- if [ "$RES" == 0 ]; then
+ if [ "$PID" != "" ]; then
ask_user "Did all the tests show fine ? (y/N)"
if [ "$response" == "y" ] || [ "$response" == "yes" ]; then
echo_test_ok
+ kill $PID
exit 0
fi
+ kill $PID
fi
exit_failed
}
diff --git a/target/test/test_gpio.sh b/target/test/test_gpio.sh
index 567d9ef..d37d76e 100755
--- a/target/test/test_gpio.sh
+++ b/target/test/test_gpio.sh
@@ -51,6 +51,11 @@ blink_led_gpiolib()
LED="$1"
echo $LED > /sys/class/gpio/export
ls /sys/class/gpio/gpio$LED/
+ if [ "$?" != 0 ]; then
+ echo "Failed to export GPIO $LED"
+ return
+ fi
+
echo out > /sys/class/gpio/gpio$LED/direction
for i in `seq 0 5`; do
echo 1 > /sys/class/gpio/gpio$LED/value
@@ -61,6 +66,31 @@ blink_led_gpiolib()
echo $LED > /sys/class/gpio/unexport
}
+blink_led_gpioled()
+{
+ if [ "$1" == "" ]; then
+ echo "Please give a correct LED name"
+ return
+ fi
+
+ MAX_BRIGHT=`cat /sys/class/leds/"$1"/max_brightness 2>/dev/null`
+ if [ "$MAX_BRIGHT" == "" ]; then
+ MAX_BRIGHT=255
+ fi
+ if [ -f /sys/class/leds/"$1"/gpio ]; then
+ echo gpio > /sys/class/leds/"$1"/trigger
+ echo 1 > /sys/class/leds/"$1"/gpio
+ fi
+ for i in `seq 0 5`; do
+ echo -n .
+ echo 0 > /sys/class/leds/"$1"/brightness
+ usleep 500000
+ echo -n .
+ echo $MAX_BRIGHT > /sys/class/leds/"$1"/brightness
+ usleep 500000
+ done
+}
+
blink_led()
{
if [ "$1" == "APF9328" ]; then
@@ -74,7 +104,7 @@ blink_led()
done
elif [ "$1" == "APF27" ]; then
LED_NAME="D14"
- echo "oO- Old way to do it (custom GPIO driver)... -Oo"
+ echo -e "\n _oO- Old way to do it (custom GPIO driver)... -Oo_"
gpio_mode PF14 1
for i in `seq 0 5`; do
gpio_set_value_old PF14 0
@@ -82,21 +112,18 @@ blink_led()
gpio_set_value_old PF14 1
usleep 500000
done
- echo "oO- New way to do it (gpiolib)... -Oo"
+
+ echo -e "\n _oO- New way to do it (gpiolib)... -Oo_"
# PF14 -> GPIO 174 (5x32 + 14)
blink_led_gpiolib 174
+
+ echo -e "\n _oO- New way to do it (led-gpios)... -Oo_"
+ blink_led_gpioled apfdev\:green\:user
elif [ "$1" == "APF51" ]; then
LED_NAME="i.MX"
blink_led_gpiolib 2
elif [ "$1" == "APF28" ]; then
- echo gpio > /sys/class/leds/apfdev\:green\:user/trigger
- echo 1 > /sys/class/leds/apfdev\:green\:user/gpio
- for i in `seq 0 5`; do
- echo 0 > /sys/class/leds/apfdev\:green\:user/brightness
- usleep 500000
- cat /sys/class/leds/apfdev\:green\:user/max_brightness > /sys/class/leds/apfdev\:green\:user/brightness
- usleep 500000
- done
+ blink_led_gpioled apfdev\:green\:user
else
echo "Platform not supported by this test"
fi
@@ -119,7 +146,6 @@ check_button()
else
echo "Platform not supported by this test"
fi
-
}
test_led_gpio()
diff --git a/target/test/test_rs232.sh b/target/test/test_rs232.sh
index 355feef..6e93889 100755
--- a/target/test/test_rs232.sh
+++ b/target/test/test_rs232.sh
@@ -86,23 +86,23 @@ configure_ports_devices()
LINUX_VERSION=`uname -r | cut -d . -f 1-3`
if [ "$1" == "APF9328" ]; then
if [ "$LINUX_VERSION" == "2.6.29" ]; then
- SERIAL_DEVICES="/dev/ttySMX"
+ SERIAL_DEVICES="/dev/ttySMX*"
else
- SERIAL_DEVICES="/dev/ttymxc"
+ SERIAL_DEVICES="/dev/ttymxc*"
fi
elif [ "$1" == "APF27" ]; then
if [ "$LINUX_VERSION" == "2.6.29" ]; then
- SERIAL_DEVICES="/dev/ttySMX"
+ SERIAL_DEVICES="/dev/ttySMX2"
else
- SERIAL_DEVICES="/dev/ttymxc"
+ SERIAL_DEVICES="/dev/ttymxc2"
fi
elif [ "$1" == "APF51" ]; then
- SERIAL_DEVICES="/dev/ttymxc"
+ SERIAL_DEVICES="/dev/ttymxc*"
elif [ "$1" == "APF28" ]; then
if [ "$LINUX_VERSION" == "2.6.35" ]; then
- SERIAL_DEVICES="/dev/ttySP"
+ SERIAL_DEVICES="/dev/ttySP*"
else
- SERIAL_DEVICES="/dev/ttyAPP"
+ SERIAL_DEVICES="/dev/ttyAPP*"
fi
else
echo "$1 platform not supported by this test"
@@ -119,7 +119,7 @@ HELP="NO"
if [ "$1" == "" ]; then
HELP="YES"
echo "Please give the port number to test !"
- PORTS=`ls $SERIAL_DEVICES*`
+ PORTS=`ls $SERIAL_DEVICES`
echo -n " Available one: [ "
for port in $PORTS; do
port_num=`echo $port | awk '{print substr($0,length($0))}'`
hooks/post-receive
--
armadeus
|