From 59faa8fe9a409a1325ff54aa6f0be6a471bbd100 Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Feb 10 2012 17:27:13 +0000 Subject: Merge branch 'master' of gitorious.org:testautomation/t_functional --- diff --git a/tests/p_bind/0-install_bind.sh b/tests/p_bind/0-install_bind.sh index 2554262..028daf1 100755 --- a/tests/p_bind/0-install_bind.sh +++ b/tests/p_bind/0-install_bind.sh @@ -31,7 +31,7 @@ EOF cp /usr/share/doc/bind-*/sample/etc/named.rfc1912.zones /etc/ cp -R /usr/share/doc/bind-*/sample/var/named/local* /var/named/ cp -R /usr/share/doc/bind-*/sample/var/named/named.* /var/named/ - chown -R named:named /var/named/* /etc/named.* + chown -R root:named /var/named/* /etc/named.* fi t_ServiceControl named start diff --git a/tests/p_busybox/00_install_busybox.sh b/tests/p_busybox/00_install_busybox.sh new file mode 100755 index 0000000..b2cae54 --- /dev/null +++ b/tests/p_busybox/00_install_busybox.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# Author: Christoph Galuschka + +t_Log "Running $0 - attempting to install busybox." +t_InstallPackage busybox + diff --git a/tests/p_busybox/10_test_busybox.sh b/tests/p_busybox/10_test_busybox.sh new file mode 100755 index 0000000..6e59516 --- /dev/null +++ b/tests/p_busybox/10_test_busybox.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# Author: Athmane Madjoudj +# Author: Christoph Galuschka + +t_Log "Running $0 - busybox test: busybox lists available functions." + +busybox | grep -q 'Currently defined functions' +busy_ok=$? +if [ $busy_ok = 1 ] + then + t_Log 'busybox does not seem to list available functions' +fi +t_CheckExitStatus $busy_ok diff --git a/tests/p_busybox/20_functiontest_busybox.sh b/tests/p_busybox/20_functiontest_busybox.sh new file mode 100755 index 0000000..171b1de --- /dev/null +++ b/tests/p_busybox/20_functiontest_busybox.sh @@ -0,0 +1,44 @@ +#!/bin/sh +# Author: Athmane Madjoudj +# Author: Christoph Galuschka + +t_Log "Running $0 - busybox functional tests: busybox provided functions are working." + + +ret_val=0 +busybox | grep -q 'ls,' +if [ $? == 0 ] + then + t_Log "busybox provides 'ls'; testing it" + touch /var/tmp/busybox + busybox ls /var/tmp/ |grep -q busybox + if [ $? == 1 ] + then + t_Log "busybox provides 'ls' but it does not seem to work" + ret_val=1 + else + t_Log "'ls' works" + fi + #cleaning up + /bin/rm /var/tmp/busybox +fi + +busybox | grep -q 'touch,' +if [ $? == 0 ] + then + t_Log "busybox provides 'touch'; testing it" + busybox touch /var/tmp/busybox + ls /var/tmp/ |grep -q busybox + if [ $? == 1 ] + then + t_Log "busybox provides 'touch' but it does not seem to work" + ret_val=1 + else + t_Log "'touch' works" + fi + #cleaning up + /bin/rm /var/tmp/busybox +fi + +t_CheckExitStatus $ret_val + diff --git a/tests/p_tftp-server/20-tftp-server_put-test.sh b/tests/p_tftp-server/20-tftp-server_put-test.sh index 33660c6..d726e5b 100755 --- a/tests/p_tftp-server/20-tftp-server_put-test.sh +++ b/tests/p_tftp-server/20-tftp-server_put-test.sh @@ -1,6 +1,7 @@ #!/bin/sh # Author: Athmane Madjoudj # Christoph Galuschka +# Fabian Arrotin t_Log "Running $0 - tftp-server put file test."