From 110e92a8dd83ea88774b5810bb71486bf6e75f51 Mon Sep 17 00:00:00 2001 From: Christoph Galuschka Date: Dec 27 2013 16:38:35 +0000 Subject: changed p_mysql to only run on C5/C6 --- diff --git a/tests/p_mysql/0-install_mysqld.sh b/tests/p_mysql/0-install_mysqld.sh index 6c27ed1..46b96f1 100755 --- a/tests/p_mysql/0-install_mysqld.sh +++ b/tests/p_mysql/0-install_mysqld.sh @@ -4,6 +4,13 @@ t_Log "Running $0 - installing and starting mysql server." +if [ $centos_ver -gt 6 ] +then + t_Log 'mysql is only supported on C5 and C6, skipping' + t_CheckExitStatus 0 + exit 0 +fi + # MySQL # starting with 5.10, we have to add mysql55 if [ $centos_ver = 5 ] diff --git a/tests/p_mysql/10_mysqld_conn_test.sh b/tests/p_mysql/10_mysqld_conn_test.sh index 41a5be3..9a9eaf8 100755 --- a/tests/p_mysql/10_mysqld_conn_test.sh +++ b/tests/p_mysql/10_mysqld_conn_test.sh @@ -1,6 +1,14 @@ #!/bin/sh t_Log "Running $0 - mysqld client can talk to mysql server." + +if [ $centos_ver -gt 6 ] +then + t_Log 'mysql is only supported on C5 and C6, skipping' + t_CheckExitStatus 0 + exit 0 +fi + HostName=$(hostname -s) MySqlHostName=$(mysql -N -B -u root -e "show variables like 'hostname'" | cut -f 2 | cut -d . -f 1) # printing both variables for debugging purposes diff --git a/tests/p_mysql/15_mysqld_create_db.sh b/tests/p_mysql/15_mysqld_create_db.sh index 3c0b911..9697590 100755 --- a/tests/p_mysql/15_mysqld_create_db.sh +++ b/tests/p_mysql/15_mysqld_create_db.sh @@ -2,5 +2,13 @@ # Author: Athmane Madjoudj t_Log "Running $0 - MySQL create database test" + +if [ $centos_ver -gt 6 ] +then + t_Log 'mysql is only supported on C5 and C6, skipping' + t_CheckExitStatus 0 + exit 0 +fi + mysql -u root -e 'create database mysql_test' >/dev/null 2>&1 t_CheckExitStatus $? diff --git a/tests/p_mysql/20_mysqld_drop_db.sh b/tests/p_mysql/20_mysqld_drop_db.sh index b1db254..d2ded67 100755 --- a/tests/p_mysql/20_mysqld_drop_db.sh +++ b/tests/p_mysql/20_mysqld_drop_db.sh @@ -2,5 +2,13 @@ # Author: Athmane Madjoudj t_Log "Running $0 - MySQL drop database test." + +if [ $centos_ver -gt 6 ] +then + t_Log 'mysql is only supported on C5 and C6, skipping' + t_CheckExitStatus 0 + exit 0 +fi + mysql -u root -e 'drop database mysql_test' >/dev/null 2>&1 t_CheckExitStatus $? diff --git a/tests/p_mysql/25_mysqld_grant_test.sh b/tests/p_mysql/25_mysqld_grant_test.sh index da21c00..e6e9704 100755 --- a/tests/p_mysql/25_mysqld_grant_test.sh +++ b/tests/p_mysql/25_mysqld_grant_test.sh @@ -3,6 +3,13 @@ t_Log "Running $0 - MySQL GRANT privileges test" +if [ $centos_ver -gt 6 ] +then + t_Log 'mysql is only supported on C5 and C6, skipping' + t_CheckExitStatus 0 + exit 0 +fi + mysql -u root -e 'create database mysql_test;' > /dev/null 2>&1 mysql -u root -e "grant all on mysql_test.* to mysql_test@localhost identified by 'mysqltest'" > /dev/null 2>&1 mysql -u root -e "flush privileges;" > /dev/null 2>&1 diff --git a/tests/p_mysql/60_mysqld55_conn_test.sh b/tests/p_mysql/60_mysqld55_conn_test.sh index 41a5be3..9a9eaf8 100755 --- a/tests/p_mysql/60_mysqld55_conn_test.sh +++ b/tests/p_mysql/60_mysqld55_conn_test.sh @@ -1,6 +1,14 @@ #!/bin/sh t_Log "Running $0 - mysqld client can talk to mysql server." + +if [ $centos_ver -gt 6 ] +then + t_Log 'mysql is only supported on C5 and C6, skipping' + t_CheckExitStatus 0 + exit 0 +fi + HostName=$(hostname -s) MySqlHostName=$(mysql -N -B -u root -e "show variables like 'hostname'" | cut -f 2 | cut -d . -f 1) # printing both variables for debugging purposes diff --git a/tests/p_mysql/65_mysqld55_create_db.sh b/tests/p_mysql/65_mysqld55_create_db.sh index 3c0b911..9697590 100755 --- a/tests/p_mysql/65_mysqld55_create_db.sh +++ b/tests/p_mysql/65_mysqld55_create_db.sh @@ -2,5 +2,13 @@ # Author: Athmane Madjoudj t_Log "Running $0 - MySQL create database test" + +if [ $centos_ver -gt 6 ] +then + t_Log 'mysql is only supported on C5 and C6, skipping' + t_CheckExitStatus 0 + exit 0 +fi + mysql -u root -e 'create database mysql_test' >/dev/null 2>&1 t_CheckExitStatus $? diff --git a/tests/p_mysql/70_mysqld55_drop_db.sh b/tests/p_mysql/70_mysqld55_drop_db.sh index b1db254..d2ded67 100755 --- a/tests/p_mysql/70_mysqld55_drop_db.sh +++ b/tests/p_mysql/70_mysqld55_drop_db.sh @@ -2,5 +2,13 @@ # Author: Athmane Madjoudj t_Log "Running $0 - MySQL drop database test." + +if [ $centos_ver -gt 6 ] +then + t_Log 'mysql is only supported on C5 and C6, skipping' + t_CheckExitStatus 0 + exit 0 +fi + mysql -u root -e 'drop database mysql_test' >/dev/null 2>&1 t_CheckExitStatus $? diff --git a/tests/p_mysql/75_mysqld55_grant_test.sh b/tests/p_mysql/75_mysqld55_grant_test.sh index da21c00..e6e9704 100755 --- a/tests/p_mysql/75_mysqld55_grant_test.sh +++ b/tests/p_mysql/75_mysqld55_grant_test.sh @@ -3,6 +3,13 @@ t_Log "Running $0 - MySQL GRANT privileges test" +if [ $centos_ver -gt 6 ] +then + t_Log 'mysql is only supported on C5 and C6, skipping' + t_CheckExitStatus 0 + exit 0 +fi + mysql -u root -e 'create database mysql_test;' > /dev/null 2>&1 mysql -u root -e "grant all on mysql_test.* to mysql_test@localhost identified by 'mysqltest'" > /dev/null 2>&1 mysql -u root -e "flush privileges;" > /dev/null 2>&1