Test binaries now go in tests/bin and ctdb_test_env now adds this
authorMartin Schwenke <martin@meltin.net>
Fri, 9 Jan 2009 07:15:06 +0000 (18:15 +1100)
committerMartin Schwenke <martin@meltin.net>
Fri, 9 Jan 2009 07:15:06 +0000 (18:15 +1100)
directory to $PATH if local daemons are being used.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a497010f67d6a8e68f4d6d7e516b88d2261b1062)

ctdb/.gitignore
ctdb/Makefile.in
ctdb/ib/config.m4
ctdb/tests/scripts/ctdb_test_env

index b84c67690999997d17e20729fd134c72ca5448df..4830cd8b2b3418103a8580677a254ca6b440d8a5 100644 (file)
@@ -18,4 +18,5 @@ nodes.txt
 public_addresses.txt
 rec.lock
 test.db
+tests/bin
 tests/var
index 7db495cb21c98ecef1596f2c4507b0b66851e548..92840787c161640c059b616fe0d380e6481c9fe3 100755 (executable)
@@ -56,14 +56,15 @@ CTDB_SERVER_OBJ = server/ctdbd.o server/ctdb_daemon.o server/ctdb_lockwait.o \
        server/ctdb_keepalive.o server/ctdb_logging.o server/ctdb_uptime.c \
        $(CTDB_CLIENT_OBJ) $(CTDB_TCP_OBJ) @INFINIBAND_WRAPPER_OBJ@
 
-TEST_BINS=bin/ctdb_bench bin/ctdb_fetch bin/ctdb_store bin/ctdb_randrec bin/ctdb_persistent \
-       bin/ctdb_traverse bin/rb_test bin/ctdb_transaction \
+TEST_BINS=tests/bin/ctdb_bench tests/bin/ctdb_fetch tests/bin/ctdb_store \
+       tests/bin/ctdb_randrec tests/bin/ctdb_persistent \
+       tests/bin/ctdb_traverse tests/bin/rb_test tests/bin/ctdb_transaction \
        @INFINIBAND_BINS@
 
 BINS = bin/ctdb @CTDB_SCSI_IO@ bin/ctdb_ipmux bin/smnotify
 SBINS = bin/ctdbd
 
-DIRS = lib bin
+DIRS = lib bin tests/bin
 
 .SUFFIXES: .c .o .h .1 .1.xml .1.html
 
@@ -114,39 +115,39 @@ utils/smnotify/gen_smnotify.c: utils/smnotify/smnotify.x utils/smnotify/smnotify
        @echo Generating $@
        rpcgen -l utils/smnotify/smnotify.x > utils/smnotify/gen_smnotify.c 
 
-bin/rb_test: $(CTDB_CLIENT_OBJ) tests/src/rb_test.o 
+tests/bin/rb_test: $(CTDB_CLIENT_OBJ) tests/src/rb_test.o 
        @echo Linking $@
        @$(CC) $(CFLAGS) -o $@ tests/src/rb_test.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
 
-bin/ctdb_bench: $(CTDB_CLIENT_OBJ) tests/src/ctdb_bench.o 
+tests/bin/ctdb_bench: $(CTDB_CLIENT_OBJ) tests/src/ctdb_bench.o 
        @echo Linking $@
        @$(CC) $(CFLAGS) -o $@ tests/src/ctdb_bench.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
 
-bin/ctdb_fetch: $(CTDB_CLIENT_OBJ) tests/src/ctdb_fetch.o 
+tests/bin/ctdb_fetch: $(CTDB_CLIENT_OBJ) tests/src/ctdb_fetch.o 
        @echo Linking $@
        @$(CC) $(CFLAGS) -o $@ tests/src/ctdb_fetch.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
 
-bin/ctdb_store: $(CTDB_CLIENT_OBJ) tests/src/ctdb_store.o 
+tests/bin/ctdb_store: $(CTDB_CLIENT_OBJ) tests/src/ctdb_store.o 
        @echo Linking $@
        @$(CC) $(CFLAGS) -o $@ tests/src/ctdb_store.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
 
-bin/ctdb_traverse: $(CTDB_CLIENT_OBJ) tests/src/ctdb_traverse.o 
+tests/bin/ctdb_traverse: $(CTDB_CLIENT_OBJ) tests/src/ctdb_traverse.o 
        @echo Linking $@
        @$(CC) $(CFLAGS) -o $@ tests/src/ctdb_traverse.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
 
-bin/ctdb_randrec: $(CTDB_CLIENT_OBJ) tests/src/ctdb_randrec.o 
+tests/bin/ctdb_randrec: $(CTDB_CLIENT_OBJ) tests/src/ctdb_randrec.o 
        @echo Linking $@
        @$(CC) $(CFLAGS) -o $@ tests/src/ctdb_randrec.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
 
-bin/ctdb_persistent: $(CTDB_CLIENT_OBJ) tests/src/ctdb_persistent.o 
+tests/bin/ctdb_persistent: $(CTDB_CLIENT_OBJ) tests/src/ctdb_persistent.o 
        @echo Linking $@
        @$(CC) $(CFLAGS) -o $@ tests/src/ctdb_persistent.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
 
-bin/ctdb_transaction: $(CTDB_CLIENT_OBJ) tests/src/ctdb_transaction.o 
+tests/bin/ctdb_transaction: $(CTDB_CLIENT_OBJ) tests/src/ctdb_transaction.o 
        @echo Linking $@
        @$(CC) $(CFLAGS) -o $@ tests/src/ctdb_transaction.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
 
-bin/ibwrapper_test: $(CTDB_CLIENT_OBJ) ib/ibwrapper_test.o
+tests/bin/ibwrapper_test: $(CTDB_CLIENT_OBJ) ib/ibwrapper_test.o
        @echo Linking $@
        @$(CC) $(CFLAGS) -o $@ ib/ibwrapper_test.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
 
index 9d95ea7a5ab526a884a0461a6f1d0b73293894f9..47d6facd34ff0769aaf9f5138cf0d2b7f295f0a5 100644 (file)
@@ -9,7 +9,7 @@ if eval "test x$enable_infiniband = xyes"; then
 
        INFINIBAND_WRAPPER_OBJ="ib/ibwrapper.o ib/ibw_ctdb.o ib/ibw_ctdb_init.o"
        INFINIBAND_LIBS="-lrdmacm -libverbs"
-       INFINIBAND_BINS="bin/ibwrapper_test"
+       INFINIBAND_BINS="tests/bin/ibwrapper_test"
 
        AC_CHECK_HEADERS(infiniband/verbs.h, [], [
                echo "ERROR: you need infiniband/verbs.h when ib enabled!"
index a5030852a4231331641d3ca48f8888cd3a022e16..5c3006e25d6747cddec6e3310b71d96b8a40f891 100755 (executable)
@@ -6,7 +6,6 @@ var_dir=$CTDB_DIR/tests/var
 
 ######################################################################
 
-ctdb_bin_dir=$CTDB_DIR/bin
 ctdb_tools_dir=$CTDB_DIR/tools
 
 PATH="${ctdb_test_scripts_dir}:${ctdb_tools_dir}:${PATH}"
@@ -32,8 +31,7 @@ if [ ! -n "$CTDB_TEST_REAL_CLUSTER" ] ; then
        CTDB_NODES_SOCKETS="${CTDB_NODES_SOCKETS}${CTDB_NODES_SOCKETS:+ }${var_dir}/sock.${i}"
     done
 
-
-    PATH="${ctdb_bin_dir}:${PATH}"
+    PATH="${CTDB_DIR}/bin:${CTDB_DIR}/tests/bin:${PATH}"
 fi
 
 # If $VALGRIND is set then use it whenever ctdb is called, but only if