Commit 2e73854c authored by unknown's avatar unknown
Browse files

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
Loading
Loading
Loading
Loading
+17 −6
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ node_id=1

dir_file=/tmp/dirs.$$
config_file=/tmp/config.$$
cluster_file=/tmp/cluster.$$

add_procs(){
	type=$1; shift
@@ -55,6 +56,7 @@ add_proc (){
}


cnf=/dev/null
cat $1 | while read line
do
	case $line in
@@ -65,14 +67,23 @@ do
	ndb:*) add_procs ndb `echo $line | sed 's/ndb[ ]*:[ ]*//g'`;;
	mysqld:*) add_procs mysqld `echo $line | sed 's/mysqld[ ]*:[ ]*//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
done

cat $dir_file | xargs mkdir
cat $dir_file | xargs mkdir -p

if [ "$2" ]
if [ -f $cluster_file ]
    then
    cat $2 $config_file >> /tmp/config2.$$
    cat $cluster_file $config_file >> /tmp/config2.$$
    mv /tmp/config2.$$ $config_file
fi

@@ -81,4 +92,4 @@ do
  cp $config_file $i/config.ini
done

rm -f $config_file $dir_file
rm -f $config_file $dir_file $cluster_file
+5 −2
Original line number Diff line number Diff line
#!/bin/sh

save_args=$*
VERSION="ndb-autotest.sh version 1.0"
VERSION="ndb-autotest.sh version 1.01"

DATE=`date '+%Y-%m-%d'`
export DATE
@@ -76,6 +76,7 @@ then
	eval $configure --prefix=$run_dir
	make
	make install
	(cd $run_dir; ./bin/mysql_install_db)
fi

###
@@ -103,6 +104,8 @@ fi
test_dir=$run_dir/mysql-test/ndb
atrt=$test_dir/atrt
html=$test_dir/make-html-reports.sh
mkconfig=$run_dir/mysql-test/ndb/make-config.sh

PATH=$test_dir:$PATH
export PATH

@@ -214,7 +217,7 @@ do

	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/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.$$	

	cd $run_dir