[Armadeus-commitlog] armadeus branch, master, updated. latestrelease-180-ge83adf8
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2009-12-01 15:07:07
|
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 e83adf8eac11f5f36c46d2734cc1f522973595f5 (commit)
via a68097322b8a6813d200f3ed6da1556288dbf694 (commit)
via 9f39d5efc7221613a8faeacb1f8fcacd738d10f9 (commit)
via a2ffca8e6155bfa43d17dfe44f18f87944b34677 (commit)
via c10f341165f307e58d326e60b00985feb032ead1 (commit)
via 0adb78b1bf1b96cfea84782393728911d000da5f (commit)
via cf8d659d1fa4b795b59a1640802b45b2e5374506 (commit)
via d9bb39fcb3ebba1cd17b13a9cc8021a5ac6460ab (commit)
via 1aa3e83d41abf8ebced3dc3bfcf2961ee7090568 (commit)
from 4f93754994b1a9e5919b2857c3c7f1882b146169 (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 e83adf8eac11f5f36c46d2734cc1f522973595f5
Author: Julien Boibessot <jul...@ar...>
Date: Tue Dec 1 15:59:30 2009 +0100
[TEST] One last test (for fun ;-))
commit a68097322b8a6813d200f3ed6da1556288dbf694
Author: Julien Boibessot <jul...@ar...>
Date: Tue Dec 1 15:46:07 2009 +0100
[BUILDROOT] Add tcpdump in apf27_test default config
commit 9f39d5efc7221613a8faeacb1f8fcacd738d10f9
Author: Julien Boibessot <jul...@ar...>
Date: Tue Dec 1 15:44:43 2009 +0100
[BUILDROOT] Add tcpdump in apf27_test default config
commit a2ffca8e6155bfa43d17dfe44f18f87944b34677
Author: Julien Boibessot <jul...@ar...>
Date: Tue Dec 1 15:42:52 2009 +0100
[TEST] Updates test_release for 3.2
commit c10f341165f307e58d326e60b00985feb032ead1
Author: Julien Boibessot <jul...@ar...>
Date: Tue Dec 1 14:10:20 2009 +0100
[TEST] Update Linux drivers test for 3.2
commit 0adb78b1bf1b96cfea84782393728911d000da5f
Author: Julien Boibessot <jul...@ar...>
Date: Tue Dec 1 13:54:01 2009 +0100
[TEST] Updates some packages tests for 3.2
commit cf8d659d1fa4b795b59a1640802b45b2e5374506
Author: Julien Boibessot <jul...@ar...>
Date: Tue Dec 1 13:49:27 2009 +0100
[BUILDROOT] Updates the way armadeus testsuite is installed
commit d9bb39fcb3ebba1cd17b13a9cc8021a5ac6460ab
Author: Julien Boibessot <jul...@ar...>
Date: Tue Dec 1 13:46:02 2009 +0100
[TEST] Add new package tests
commit 1aa3e83d41abf8ebced3dc3bfcf2961ee7090568
Author: Julien Boibessot <jul...@ar...>
Date: Mon Nov 30 14:46:49 2009 +0100
Comments
-----------------------------------------------------------------------
Summary of changes:
buildroot/local/apf27_test/apf27_test.config | 8 +-
.../package/armadeus-testsuite/armadeus-tests.mk | 4 +-
.../fpga/dev_tools/loader/apf27-fpga-loader.c | 4 +-
target/test/apf27devfull_adcdac_test.sh | 38 +++++---
.../test/data/images/armadeus_systems_480x272.png | Bin 0 -> 13244 bytes
target/test/dhcp.sh | 4 +
target/test/install.sh | 27 ++++++
target/test/mmc/mmc_perf.sh | 98 +++++++++++++-------
target/test/packages/test_boa.sh | 2 +-
.../packages/{test_imxregs.sh => test_links.sh} | 35 ++++----
target/test/packages/test_madplay.sh | 39 +++++---
target/test/packages/test_mplayer.sh | 47 ++++++----
.../packages/{test_imxregs.sh => test_nano.sh} | 39 ++++----
target/test/packages/test_prboom.sh | 48 ++++++++++
target/test/packages/test_python.sh | 4 +-
target/test/packages/test_sdl.sh | 10 +-
.../packages/{test_strace.sh => test_slideshow.sh} | 26 ++++--
.../packages/{test_strace.sh => test_tcpdump.sh} | 27 ++++--
target/test/test_dac.sh | 3 +-
target/test/test_ethernet.sh | 11 ++-
target/test/test_framebuffer.sh | 10 +-
target/test/test_gpio.sh | 9 +-
target/test/test_helpers.sh | 27 ++++++
target/test/test_release.sh | 54 +++++++++--
target/test/test_rs232.sh | 6 +-
target/test/test_rtc.sh | 2 +
target/test/test_sound.sh | 6 +-
target/test/test_usb_host.sh | 57 +++++++++---
target/test/test_watchdog.sh | 4 +-
29 files changed, 460 insertions(+), 189 deletions(-)
create mode 100644 target/test/data/images/armadeus_systems_480x272.png
create mode 100755 target/test/dhcp.sh
create mode 100755 target/test/install.sh
copy target/test/packages/{test_imxregs.sh => test_links.sh} (55%)
copy target/test/packages/{test_imxregs.sh => test_nano.sh} (52%)
create mode 100755 target/test/packages/test_prboom.sh
copy target/test/packages/{test_strace.sh => test_slideshow.sh} (58%)
copy target/test/packages/{test_strace.sh => test_tcpdump.sh} (57%)
diff --git a/buildroot/local/apf27_test/apf27_test.config b/buildroot/local/apf27_test/apf27_test.config
index 7174b09..9be20af 100644
--- a/buildroot/local/apf27_test/apf27_test.config
+++ b/buildroot/local/apf27_test/apf27_test.config
@@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
-# Fri Oct 23 18:15:23 2009
+# Tue Dec 1 10:24:20 2009
#
BR2_HAVE_DOT_CONFIG=y
BR2_VERSION="0.10.0-svn"
@@ -417,7 +417,7 @@ BR2_PACKAGE_DROPBEAR=y
# BR2_PACKAGE_LIBCURL is not set
# BR2_PACKAGE_LIBEXOSIP2 is not set
# BR2_PACKAGE_LIBOSIP2 is not set
-# BR2_PACKAGE_LIBPCAP is not set
+BR2_PACKAGE_LIBPCAP=y
# BR2_PACKAGE_LIBUPNP is not set
BR2_PACKAGE_LINKS=y
# BR2_PACKAGE_LRZSZ is not set
@@ -466,7 +466,8 @@ BR2_PACKAGE_PORTMAP=y
BR2_PACKAGE_SOCKETCAN=y
BR2_PACKAGE_SOCKETCAN_TEST=y
# BR2_PACKAGE_STUNNEL is not set
-# BR2_PACKAGE_TCPDUMP is not set
+BR2_PACKAGE_TCPDUMP=y
+# BR2_PACKAGE_TCPDUMP_SMB is not set
# BR2_PACKAGE_DHCPDUMP is not set
# BR2_PACKAGE_TFTPD is not set
# BR2_PACKAGE_TN5250 is not set
@@ -627,6 +628,7 @@ BR2_PACKAGE_JPEG=y
BR2_PACKAGE_LIBPNG=y
BR2_PACKAGE_LIBUNGIF=y
# BR2_PACKAGE_PIXMAN is not set
+# BR2_PACKAGE_PYGAME is not set
BR2_PACKAGE_SDL=y
#
diff --git a/buildroot/package/armadeus-testsuite/armadeus-tests.mk b/buildroot/package/armadeus-testsuite/armadeus-tests.mk
index 0ddb3f9..4f2c3d1 100644
--- a/buildroot/package/armadeus-testsuite/armadeus-tests.mk
+++ b/buildroot/package/armadeus-testsuite/armadeus-tests.mk
@@ -19,9 +19,7 @@ $(ARMADEUS-TESTSUITE_DIR)/.unpacked:
touch $@
$(ARMADEUS-TESTSUITE_TARGET_BINARY): $(ARMADEUS-TESTSUITE_DIR)/.unpacked
- mkdir -p $(ARMADEUS-TESTSUITE_TARGET_DIR)
- find $(ARMADEUS-TESTSUITE_DIR) -name "*.sh" -exec install -D {} $(ARMADEUS-TESTSUITE_TARGET_DIR) \;
- cp -r $(ARMADEUS-TESTSUITE_DIR)/data $(ARMADEUS-TESTSUITE_TARGET_DIR)/
+ $(ARMADEUS-TESTSUITE_SOURCE)/install.sh $(ARMADEUS-TESTSUITE_TARGET_DIR)
make -C $(ARMADEUS-TESTSUITE_WISHBONE_BUTTON_DIR) test
install -D $(ARMADEUS-TESTSUITE_WISHBONE_BUTTON_DIR)/testbutton $(ARMADEUS-TESTSUITE_TARGET_DIR)
touch $@
diff --git a/target/linux/modules/fpga/dev_tools/loader/apf27-fpga-loader.c b/target/linux/modules/fpga/dev_tools/loader/apf27-fpga-loader.c
index 41d31c6..6e8e2e6 100644
--- a/target/linux/modules/fpga/dev_tools/loader/apf27-fpga-loader.c
+++ b/target/linux/modules/fpga/dev_tools/loader/apf27-fpga-loader.c
@@ -184,9 +184,7 @@ int apf27_fpga_abort(void)
return 1;
}
-/* Note that these are pointers to code that is in Flash. They will be
- * relocated at runtime.
- * Spartan2 code is used to download our Spartan 3 :) code is compatible.
+/* Spartan2 code is used to download our Spartan 3: code is compatible.
* Just take care about the file size
*/
Xilinx_Spartan3_Slave_Parallel_fns fpga_fns = {
diff --git a/target/test/apf27devfull_adcdac_test.sh b/target/test/apf27devfull_adcdac_test.sh
index b92e1a0..e8e2fd1 100644
--- a/target/test/apf27devfull_adcdac_test.sh
+++ b/target/test/apf27devfull_adcdac_test.sh
@@ -21,57 +21,69 @@ test_ADCDAC()
show_test_banner "ADC DAC"
modprobe max1027
+ echo "You will need a special hardware to run this test"
+
setDAC A 614
setDAC B 820
- if [ "$?" == 0 ]; then
- let set=0x62; echo $set > /sys/bus/spi/devices/spi0.0/setup
- sleep 1
- let conv=0xb0; echo $conv > /sys/bus/spi/devices/spi0.0/conversion
- sleep 1
- result=`cat /sys/bus/spi/devices/spi0.0/in0_input`
+ if [ "$?" != 0 ]; then
+ exit_failed
+ fi
+
+ let set=0x62; echo $set > /sys/bus/spi/devices/spi0.0/setup
+ sleep 1
+ let conv=0xb0; echo $conv > /sys/bus/spi/devices/spi0.0/conversion
+ sleep 1
+
+ result=`cat /sys/bus/spi/devices/spi0.0/in0_input`
if [ "$result" -gt 1080 ] && [ "$result" -lt 1320 ]; then
echo "AIN0: ok"
else
echo "AIN0: $result"
fi
- result=`cat /sys/bus/spi/devices/spi0.0/in1_input`
+
+ result=`cat /sys/bus/spi/devices/spi0.0/in1_input`
if [ "$result" -gt 650 ] && [ "$result" -lt 790 ]; then
echo "AIN1: ok"
else
echo "AIN1: $result"
fi
- result=`cat /sys/bus/spi/devices/spi0.0/in2_input`
+
+ result=`cat /sys/bus/spi/devices/spi0.0/in2_input`
if [ "$result" -gt 1300 ] && [ "$result" -lt 1580 ]; then
echo "AIN2: ok"
else
echo "AIN2: $result"
fi
- result=`cat /sys/bus/spi/devices/spi0.0/in3_input`
+
+ result=`cat /sys/bus/spi/devices/spi0.0/in3_input`
if [ "$result" -gt 860 ] && [ "$result" -lt 1060 ]; then
echo "AIN3: ok"
else
echo "AIN3: $result"
fi
- result=`cat /sys/bus/spi/devices/spi0.0/in4_input`
+
+ result=`cat /sys/bus/spi/devices/spi0.0/in4_input`
if [ "$result" -gt 1080 ] && [ "$result" -lt 1320 ]; then
echo "AIN4: ok"
else
echo "AIN4: $result"
fi
- result=`cat /sys/bus/spi/devices/spi0.0/in5_input`
+
+ result=`cat /sys/bus/spi/devices/spi0.0/in5_input`
if [ "$result" -gt 1730 ] && [ "$result" -lt 2110 ]; then
echo "AIN5: ok"
else
echo "AIN5: $result"
fi
- result=`cat /sys/bus/spi/devices/spi0.0/in6_input`
+
+ result=`cat /sys/bus/spi/devices/spi0.0/in6_input`
if [ "$result" -gt 1080 ] && [ "$result" -lt 1320 ]; then
echo "AIN6: ok"
else
echo "AIN6: $result"
fi
- fi
}
test_ADCDAC
+
diff --git a/target/test/data/images/armadeus_systems_480x272.png b/target/test/data/images/armadeus_systems_480x272.png
new file mode 100644
index 0000000..f3da339
Binary files /dev/null and b/target/test/data/images/armadeus_systems_480x272.png differ
diff --git a/target/test/dhcp.sh b/target/test/dhcp.sh
new file mode 100755
index 0000000..83f2a07
--- /dev/null
+++ b/target/test/dhcp.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+udhcpc -q -i eth0 --now
+
diff --git a/target/test/install.sh b/target/test/install.sh
new file mode 100755
index 0000000..562aa57
--- /dev/null
+++ b/target/test/install.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+if [ "$1" == "" ]; then
+ echo "Please provides the directory where to install the Test Suite"
+ echo "$0 dest_dir"
+ exit 1
+fi
+
+THIS_DIR=`dirname $0`
+TESTSUITE_TARGET_DIR="$1"
+echo "Installing Test Suite in $TESTSUITE_TARGET_DIR (from $THIS_DIR)"
+
+mkdir -p $TESTSUITE_TARGET_DIR
+mkdir -p $TESTSUITE_TARGET_DIR/packages
+mkdir -p $TESTSUITE_TARGET_DIR/data/fpga
+mkdir -p $TESTSUITE_TARGET_DIR/data/images
+#
+install $THIS_DIR/test_*.sh $TESTSUITE_TARGET_DIR/
+install $THIS_DIR/dhcp.sh $TESTSUITE_TARGET_DIR/
+install $THIS_DIR/mmc/*.sh $TESTSUITE_TARGET_DIR/
+# find $(ARMADEUS-TESTSUITE_DIR) -name "*.sh" -exec install -D {} $(ARMADEUS-TESTSUITE_TARGET_DIR) \;
+cp -d $THIS_DIR/packages/*.sh $TESTSUITE_TARGET_DIR/packages
+#
+cp $THIS_DIR/data/fpga/* $TESTSUITE_TARGET_DIR/data/fpga/
+cp $THIS_DIR/data/images/* $TESTSUITE_TARGET_DIR/data/images/
+
+exit 0
diff --git a/target/test/mmc/mmc_perf.sh b/target/test/mmc/mmc_perf.sh
index fdf06a0..fc1cc38 100755
--- a/target/test/mmc/mmc_perf.sh
+++ b/target/test/mmc/mmc_perf.sh
@@ -20,12 +20,14 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
+source ./test_helpers.sh
+
# Script parameters
MMC_MOUNT_DIR="/media/mmc"
MMC_DEVICE="/dev/mmcblk0p1"
TEMP_DIR="/tmp/perf_mmc/"
TEMP_FILE="/tmp/data.bin"
-TEMP_FILE_SIZE=4096 # kbytes
+TEMP_FILE_SIZE=16384 # kbytes
WRITE_BENCH="/tmp/test_mmc.sh"
WTIME=0
@@ -34,9 +36,9 @@ RTIME=0
debug()
{
- if [ "$DEBUG" == "True" ]; then
- echo $1
- fi
+ if [ "$DEBUG" == "True" ]; then
+ echo $1
+ fi
}
get_time_in_ms_from_file()
@@ -62,12 +64,10 @@ get_time_in_ms_from_file()
test_speed()
{
- # Create temp bench file
- echo "Creating temp bench file"
- if [ ! -f "$TEMP_FILE" ]; then
- dd if=/dev/urandom of=/tmp/data.bin bs=1024 count=$TEMP_FILE_SIZE
- fi
- # Create bench script
+ # Create temp bench file
+ create_random_file $TEMP_FILE $TEMP_FILE_SIZE
+
+ # Create write bench script
echo "mv $TEMP_FILE $MMC_MOUNT_DIR" > $WRITE_BENCH
echo "sync" >> $WRITE_BENCH
echo "exit 0" >> $WRITE_BENCH
@@ -85,46 +85,79 @@ test_speed()
WTOTIME=$WTIME
else
WTOTIME=`expr $WTIME + $WTOTIME`
- WTOTIME=`expr $WTOTIME / 2`
fi
- debug "Mean write time: $WTOTIME ms"
+ debug "Total write time: $WTOTIME ms"
# Update reading mean time
get_time_in_ms_from_file /tmp/readtime
if [ $it == "1" ]; then
RTOTIME=$RTIME
else
RTOTIME=`expr $RTIME + $RTOTIME`
- RTOTIME=`expr $RTOTIME / 2`
fi
- debug "Mean reading time: $RTOTIME ms"
+ debug "Total read time: $RTOTIME ms"
done
- WSPEED=`expr $TEMP_FILE_SIZE \* 1000 / $WTOTIME`
- RSPEED=`expr $TEMP_FILE_SIZE \* 1000 / $RTOTIME`
- echo "--- Test result (mean values): read -> $RSPEED kBytes/sec write -> $WSPEED kBytes/sec"
+
+ WTOTIME=`expr $WTOTIME / $it`
+ RTOTIME=`expr $RTOTIME / $it`
+ WSPEED=`expr $TEMP_FILE_SIZE \* 1000 / $WTOTIME`
+ RSPEED=`expr $TEMP_FILE_SIZE \* 1000 / $RTOTIME`
+ echo "--- Test result (mean values): read -> $RSPEED kBytes/sec write -> $WSPEED kBytes/sec"
}
-# Check some prerequisites
+usage()
+{
+ echo -e "\n Usage: $0 <speed|integrity> [device]\n"
+ echo "device: default to $MMC_DEVICE"
+ exit 1
+}
+
+#
+# Main
+#
+
+# Check some pre-requisites
if [ ! -d $MMC_MOUNT_DIR ]; then
- echo "Check that $MMC_MOUNT_DIR directory is existing"
- exit 1
+ echo "Check that $MMC_MOUNT_DIR directory is existing"
+ exit 1
fi
-IS_MOUNTED=`mount | grep -c $MMC_MOUNT_DIR`
-if [ "$IS_MOUNTED" != "1" ]; then
- echo "Check that your MMC is mounted on $MMC_MOUNT_DIR"
- exit 1
+# Process parameters
+if [ "$#" == 0 ]; then
+ usage
+elif [ "$1" != "speed" ] && [ "$1" != "integrity" ]; then
+ usage
fi
-# Process parameters
-if [ $# == 0 ]; then
- echo -e "\n Usage: $0 [speed|integrity] \n"
- exit 1
+if [ "$2" != "" ]; then
+ MMC_DEVICE="$2"
+fi
+
+if [ ! -b $MMC_DEVICE ]; then
+ echo -n "Please insert your MMC/SD/microSD/USB key"
+ it=0
+ while [ ! -b $MMC_DEVICE ] && [ $it -le 20 ]; do
+ it=$((it+1))
+ sleep 2
+ echo -n "."
+ done
+fi
+
+# If not mounted, mount it:
+IS_MOUNTED=`mount | grep -c $MMC_MOUNT_DIR`
+if [ "$IS_MOUNTED" != "1" ]; then
+ mount $MMC_DEVICE $MMC_MOUNT_DIR
+ if [ "$?" != 0 ]; then
+ echo "Failed to mount device $MMC_DEVICE"
+ exit 1
+ fi
fi
+# Here we go:
if [ "$1" == "speed" ]; then
- test_speed
- exit 0
+ test_speed
+ exit 0
fi
+# or integrity test:
SIZE=`df -hm | grep /media/mmc | awk '{$1=$1;print}' | cut -d " " -f 4`
@@ -141,7 +174,7 @@ md5sum $FILE > $MD5
while [ $it -le $SIZE ]; do
FILEMMC=$MMC_MOUNT_DIR/test_$it.rnd
# MD5=$TEMP_DIR/test_$it.rnd.md5
- echo -en "\r Creating: $FILEMMC"
+ echo -en "\r Copying: $FILEMMC"
it=$((it+1))
cp $FILE $FILEMMC
sync
@@ -166,7 +199,8 @@ for file in $FILES; do
done
echo
date
-echo "MMC perf test successful !"
+echo "Integrity test successful !"
+
rm -rf $TEMP_DIR
rm $MMC_MOUNT_DIR/*.rnd
diff --git a/target/test/packages/test_boa.sh b/target/test/packages/test_boa.sh
index ba1902f..4f8cd80 100755
--- a/target/test/packages/test_boa.sh
+++ b/target/test/packages/test_boa.sh
@@ -61,7 +61,7 @@ test_boa()
echo "Now you can access to http://"$IP"/index.html from your web browser"
sleep 8
if [ "$?" == 0 ]; then
- ask_user "Did you manage to show the web page ? If OK say y"
+ ask_user "Did you manage to show the web page ? (y/N)"
if [ "$response" == "y" ]; then
echo_test_ok
test_cleanup
diff --git a/target/test/packages/test_imxregs.sh b/target/test/packages/test_links.sh
similarity index 55%
copy from target/test/packages/test_imxregs.sh
copy to target/test/packages/test_links.sh
index b60cf34..9483997 100755
--- a/target/test/packages/test_imxregs.sh
+++ b/target/test/packages/test_links.sh
@@ -14,35 +14,34 @@
source ./test_helpers.sh
source ./test_env.sh
-#DEBUG=True
-EXEC_NAME="imxregs"
+EXEC_NAME="links"
+WEB_SITE="www.armadeus.org"
-test_imxregs()
+test_links()
{
- show_test_banner "imxregs"
+ show_test_banner "links (textual Web Browser)"
+
is_package_installed $EXEC_NAME
- APF=`cat /etc/machine`
- echo -n "Running on an "
- if [ "$APF" == "APF27" ]; then
- ID_REG="CID"
- ID_VAL="0x2882101d"
- else
- ID_REG="SIDR"
- ID_VAL="0x00d4c01d"
+ if [ "$?" != 0 ]; then
+ exit_failed
fi
- echo "$APF"
- $EXEC_NAME $ID_REG
+
+ ask_user "After having press ENTER, the Armadeus Project website will be opened in textual mode.\n Then, to quit press ESC and File->Exit"
+
+ # Launch it
+ $EXEC_NAME $WEB_SITE
+
if [ "$?" == 0 ]; then
- CHIP_ID=`$EXEC_NAME $ID_REG | grep $ID_REG | sed 's/^.*0x/0x/' | cut -d " " -f 1`
- echo "Chip ID: $CHIP_ID"
- if [ "$CHIP_ID" == $ID_VAL ]; then
+ ask_user "Was website displayed ? (y/N)"
+ if [ "$response" == "y" ] || [ "$response" == "yes" ]; then
echo_test_ok
exit 0
fi
fi
+
exit_failed
}
-test_imxregs
+test_links
diff --git a/target/test/packages/test_madplay.sh b/target/test/packages/test_madplay.sh
index 0b7eac0..e8c1c00 100755
--- a/target/test/packages/test_madplay.sh
+++ b/target/test/packages/test_madplay.sh
@@ -14,8 +14,11 @@
source ./test_helpers.sh
source ./test_env.sh
+# Validates: madplay
+# Requires: ALSA & Internet access
#DEBUG=True
EXEC_NAME="madplay"
+FILE_WEB_ADDRESS="http://www.armadeus.com//assos_downloads/misc/mozart.mp3"
MUSIC_FILE_NAME="$TEMP_DIR/mozart.mp3"
test_madplay()
@@ -24,25 +27,33 @@ test_madplay()
is_package_installed $EXEC_NAME
- if [ "$?" == 0 ]; then
+ if [ "$?" != 0 ]; then
+ exit_failed
+ fi
+
+ if [ ! -f "$MUSIC_FILE_NAME" ]; then
# Get music
echo "Downloading file from Internet"
# Suppose that network was correctly set before
- wget http://dl.free.fr/orrXngocU -O $MUSIC_FILE_NAME
- # Launch it
- $EXEC_NAME $MUSIC_FILE_NAME &
- PID=$!
- if [ "$?" == 0 ]; then
- sleep 10
- ask_user "Was music correctly played ? If OK say y"
- if [ "$response" == "y" ]; then
- echo_test_ok
- exit 0
- fi
- kill $PID
+ wget $FILE_WEB_ADDRESS -O $MUSIC_FILE_NAME
+ if [ "$?" != 0 ]; then
+ exit_failed
+ fi
+ fi
+
+ # Launch it
+ $EXEC_NAME $MUSIC_FILE_NAME &
+ PID=$!
+ if [ "$?" == 0 ]; then
+ sleep 10
+ ask_user "Was music correctly played ? (y/N)"
+ if [ "$response" == "y" ] || [ "$response" == "yes" ]; then
+ echo_test_ok
+ exit 0
fi
+ kill $PID
fi
- rm -f "$MUSIC_FILE_NAME"
+
exit_failed
}
diff --git a/target/test/packages/test_mplayer.sh b/target/test/packages/test_mplayer.sh
index e51541c..5ca110a 100755
--- a/target/test/packages/test_mplayer.sh
+++ b/target/test/packages/test_mplayer.sh
@@ -14,8 +14,11 @@
source ./test_helpers.sh
source ./test_env.sh
+# Requires: Framebuffer & Internet access
+# Validates: mplayer
#DEBUG=True
EXEC_NAME="mplayer"
+FILE_WEB_ADDRESS="http://www.armadeus.com//assos_downloads/misc/apf27.mpg"
VIDEO_FILE_NAME="$TEMP_DIR/apf27.mpg"
test_mplayer()
@@ -24,27 +27,37 @@ test_mplayer()
is_package_installed $EXEC_NAME
- if [ "$?" == 0 ]; then
- wake_up_lcd
- # Stop blinking cursor
- echo 0 > /sys/class/graphics/fbcon/cursor_blink
- # Get video
+ if [ "$?" != 0 ]; then
+ exit_failed
+ fi
+
+ wake_up_lcd
+ # Stop blinking cursor
+ echo 0 > /sys/class/graphics/fbcon/cursor_blink
+
+ if [ ! -f $VIDEO_FILE_NAME ]; then
+ # Get video (suppose that network was correctly set before)
echo "Downloading file from Internet"
- # Suppose that network was correctly set before
- wget http://dl.free.fr/oBjrVd6n8 -O $VIDEO_FILE_NAME
- # Launch it
- $EXEC_NAME -nosound -fs $VIDEO_FILE_NAME
- if [ "$?" == 0 ]; then
- ask_user "Was video correctly displayed ? If OK say y"
- if [ "$response" == "y" ]; then
- echo_test_ok
- exit 0
- fi
- fi
+ wget $FILE_WEB_ADDRESS -O $VIDEO_FILE_NAME
+ if [ "$?" != 0 ]; then
+ exit_failed
+ fi
fi
+
+ # Launch it
+ $EXEC_NAME -vo fbdev -nosound -fs $VIDEO_FILE_NAME
+ RES=$?
# Make cursor blink again
echo 1 > /sys/class/graphics/fbcon/cursor_blink
- rm -f "$VIDEO_FILE_NAME"
+
+ if [ "$RES" == 0 ]; then
+ ask_user "Was video correctly displayed ? (y/N)"
+ if [ "$response" == "y" ] || [ "$response" == "yes" ]; then
+ echo_test_ok
+ exit 0
+ fi
+ fi
+
exit_failed
}
diff --git a/target/test/packages/test_imxregs.sh b/target/test/packages/test_nano.sh
similarity index 52%
copy from target/test/packages/test_imxregs.sh
copy to target/test/packages/test_nano.sh
index b60cf34..b667277 100755
--- a/target/test/packages/test_imxregs.sh
+++ b/target/test/packages/test_nano.sh
@@ -14,35 +14,38 @@
source ./test_helpers.sh
source ./test_env.sh
-#DEBUG=True
-EXEC_NAME="imxregs"
+# Validates: nano and ncurses
+EXEC_NAME="nano"
+TEST_FILE=/tmp/nano.txt
-test_imxregs()
+test_nano()
{
- show_test_banner "imxregs"
+ show_test_banner "nano (Text Editor)"
+
is_package_installed $EXEC_NAME
- APF=`cat /etc/machine`
- echo -n "Running on an "
- if [ "$APF" == "APF27" ]; then
- ID_REG="CID"
- ID_VAL="0x2882101d"
- else
- ID_REG="SIDR"
- ID_VAL="0x00d4c01d"
+ if [ "$?" != 0 ]; then
+ exit_failed
fi
- echo "$APF"
- $EXEC_NAME $ID_REG
+
+ ask_user "After having press ENTER, nano will be launched.\n Write a small text in it, then press Ctrl+O to save and Ctrl+X to quit"
+
+ # Launch it
+ $EXEC_NAME $TEST_FILE
+
if [ "$?" == 0 ]; then
- CHIP_ID=`$EXEC_NAME $ID_REG | grep $ID_REG | sed 's/^.*0x/0x/' | cut -d " " -f 1`
- echo "Chip ID: $CHIP_ID"
- if [ "$CHIP_ID" == $ID_VAL ]; then
+ clear
+ cat $TEST_FILE
+ echo
+ ask_user "Is it the text you typed ? (y/N)"
+ if [ "$response" == "y" ] || [ "$response" == "yes" ]; then
echo_test_ok
exit 0
fi
fi
+
exit_failed
}
-test_imxregs
+test_nano
diff --git a/target/test/packages/test_prboom.sh b/target/test/packages/test_prboom.sh
new file mode 100755
index 0000000..5e5f75b
--- /dev/null
+++ b/target/test/packages/test_prboom.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+#
+# Script to test a Buildroot package for Armadeus Software release
+#
+# Copyright (C) 2008 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+
+source ./test_helpers.sh
+source ./test_env.sh
+
+# Validates: prboom & SDL_net & SDL_mixer
+# Requires: SDL & ALSA OSS emulation
+EXEC_NAME="/usr/games/prboom"
+EXEC_OPTIONS="-width 320 -height 240 &"
+
+test_prboom()
+{
+ show_test_banner "PrBoom (SDL port of Doom)"
+
+ is_package_installed $EXEC_NAME
+
+ if [ "$?" != 0 ]; then
+ exit_failed
+ fi
+
+ # Launch it
+ ask_user "After having press ENTER, PrBoom will be launched. Press Ctrl+C at any time to stop."
+ modprobe snd-pcm-oss
+ modprobe snd-mixer-oss
+ $EXEC_NAME $EXEC_OPTIONS
+
+ ask_user "Did you have good time ;-) ? (y/N)"
+ if [ "$response" == "y" ] || [ "$response" == "yes" ]; then
+ echo_test_ok
+ exit 0
+ fi
+
+ exit_failed
+}
+
+test_prboom
+
diff --git a/target/test/packages/test_python.sh b/target/test/packages/test_python.sh
index 067fc00..e30cbb5 100755
--- a/target/test/packages/test_python.sh
+++ b/target/test/packages/test_python.sh
@@ -23,8 +23,8 @@ generate_test_file()
cat << EOF > $PYTHON_FILE
import sys
- print "If you read this then Python is running"
- sys.exit(0)
+print "If you read this then Python is running"
+sys.exit(0)
EOF
}
diff --git a/target/test/packages/test_sdl.sh b/target/test/packages/test_sdl.sh
index 365a96d..9828c50 100755
--- a/target/test/packages/test_sdl.sh
+++ b/target/test/packages/test_sdl.sh
@@ -30,19 +30,19 @@ test_sdlwater()
if [ "$?" == 0 ]; then
wake_up_lcd
- # Launch it
+ # Launch it (needs touchscreen driver to be launched before)
export SDL_MOUSEDRV=TSLIB
export SDL_MOUSEDEV=$TSLIB_TSDEVICE
$EXEC_NAME /usr/share/images/water320.bmp 1>/dev/null &
- echo "Touch the LCD screen please"
+ echo "Please touch the LCD screen"
sleep 5
- ask_user "Did you manage to draw water circles ? If OK say y"
- if [ "$response" == "y" ]; then
+ ask_user "Did you manage to draw water circles ? (y/N)"
+ if [ "$response" == "y" ] || [ "$response" == "yes" ]; then
echo_test_ok
test_cleanup
exit 0
fi
- test_cleanup
+ test_cleanup
fi
exit_failed
diff --git a/target/test/packages/test_strace.sh b/target/test/packages/test_slideshow.sh
similarity index 58%
copy from target/test/packages/test_strace.sh
copy to target/test/packages/test_slideshow.sh
index 1137303..710a7c0 100755
--- a/target/test/packages/test_strace.sh
+++ b/target/test/packages/test_slideshow.sh
@@ -14,26 +14,34 @@
source ./test_helpers.sh
source ./test_env.sh
-#DEBUG=True
-EXEC_NAME="strace"
+# Requires: test_sdl.sh
+# Validates: libpng & slideshow
+EXEC_NAME="slideshow"
+TEST_FILE="../data/images/"
-
-test_strace()
+test_slideshow()
{
- show_test_banner "strace"
+ show_test_banner "slideshow"
is_package_installed $EXEC_NAME
+ if [ "$?" != 0 ]; then
+ exit_failed
+ fi
+
+ # Launch it
+ $EXEC_NAME -width 480 -height 272 -name $TEST_DIR
+
if [ "$?" == 0 ]; then
- # Launch it
- $EXEC_NAME echo "HELLO !!"
- if [ "$?" == 0 ]; then
+ ask_user "Did you see an image ? (y/N)"
+ if [ "$response" == "y" ] || [ "$response" == "yes" ]; then
echo_test_ok
exit 0
fi
fi
+
exit_failed
}
-test_strace
+test_slideshow
diff --git a/target/test/packages/test_strace.sh b/target/test/packages/test_tcpdump.sh
similarity index 57%
copy from target/test/packages/test_strace.sh
copy to target/test/packages/test_tcpdump.sh
index 1137303..37a80c7 100755
--- a/target/test/packages/test_strace.sh
+++ b/target/test/packages/test_tcpdump.sh
@@ -14,26 +14,35 @@
source ./test_helpers.sh
source ./test_env.sh
-#DEBUG=True
-EXEC_NAME="strace"
+# Validates: tcpdump & libpcap
+EXEC_NAME="tcpdump"
+EXEC_OPTIONS="-i eth0 -x -v -c 3"
-
-test_strace()
+test_tcpdump()
{
- show_test_banner "strace"
+ show_test_banner "tcpdump"
is_package_installed $EXEC_NAME
+ if [ "$?" != 0 ]; then
+ exit_failed
+ fi
+
+ ask_user "After having press ENTER, tcpdump will be launched."
+
+ # Launch it
+ $EXEC_NAME $EXEC_OPTIONS
+
if [ "$?" == 0 ]; then
- # Launch it
- $EXEC_NAME echo "HELLO !!"
- if [ "$?" == 0 ]; then
+ ask_user "Did you see the packets dump ? (y/N)"
+ if [ "$response" == "y" ] || [ "$response" == "yes" ]; then
echo_test_ok
exit 0
fi
fi
+
exit_failed
}
-test_strace
+test_tcpdump
diff --git a/target/test/test_dac.sh b/target/test/test_dac.sh
index d7c12e5..fac0370 100755
--- a/target/test/test_dac.sh
+++ b/target/test/test_dac.sh
@@ -19,7 +19,7 @@ test_DAC()
{
show_test_banner "DAC"
- echo "This test is more probant with vumeters"
+ ask_user "This test is more probant with vumeters. Press ENTER."
setDAC AB 500
if [ "$?" == 0 ]; then
@@ -32,3 +32,4 @@ test_DAC()
}
test_DAC
+
diff --git a/target/test/test_ethernet.sh b/target/test/test_ethernet.sh
index a2d69e6..76d65cb 100755
--- a/target/test/test_ethernet.sh
+++ b/target/test/test_ethernet.sh
@@ -19,19 +19,26 @@ WTIME=0
RTIME=0
#DEBUG=True
+signal_handler()
+{
+ echo "Signal trapped !"
+ rm -f $TEMP_FILE
+ exit 1
+}
+
# $1 = nb of test iterations
test_ethernet()
{
show_test_banner "Ethernet"
+ trap signal_handler INT
+
# Check if interface is up
ifconfig eth0
if [ "$?" != 0 ]; then
echo "No Ethernet interface found"
exit_failed
fi
- # To autoconfigure Internet access
- udhcpc -q -i eth0
# Check if Host is alive
ping -c 5 -W 2 $SERVER_IP
diff --git a/target/test/test_framebuffer.sh b/target/test/test_framebuffer.sh
index 78d8b81..f0a131c 100755
--- a/target/test/test_framebuffer.sh
+++ b/target/test/test_framebuffer.sh
@@ -31,11 +31,11 @@ test_framebuffer()
echo 1 > /sys/class/graphics/fbcon/cursor_blink
# Ask user for feedbacks
if [ "$RES" == 0 ]; then
- ask_user "Did all the tests show fine ? If OK say y"
- if [ "$response" == "y" ]; then
- echo_test_ok
- exit 0
- fi
+ ask_user "Did all the tests show fine ? (y/N)"
+ if [ "$response" == "y" ] || [ "$response" == "yes" ]; then
+ echo_test_ok
+ exit 0
+ fi
fi
exit_failed
}
diff --git a/target/test/test_gpio.sh b/target/test/test_gpio.sh
index 9fd12cb..9156ed3 100755
--- a/target/test/test_gpio.sh
+++ b/target/test/test_gpio.sh
@@ -80,7 +80,7 @@ check_button_apf27()
setbit /proc/driver/gpio/portFdir 13 0
setbit /proc/driver/gpio/portFirq 13 1
echo "Press 2 times on S1 button"
- /usr/bin/testbutton /dev/gpio/PF13 3
+ /usr/bin/testsuite/testbutton /dev/gpio/PF13 3
if [ "$?" != 0 ]; then
exit_failed
fi
@@ -88,7 +88,7 @@ check_button_apf27()
check_button_apf9328()
{
- # TBDL
+ echo "TBDL"
}
@@ -102,10 +102,11 @@ test_led_gpio()
exit_failed
fi
+ ask_user "I will now blink a LED on your board. Press ENTER to continue"
execute_for_target blink_led_apf9328 blink_led_apf27
- ask_user "Did you see "$LED_NAME" LED blinking ? (y/n)"
- if [ "$response" != "y" ]; then
+ ask_user "Did you see "$LED_NAME" LED blinking ? (y/N)"
+ if [ "$response" != "y" ] && [ "$response" != "yes" ]; then
exit_failed
fi
diff --git a/target/test/test_helpers.sh b/target/test/test_helpers.sh
index c5133e5..8d5e8bd 100644
--- a/target/test/test_helpers.sh
+++ b/target/test/test_helpers.sh
@@ -108,3 +108,30 @@ execute_for_target()
$2
fi
}
+
+# $1: name of the file in $TEMP_DIR
+# $2: size of the file
+create_random_file()
+{
+ if [ "$1" == "" ] || [ "$2" == "" ]; then
+ echo "create_random_file(): missing parameter"
+ return 1
+ fi
+ RANDOM_FILE="$1"
+ FILE_SIZE="$2"
+ # Create temp bench file
+ echo -e "\nCreating a temporary bench file ($TEMP_FILE) of $TEMP_FILE_SIZE KBytes"
+ if [ ! -f "$RANDOM_FILE" ]; then
+ dd if=/dev/urandom of=$RANDOM_FILE bs=1024 count=$FILE_SIZE 2>/dev/null & pid=$!
+ # Show a kind of progress bar
+ echo -en "[ ]\r["
+ while [ $? == 0 ]; do
+ echo -n "."
+ sleep 1
+ kill -USR1 $pid 2>/dev/null
+ done
+ echo
+ fi
+ echo " -> done"
+}
+
diff --git a/target/test/test_release.sh b/target/test/test_release.sh
index 75cd8c9..558af20 100755
--- a/target/test/test_release.sh
+++ b/target/test/test_release.sh
@@ -20,28 +20,62 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-source ./test_env.sh
+THIS_DIR=`dirname $0`
+source $THIS_DIR/test_env.sh
+source $THIS_DIR/test_helpers.sh
mkdir -p $TEMP_DIR
date
-./test_ethernet.sh
+show_test_banner "All supported drivers/packages"
+echo "Your test environments variables are:"
+echo " - temporary directory: $TEMP_DIR"
+echo " - Host IP: $SERVER_IP"
+ask_user "Please confirm that these variables are correct (y/N)"
+if [ "$response" != "y" ] && [ "$response" != "yes" ]; then
+ echo "Please update $THIS_DIR/test_env.sh"
+ exit 1
+fi
+
+# Here we go ! (First start with Linux)
+$THIS_DIR/test_ethernet.sh
+echo
+$THIS_DIR/test_usb_host.sh
+echo
+$THIS_DIR/test_rs232.sh
+echo
+$THIS_DIR/test_usb_device.sh
echo
-./test_usb_host.sh
+$THIS_DIR/test_backlight.sh
echo
-./test_rs232.sh 1
+$THIS_DIR/test_framebuffer.sh
echo
-./test_usb_device.sh
+$THIS_DIR/test_touchscreen.sh
echo
-./test_backlight.sh
+$THIS_DIR/test_dac.sh
echo
-./test_touchscreen.sh
+$THIS_DIR/test_adc.sh
echo
-./test_dac.sh
+$THIS_DIR/test_sound.sh
echo
-./test_imxregs.sh
+$THIS_DIR/test_fpga.sh
echo
-./test_sound.sh
+$THIS_DIR/test_gpio.sh
echo
+$THIS_DIR/mmc_perf.sh speed
+# Following tests needs Internet access:
+ask_user "I will now try to configure Internet access. Press ENTER when ready"
+$THIS_DIR/dhcp.sh
+echo
+$THIS_DIR/test_rtc.sh
+
+# Then check packages:
+PACKAGES_TESTS=`ls $THIS_DIR/packages/*.sh`
+for package_test in $PACKAGES_TESTS; do
+ if [ -x $package_test ] && [ ! -L $package_test ]; then
+ $package_test
+ fi
+done
exit 0
+
diff --git a/target/test/test_rs232.sh b/target/test/test_rs232.sh
index 79a7f7b..84e887b 100755
--- a/target/test/test_rs232.sh
+++ b/target/test/test_rs232.sh
@@ -71,11 +71,13 @@ echo_apf27_ports()
echo " Available one: [ 2 ]"
}
+PORT="$1"
if [ "$1" == "" ]; then
echo "Please give the port number to test !"
execute_for_target echo_apf9328_ports echo_apf27_ports
- exit 1
+ read PORT
+ [ "$PORT" == "" ] && exit_failed
fi
-test_serial_port $1
+test_serial_port $PORT
diff --git a/target/test/test_rtc.sh b/target/test/test_rtc.sh
index b45e272..ddda363 100755
--- a/target/test/test_rtc.sh
+++ b/target/test/test_rtc.sh
@@ -33,6 +33,7 @@ test_rtc()
{
show_test_banner "RTC"
+ echo "Trying to get current time with NTP"
ntpdate 217.147.208.1
date
if [ "$?" == 0 ]; then
@@ -46,6 +47,7 @@ test_rtc()
AFTER=`convert_in_secs $DATE`
DIFF=$(($AFTER - $BEFORE - $TEST_DURATION))
+ date
if [ "$DIFF" -gt "$TOLERANCE" ]; then
echo "$AFTER $BEFORE ($DIFF)"
exit_failed
diff --git a/target/test/test_sound.sh b/target/test/test_sound.sh
index 09bc6ef..7fdf7d5 100755
--- a/target/test/test_sound.sh
+++ b/target/test/test_sound.sh
@@ -31,13 +31,15 @@ test_sound()
exit_failed
fi
+ ask_user "Please connect a earphone to the Audio Out connector (up on APF27). Then press ENTER."
aplay /usr/share/sounds/alsa/Side_Left.wav
if [ "$?" == 0 ]; then
- ask_user "Did you hear something ? (y/n)"
- if [ "$response" == "y" ]; then
+ ask_user "Did you hear something ? (y/N)"
+ if [ "$response" == "y" ] || [ "$response" == "yes" ]; then
echo_test_ok
fi
fi
}
test_sound
+
diff --git a/target/test/test_usb_host.sh b/target/test/test_usb_host.sh
index d5cd9fe..7618623 100755
--- a/target/test/test_usb_host.sh
+++ b/target/test/test_usb_host.sh
@@ -25,6 +25,39 @@ load_usb_host_driver_apf9328()
fi
}
+wait_key_insertion()
+{
+ echo "Please insert a USB key in $1 USB Host connector (nothing will be erased)"
+ it=0
+ while [ ! -b /dev/sda1 ] && [ $it -le 20 ]; do
+ it=$((it+1))
+ sleep 2
+ echo -n "."
+ done
+}
+
+wait_key_removal()
+{
+ echo "Please remove your USB key"
+ it=0
+ while [ -b /dev/sda1 ] && [ $it -le 20 ]; do
+ it=$((it+1))
+ sleep 2
+ echo -n "."
+ done
+ [ ! -b /dev/sda1 ] && echo "USB key removed"
+}
+
+check_usb_key()
+{
+ mount `ls /dev/sd*1` /mnt/mmc && ls /mnt/mmc/
+ df -h
+ umount /mnt/mmc
+ if [ "$?" != 0 ]; then
+ exit_failed
+ fi
+}
+
test_usb_host()
{
show_test_banner "USB Host"
@@ -36,21 +69,17 @@ test_usb_host()
exit_failed
fi
- echo "Please insert a USB key (nothing will be erased)"
- it=0
- false
- while [ "$?" != 0 ] && [ $it -le 20 ]; do
- it=$((it+1))
- sleep 2
- dmesg | tail | grep "Attached SCSI removable disk"
- done
+ wait_key_insertion "upper"
+ check_usb_key
- mount `ls /dev/sd*1` /mnt/mmc && ls /mnt/mmc/
- if [ "$?" == 0 ]; then
- df -h
- echo_test_ok
- fi
- umount /mnt/mmc
+ wait_key_removal
+
+ wait_key_insertion "lower"
+ check_usb_key
+
+ wait_key_removal
+
+ echo_test_ok
}
test_usb_host
diff --git a/target/test/test_watchdog.sh b/target/test/test_watchdog.sh
index 3293aea..92f5c38 100755
--- a/target/test/test_watchdog.sh
+++ b/target/test/test_watchdog.sh
@@ -21,8 +21,8 @@ test_watchdog()
{
show_test_banner "Watchdog"
- ask_user "This test will reboot your board. Continue ? (y/n)"
- if [ "$response" != "y" ]; then
+ ask_user "This test will reboot your board. Continue ? (y/N)"
+ if [ "$response" != "y" ] && [ "$response" != "yes" ]; then
exit_failed
fi
hooks/post-receive
--
armadeus
|