[Armadeus-commitlog] SF.net SVN: armadeus:[1027] trunk/target/test
Brought to you by:
sszy
|
From: <ar...@us...> - 2009-01-27 21:09:53
|
Revision: 1027
http://armadeus.svn.sourceforge.net/armadeus/?rev=1027&view=rev
Author: artemys
Date: 2009-01-27 21:09:49 +0000 (Tue, 27 Jan 2009)
Log Message:
-----------
[TEST] Add dir to store Buildroot packages tests + add mplayer one
Modified Paths:
--------------
trunk/target/test/test_helpers.sh
Added Paths:
-----------
trunk/target/test/packages/
trunk/target/test/packages/test_env.sh
trunk/target/test/packages/test_helpers.sh
trunk/target/test/packages/test_mplayer.sh
trunk/target/test/packages/test_skeleton.sh
Added: trunk/target/test/packages/test_env.sh
===================================================================
--- trunk/target/test/packages/test_env.sh (rev 0)
+++ trunk/target/test/packages/test_env.sh 2009-01-27 21:09:49 UTC (rev 1027)
@@ -0,0 +1 @@
+link ../test_env.sh
\ No newline at end of file
Property changes on: trunk/target/test/packages/test_env.sh
___________________________________________________________________
Added: svn:special
+ *
Added: trunk/target/test/packages/test_helpers.sh
===================================================================
--- trunk/target/test/packages/test_helpers.sh (rev 0)
+++ trunk/target/test/packages/test_helpers.sh 2009-01-27 21:09:49 UTC (rev 1027)
@@ -0,0 +1 @@
+link ../test_helpers.sh
\ No newline at end of file
Property changes on: trunk/target/test/packages/test_helpers.sh
___________________________________________________________________
Added: svn:special
+ *
Added: trunk/target/test/packages/test_mplayer.sh
===================================================================
--- trunk/target/test/packages/test_mplayer.sh (rev 0)
+++ trunk/target/test/packages/test_mplayer.sh 2009-01-27 21:09:49 UTC (rev 1027)
@@ -0,0 +1,54 @@
+#!/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
+
+#DEBUG=True
+EXEC_NAME="mplayer"
+VIDEO_FILE_NAME="$TEMP_DIR/apf27.mpg"
+
+test_mplayer()
+{
+ show_test_banner "Mplayer"
+
+ is_package_installed $EXEC_NAME
+
+ if [ "$?" == 0 ]; then
+ # Wake up LCD
+ echo 0 > /sys/class/graphics/fb0/blank
+ sleep 1
+ # Stop blinking cursor
+ echo 0 > /sys/class/graphics/fbcon/cursor_blink
+ # Get video
+ echo "Downloading file from Internet"
+ # Suppose that network was correctly set before
+ wget http://dl.free.fr/jVwLTYA1T -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
+ fi
+ # Make cursor blink again
+ echo 1 > /sys/class/graphics/fbcon/cursor_blink
+ rm -f "$VIDEO_FILE_NAME"
+ exit_failed
+}
+
+test_mplayer
+
Property changes on: trunk/target/test/packages/test_mplayer.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/target/test/packages/test_skeleton.sh
===================================================================
--- trunk/target/test/packages/test_skeleton.sh (rev 0)
+++ trunk/target/test/packages/test_skeleton.sh 2009-01-27 21:09:49 UTC (rev 1027)
@@ -0,0 +1,39 @@
+#!/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
+
+#DEBUG=True
+EXEC_NAME="echo"
+
+
+test_skeleton()
+{
+ show_test_banner "Example"
+
+ is_package_installed $EXEC_NAME
+
+ if [ "$?" == 0 ]; then
+ # Launch it
+ $EXEC_NAME some parameters ...
+ if [ "$?" == 0 ]; then
+ echo_test_ok
+ exit 0
+ fi
+ fi
+ exit_failed
+}
+
+test_skeleton
+
Property changes on: trunk/target/test/packages/test_skeleton.sh
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/target/test/test_helpers.sh
===================================================================
--- trunk/target/test/test_helpers.sh 2009-01-20 15:55:03 UTC (rev 1026)
+++ trunk/target/test/test_helpers.sh 2009-01-27 21:09:49 UTC (rev 1027)
@@ -74,3 +74,14 @@
exit 1
}
+is_package_installed()
+{
+ EXE=`which $1 | head -n 1`
+ if [ -x "$EXE" ]; then
+ debug "$EXE"
+ return 0
+ else
+ return 1
+ fi
+}
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|