[Armadeus-commitlog] SF.net SVN: armadeus:[1034] trunk/target/test/packages/test_python.sh
Brought to you by:
sszy
|
From: <ar...@us...> - 2009-01-29 12:29:39
|
Revision: 1034
http://armadeus.svn.sourceforge.net/armadeus/?rev=1034&view=rev
Author: artemys
Date: 2009-01-29 12:29:32 +0000 (Thu, 29 Jan 2009)
Log Message:
-----------
[TEST] Add script to test Python
Added Paths:
-----------
trunk/target/test/packages/test_python.sh
Added: trunk/target/test/packages/test_python.sh
===================================================================
--- trunk/target/test/packages/test_python.sh (rev 0)
+++ trunk/target/test/packages/test_python.sh 2009-01-29 12:29:32 UTC (rev 1034)
@@ -0,0 +1,58 @@
+#!/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="python"
+PYTHON_FILE="/tmp/test.py"
+
+generate_test_file()
+{
+ cat << EOF > $PYTHON_FILE
+import sys
+
+ print "If you read this then Python is running"
+ sys.exit(0)
+EOF
+}
+
+test_cleanup()
+{
+ rm -f "$PYTHON_FILE"
+ killall $EXEC_NAME
+}
+
+test_python()
+{
+ show_test_banner "Python"
+
+ is_package_installed $EXEC_NAME
+
+ if [ "$?" == 0 ]; then
+ generate_test_file
+ # Launch it
+ $EXEC_NAME $PYTHON_FILE
+ if [ "$?" == 0 ]; then
+ echo_test_ok
+ test_cleanup
+ exit 0
+ fi
+ fi
+ test_cleanup
+ exit_failed
+}
+
+test_python
+
Property changes on: trunk/target/test/packages/test_python.sh
___________________________________________________________________
Added: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|