Commit 2e73854c authored by unknown's avatar unknown

ndb - autotest

  use newly created script for faster handling of several configurations


ndb/test/run-test/make-config.sh:
  put cluster config in same config as distribution config
ndb/test/run-test/ndb-autotest.sh:
  1) install mysql_db 
  2) use make-config script
parent 60a0cbd8
...@@ -7,6 +7,7 @@ node_id=1 ...@@ -7,6 +7,7 @@ node_id=1
dir_file=/tmp/dirs.$$ dir_file=/tmp/dirs.$$
config_file=/tmp/config.$$ config_file=/tmp/config.$$
cluster_file=/tmp/cluster.$$
add_procs(){ add_procs(){
type=$1; shift type=$1; shift
...@@ -55,6 +56,7 @@ add_proc (){ ...@@ -55,6 +56,7 @@ add_proc (){
} }
cnf=/dev/null
cat $1 | while read line cat $1 | while read line
do do
case $line in case $line in
...@@ -65,20 +67,29 @@ do ...@@ -65,20 +67,29 @@ do
ndb:*) add_procs ndb `echo $line | sed 's/ndb[ ]*:[ ]*//g'`;; ndb:*) add_procs ndb `echo $line | sed 's/ndb[ ]*:[ ]*//g'`;;
mysqld:*) add_procs mysqld `echo $line | sed 's/mysqld[ ]*:[ ]*//g'`;; mysqld:*) add_procs mysqld `echo $line | sed 's/mysqld[ ]*:[ ]*//g'`;;
mysql:*) add_procs mysql `echo $line | sed 's/mysql[ ]*:[ ]*//g'`;; mysql:*) add_procs mysql `echo $line | sed 's/mysql[ ]*:[ ]*//g'`;;
"-- cluster config")
if [ "$cnf" = "/dev/null" ]
then
cnf=$cluster_file
else
cnf=/dev/null
fi
;;
*) echo $line >> $cnf
esac esac
done done
cat $dir_file | xargs mkdir cat $dir_file | xargs mkdir -p
if [ "$2" ] if [ -f $cluster_file ]
then then
cat $2 $config_file >> /tmp/config2.$$ cat $cluster_file $config_file >> /tmp/config2.$$
mv /tmp/config2.$$ $config_file mv /tmp/config2.$$ $config_file
fi fi
for i in `find . -type d -name '*.ndb_mgmd'` for i in `find . -type d -name '*.ndb_mgmd'`
do do
cp $config_file $i/config.ini cp $config_file $i/config.ini
done done
rm -f $config_file $dir_file rm -f $config_file $dir_file $cluster_file
#!/bin/sh #!/bin/sh
save_args=$* save_args=$*
VERSION="ndb-autotest.sh version 1.0" VERSION="ndb-autotest.sh version 1.01"
DATE=`date '+%Y-%m-%d'` DATE=`date '+%Y-%m-%d'`
export DATE export DATE
...@@ -76,6 +76,7 @@ then ...@@ -76,6 +76,7 @@ then
eval $configure --prefix=$run_dir eval $configure --prefix=$run_dir
make make
make install make install
(cd $run_dir; ./bin/mysql_install_db)
fi fi
### ###
...@@ -103,6 +104,8 @@ fi ...@@ -103,6 +104,8 @@ fi
test_dir=$run_dir/mysql-test/ndb test_dir=$run_dir/mysql-test/ndb
atrt=$test_dir/atrt atrt=$test_dir/atrt
html=$test_dir/make-html-reports.sh html=$test_dir/make-html-reports.sh
mkconfig=$run_dir/mysql-test/ndb/make-config.sh
PATH=$test_dir:$PATH PATH=$test_dir:$PATH
export PATH export PATH
...@@ -214,7 +217,7 @@ do ...@@ -214,7 +217,7 @@ do
run_hosts=`echo $avail_hosts| awk '{for(i=1;i<='$count';i++)print $i;}'` run_hosts=`echo $avail_hosts| awk '{for(i=1;i<='$count';i++)print $i;}'`
choose $run_dir/d.template $run_hosts > $run_dir/d.txt choose $run_dir/d.template $run_hosts > $run_dir/d.txt
choose $run_dir/1.ndb_mgmd/initconfig.template $run_hosts > $run_dir/1.ndb_mgmd/config.ini (cd $run_dir; $mkconfig d.txt )
echo $run_hosts >> /tmp/filter_hosts.$$ echo $run_hosts >> /tmp/filter_hosts.$$
cd $run_dir cd $run_dir
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment