diff options
author | unknown <tomas@poseidon.(none)> | 2004-05-27 07:04:45 +0000 |
---|---|---|
committer | unknown <tomas@poseidon.(none)> | 2004-05-27 07:04:45 +0000 |
commit | c41b0e48c9bf6b6ac4a574261b9f09905484b106 (patch) | |
tree | 90c3cd703ab050cc2aaca70e8722bfc4d782a713 /mysql-test/ndb | |
parent | 34e7ad059a88574c0f69a3f444f0fede168b8a5d (diff) | |
download | mariadb-git-c41b0e48c9bf6b6ac4a574261b9f09905484b106.tar.gz |
several ndb automake changes, see respective file
ndb/tools/waiter.cpp:
Rename: ndb/test/tools/waiter.cpp -> ndb/tools/waiter.cpp
configure.in:
added install dirs for ndb
ndb/Makefile.am:
ndb headers for install
ndb/config/common.mk.am:
DEFS_LOC in ndb make
ndb/config/type_ndbapi.mk.am:
added LDADD=libNDB_API.la default for type_ndbapi
ndb/src/cw/cpcd/Makefile.am:
changes install dir
ndb/src/kernel/blocks/backup/restore/Makefile.am:
changes install dir
ndb/src/kernel/ndb-main/Makefile.am:
changes install dir
ndb/src/mgmapi/Makefile.am:
changes install dir
ndb/src/mgmclient/Makefile.am:
changes install dir
ndb/src/mgmsrv/Makefile.am:
changes install dir
ndb/src/ndbapi/Makefile.am:
changes install dir
ndb/test/ndbapi/Makefile.am:
changes install dir
ndb/test/ndbapi/bank/Makefile.am:
changes install dir
ndb/test/tools/Makefile.am:
changes install dir
mysql-test/ndb/install_ndbcluster.sh:
new
mysql-test/ndb/stop_ndbcluster.sh:
new
ndb/tools/Makefile.am:
changes install dir
Diffstat (limited to 'mysql-test/ndb')
-rw-r--r-- | mysql-test/ndb/Makefile.am | 27 | ||||
-rwxr-xr-x | mysql-test/ndb/install_ndbcluster.sh (renamed from mysql-test/ndb/install_ndbcluster) | 27 | ||||
-rwxr-xr-x | mysql-test/ndb/stop_ndbcluster.sh (renamed from mysql-test/ndb/stop_ndbcluster) | 12 |
3 files changed, 56 insertions, 10 deletions
diff --git a/mysql-test/ndb/Makefile.am b/mysql-test/ndb/Makefile.am new file mode 100644 index 00000000000..9ab785346da --- /dev/null +++ b/mysql-test/ndb/Makefile.am @@ -0,0 +1,27 @@ + +benchdir_root= $(prefix) +testdir = $(benchdir_root)/mysql-test/ndb + +test_SCRIPTS = \ +install_ndbcluster \ +stop_ndbcluster + +EXTRA_SCRIPTS = \ +install_ndbcluster.sh \ +stop_ndbcluster.sh + +test_DATA = ndb_config_2_node.ini + +SUFFIXES = .sh + +.sh: + @RM@ -f $@ $@-t + @SED@ \ + -e 's!@''ndbbindir''@!$(ndbbindir)!g' \ + -e 's!@''ndbtoolsdir''@!$(ndbtoolsdir)!g' \ + $< > $@-t + @CHMOD@ +x $@-t + @MV@ $@-t $@ + +# Don't update the files from bitkeeper +%::SCCS/s.% diff --git a/mysql-test/ndb/install_ndbcluster b/mysql-test/ndb/install_ndbcluster.sh index 6cb3985b831..acd3b54be8f 100755 --- a/mysql-test/ndb/install_ndbcluster +++ b/mysql-test/ndb/install_ndbcluster.sh @@ -9,8 +9,22 @@ port_base="22" # using ports port_base{"00","01", etc} fsdir=`pwd` # end configurable parameters -libdir=`pwd`/../ndb/lib -bindir=`pwd`/../ndb/bin +# Are we using a source or a binary distribution? + +if [ -d ../sql ] ; then + SOURCE_DIST=1 + ndbtop=../ndb + exec_ndb=$ndbtop/src/kernel/ndb-main/ndb + exec_mgmtsrvr=$ndbtop/src/mgmsrv/mgmtsrvr + exec_waiter=$ndbtop/tools/ndbwaiter + exec_mgmtclient=$ndbtop/src/mgmclient/mgmtclient +else + BINARY_DIST=1 + exec_ndb=@ndbbindir@/ndb + exec_mgmtsrvr=@ndbbindir@/mgmtsrvr + exec_waiter=@ndbtoolsdir@/waiter + exec_mgmtclient=@ndbbindir@/mgmtclient +fi pidfile=ndbcluster.pid @@ -33,8 +47,6 @@ while test $# -gt 0; do shift done -exec_ndb=$bindir/ndb -exec_mgmtsrvr=$bindir/mgmtsrvr fs_ndb=$fsdir/ndbcluster fs_mgm_1=$fs_ndb/1.ndb_mgm fs_ndb_2=$fs_ndb/2.ndb_db @@ -125,15 +137,14 @@ cat `find $fs_ndb -name 'node*.pid'` > $pidfile # Start management client -sleep 5 -echo "show" | $bindir/mgmtclient $ndb_host $ndb_port +sleep 10 +echo "show" | $exec_mgmtclient $ndb_host $ndb_port # test if Ndb Cluster starts properly NDB_ID="11" NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID -#if ( export LD_LIBRARY_PATH=$libdir ; $bindir/list_tables ) | grep "NDBT_ProgramExit: 0 - OK"; then :; else -if ( export LD_LIBRARY_PATH=$libdir ; $bindir/waiter ) | grep "NDBT_ProgramExit: 0 - OK"; then :; else +if ( $exec_waiter ) | grep "NDBT_ProgramExit: 0 - OK"; then :; else echo "Ndbcluster startup failed" exit 1 fi diff --git a/mysql-test/ndb/stop_ndbcluster b/mysql-test/ndb/stop_ndbcluster.sh index e1a98f1de07..bb137c54c81 100755 --- a/mysql-test/ndb/stop_ndbcluster +++ b/mysql-test/ndb/stop_ndbcluster.sh @@ -4,7 +4,15 @@ # This scripts stops the table handler ndbcluster -bindir=`pwd`/../ndb/bin +if [ -d ../sql ] ; then + SOURCE_DIST=1 + ndbtop=../ndb + exec_mgmtclient=$ndbtop/src/mgmclient/mgmtclient +else + BINARY_DIST=1 + exec_mgmtclient=@ndbbindir@/mgmtclient +fi + pidfile=ndbcluster.pid cfgfile=Ndb.cfg @@ -36,7 +44,7 @@ ndb_port=`cat $cfgfile | sed -e "s,.*host=$ndb_host\:\([0-9]*\).*,\1,1"` # Start management client -exec_mgmtclient="$bindir/mgmtclient --try-reconnect=1 $ndb_host $ndb_port" +exec_mgmtclient="$exec_mgmtclient --try-reconnect=1 $ndb_host $ndb_port" echo "$exec_mgmtclient" echo "all stop" | $exec_mgmtclient |