[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.3-786-g31615b3
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2015-07-13 14:26:24
|
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 31615b3651523443c4219cdbd2b2da44e6573b2d (commit)
from d130c6137f78d6f5286d04ae41e615ffc1dc6e25 (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 31615b3651523443c4219cdbd2b2da44e6573b2d
Author: Julien Boibessot <jul...@ar...>
Date: Mon Jul 13 16:25:37 2015 +0200
[TESTS] Update some release tests for APF28 mainline kernel
-----------------------------------------------------------------------
Summary of changes:
target/test/test_adc.sh | 15 ++++++++++-----
target/test/test_backlight.sh | 27 +++++++++++++++++++--------
target/test/test_gpio.sh | 8 ++++++--
target/test/test_helpers.sh | 5 ++++-
target/test/test_pwm.sh | 11 ++++++++---
target/test/test_touchscreen.sh | 11 ++++++++---
6 files changed, 55 insertions(+), 22 deletions(-)
diff --git a/target/test/test_adc.sh b/target/test/test_adc.sh
index 9233af6..50b216a 100755
--- a/target/test/test_adc.sh
+++ b/target/test/test_adc.sh
@@ -3,7 +3,7 @@
#
# Script to test Armadeus Software release
#
-# Copyright (C) 2008-2011 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
@@ -79,12 +79,17 @@ test_running_as1531()
test_running_lradc()
{
- VALUE=`cat /sys/class/hwmon/hwmon0/device/in0_input`
- if [ "$VALUE" -gt 15 ]; then
+ if [ "$LINUX_VERSION" == "2.6.35" ]; then
+ VALUE0=`cat /sys/class/hwmon/hwmon0/device/in0_input`
+ VALUE1=`cat /sys/class/hwmon/hwmon0/device/in1_input`
+ else
+ VALUE0=`cat /sys/bus/iio/devices/iio\:device0/in_voltage0_raw`
+ VALUE1=`cat /sys/bus/iio/devices/iio\:device0/in_voltage1_raw`
+ fi
+ if [ "$VALUE0" -gt 15 ]; then
exit_failed
fi
- VALUE=`cat /sys/class/hwmon/hwmon0/device/in1_input`
- if [ "$VALUE" -lt 16 ]; then
+ if [ "$VALUE1" -lt 16 ]; then
exit_failed
fi
return 0
diff --git a/target/test/test_backlight.sh b/target/test/test_backlight.sh
index a94c856..0788868 100755
--- a/target/test/test_backlight.sh
+++ b/target/test/test_backlight.sh
@@ -3,7 +3,7 @@
#
# Script to test Armadeus Software release
#
-# Copyright (C) 2008-2013 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
@@ -14,12 +14,15 @@
source ./test_helpers.sh
SYS_DIR=/sys/class/backlight/imx-bl
+min_bright=0
+mid_bright=50
+LOOP=`seq 1 5 150`
+LOOP_DELAY=100000
load_driver()
{
- LINUX_VERSION=`uname -r`
if [ "$1" == "APF9328" ] || [ "$1" == "APF27" ]; then
- if [ "$LINUX_VERSION" == "2.6.29.6" ]; then
+ if [ "$LINUX_VERSION" == "2.6.29" ]; then
modprobe imx_bl
else
SYS_DIR=/sys/class/backlight/imxfb-bl
@@ -28,7 +31,15 @@ load_driver()
echo "Not supported yet"
exit 0
elif [ "$1" == "APF28" ]; then
- SYS_DIR=/sys/class/backlight/mxs-bl
+ if [ "$LINUX_VERSION" == "2.6.35" ]; then
+ SYS_DIR=/sys/class/backlight/mxs-bl
+ else
+ SYS_DIR=/sys/class/backlight/backlight
+ min_bright=1
+ mid_bright=4
+ LOOP=`seq 1 1 8`
+ LOOP_DELAY=500000
+ fi
else
echo "Platform not supported by this test"
exit 0
@@ -56,18 +67,18 @@ test_backlight()
max_bright=`cat $SYS_DIR/max_brightness`
echo "Current brightness level: $current / $max_bright"
- echo 50 > $SYS_DIR/brightness
+ echo $mid_bright > $SYS_DIR/brightness
ask_user "Backlight set to MIDDLE, press ENTER"
echo $max_bright > $SYS_DIR/brightness
ask_user "Backlight set to MAX, press ENTER"
- echo 0 > $SYS_DIR/brightness
+ echo $min_bright > $SYS_DIR/brightness
ask_user "Backlight set to MIN, press ENTER"
echo $current > $SYS_DIR/brightness
ask_user "I will now loop through brightness, press ENTER when ready"
- for loop in `seq 1 2 150`; do
+ for loop in $LOOP; do
if [ "$loop" -lt "$max_bright" ]; then
- usleep 100000
+ usleep $LOOP_DELAY
echo $loop > $SYS_DIR/brightness
echo -n "."
fi
diff --git a/target/test/test_gpio.sh b/target/test/test_gpio.sh
index 448be7c..172d4dd 100755
--- a/target/test/test_gpio.sh
+++ b/target/test/test_gpio.sh
@@ -124,7 +124,11 @@ blink_led()
blink_led_gpiolib 2
blink_led_gpioled apfdev\:green\:user
elif [ "$1" == "APF28" ]; then
- blink_led_gpioled apfdev\:green\:user
+ if [ "$LINUX_VERSION" == "2.6.35" ]; then
+ blink_led_gpioled apfdev\:green\:user
+ else
+ blink_led_gpioled Heartbeat
+ fi
else
echo "Platform not supported by this test"
fi
@@ -155,7 +159,7 @@ test_led_gpio()
execute_for_target load_module
- ask_user "I will now blink a LED on your board. Press ENTER to continue"
+ ask_user "I will now blink the User LED on your board at 1Hz. Press ENTER to continue"
execute_for_target blink_led
ask_user "Did you see "$LED_NAME" LED blinking ? (y/N)"
diff --git a/target/test/test_helpers.sh b/target/test/test_helpers.sh
index 186978b..d40494f 100755
--- a/target/test/test_helpers.sh
+++ b/target/test/test_helpers.sh
@@ -3,7 +3,7 @@
#
# Helpers for Armadeus Software release's test scripts
#
-# Copyright (C) 2008-2013 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,6 +25,9 @@ NORMAL="\033[0;39m"
RED="\033[1;31m"
BOLD="\033[1m"
+LINUX_VERSION=`uname -r | cut -d . -f 1-3`
+LINUX_VERSION_2=`uname -r | cut -d . -f 1-2`
+
echo_red()
{
echo -n -e "$RED""$1""$NORMAL"
diff --git a/target/test/test_pwm.sh b/target/test/test_pwm.sh
index 43f356e..b2fed06 100755
--- a/target/test/test_pwm.sh
+++ b/target/test/test_pwm.sh
@@ -40,7 +40,12 @@ LED so you can't have both\nwith default\
exit_failed
fi
elif [ "$1" == "APF28" ]; then
- SYS_DIR="/sys/class/pwm/pwm4/"
+ if [ "$LINUX_VERSION" == "2.6.35" ]; then
+ SYS_DIR="/sys/class/pwm/pwm4/"
+ else
+ SYS_DIR="/sys/class/pwm/pwmchip0/pwm0"
+ echo 0 > /sys/class/pwm/pwmchip0/export
+ fi
if [ ! -d "$SYS_DIR" ]; then
echo "can't find /sys/ interface"
exit_failed
@@ -81,7 +86,7 @@ prepare_test()
test_pwm_frequency()
{
- if [ "$1" == "APF6" ]; then
+ if [ "$1" == "APF6" ] || [[ "$1" == "APF28" && "$LINUX_VERSION" != "2.6.35" ]]; then
return
fi
ask_user "Press ENTER when ready to check PWM output (frequencies starting at 100Hz)"
@@ -98,7 +103,7 @@ test_pwm_period()
{
UNIT=us
ONE_MHZ=1000000 # us
- if [ "$1" == "APF6" ]; then
+ if [ "$1" == "APF6" ] || [[ "$1" == "APF28" && "$LINUX_VERSION" != "2.6.35" ]]; then
UNIT=ns
ONE_MHZ=1000000000 # ns
echo 1 > $SYS_DIR/enable
diff --git a/target/test/test_touchscreen.sh b/target/test/test_touchscreen.sh
index a22d6c9..5fc2af1 100755
--- a/target/test/test_touchscreen.sh
+++ b/target/test/test_touchscreen.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
@@ -27,8 +27,13 @@ load_driver()
RES="$?"
elif [ "$1" == "APF28" ]; then
# driver is in-kernel/static
- dmesg | grep "MXS touch"
- RES="$?"
+ if [ "$LINUX_VERSION_2" == "2.6" ]; then
+ dmesg | grep "MXS touch"
+ RES="$?"
+ else
+ dmesg | grep "input: mxs-lradc"
+ RES="$?"
+ fi
elif [ "$1" == "APF6" ]; then
# driver is in-kernel/static
grep "SX8674 Touchscreen" $(echo /sys/class/input/event*/device/name)
hooks/post-receive
--
armadeus
|