mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
ctdb-tests: Link to ctdb-ipalloc instead of using ctdbd_test.c
Less code, quicker build time, smaller binary... Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Mon Jul 4 19:29:08 CEST 2016 on sn-devel-144
This commit is contained in:
parent
a2124a1cd8
commit
5a0d1b7cc5
@ -18,13 +18,27 @@
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <talloc.h>
|
||||
|
||||
#include "ctdbd_test.c"
|
||||
#include "replace.h"
|
||||
#include "system/network.h"
|
||||
|
||||
static void print_ctdb_public_ip_list(struct public_ip_list * ips)
|
||||
#include "lib/util/debug.h"
|
||||
|
||||
#include "protocol/protocol.h"
|
||||
#include "protocol/protocol_api.h"
|
||||
#include "common/logging.h"
|
||||
#include "common/system.h"
|
||||
|
||||
#include "server/ipalloc.h"
|
||||
|
||||
static void print_ctdb_public_ip_list(TALLOC_CTX *mem_ctx,
|
||||
struct public_ip_list * ips)
|
||||
{
|
||||
while (ips) {
|
||||
printf("%s %d\n", ctdb_addr_to_str(&(ips->addr)), ips->pnn);
|
||||
printf("%s %d\n",
|
||||
ctdb_sock_addr_to_string(mem_ctx, &(ips->addr)),
|
||||
ips->pnn);
|
||||
ips = ips->next;
|
||||
}
|
||||
}
|
||||
@ -316,7 +330,7 @@ static void ctdb_test_ipalloc(const char nodestates[],
|
||||
ctdb_test_init(tmp_ctx, nodestates, &ipalloc_state,
|
||||
read_ips_for_multiple_nodes);
|
||||
|
||||
print_ctdb_public_ip_list(ipalloc(ipalloc_state));
|
||||
print_ctdb_public_ip_list(tmp_ctx, ipalloc(ipalloc_state));
|
||||
|
||||
talloc_free(tmp_ctx);
|
||||
}
|
||||
|
@ -1,87 +0,0 @@
|
||||
/*
|
||||
ctdbd test include file
|
||||
|
||||
Copyright (C) Martin Schwenke 2011
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _CTDBD_TEST_C
|
||||
#define _CTDBD_TEST_C
|
||||
|
||||
#include "replace.h"
|
||||
#include "system/network.h"
|
||||
|
||||
#include <talloc.h>
|
||||
/* Allow use of deprecated function tevent_loop_allow_nesting() */
|
||||
#define TEVENT_DEPRECATED
|
||||
#include <tevent.h>
|
||||
|
||||
#include "ctdb_private.h"
|
||||
|
||||
/*
|
||||
* Need these, since they're defined in ctdbd.c but we can't include
|
||||
* that.
|
||||
*/
|
||||
int script_log_level;
|
||||
bool fast_start;
|
||||
|
||||
/* CTDB_COMMON_OBJ */
|
||||
#include "common/ctdb_io.c"
|
||||
#include "common/ctdb_util.c"
|
||||
#include "common/ctdb_ltdb.c"
|
||||
#include "common/cmdline.c"
|
||||
|
||||
/* CTDB_SERVER_OBJ */
|
||||
#include "server/ctdb_daemon.c"
|
||||
#include "server/ctdb_recoverd.c"
|
||||
#include "server/ctdb_recover.c"
|
||||
#include "server/ctdb_freeze.c"
|
||||
#include "server/ctdb_tunables.c"
|
||||
#include "server/ctdb_monitor.c"
|
||||
#include "server/ctdb_server.c"
|
||||
#include "server/ctdb_control.c"
|
||||
#include "server/ctdb_call.c"
|
||||
#include "server/ctdb_ltdb_server.c"
|
||||
#include "server/ctdb_traverse.c"
|
||||
#include "server/eventscript.c"
|
||||
#include "server/ipalloc_common.c"
|
||||
#include "server/ipalloc_deterministic.c"
|
||||
#include "server/ipalloc_nondeterministic.c"
|
||||
#include "server/ipalloc_lcp2.c"
|
||||
#include "server/ipalloc.c"
|
||||
#include "server/ctdb_takeover.c"
|
||||
#include "server/ctdb_persistent.c"
|
||||
#include "server/ctdb_keepalive.c"
|
||||
#include "server/ctdb_cluster_mutex.c"
|
||||
#include "server/ctdb_logging.c"
|
||||
#include "server/ctdb_logging_syslog.c"
|
||||
#include "server/ctdb_logging_file.c"
|
||||
#include "server/ctdb_uptime.c"
|
||||
#include "server/ctdb_vacuum.c"
|
||||
#include "server/ctdb_banning.c"
|
||||
#include "server/ctdb_statistics.c"
|
||||
#include "server/ctdb_update_record.c"
|
||||
#include "server/ctdb_lock.c"
|
||||
#include "server/ctdb_fork.c"
|
||||
|
||||
/* CTDB_CLIENT_OBJ */
|
||||
#include "client/ctdb_client.c"
|
||||
|
||||
/* CTDB_TCP_OBJ */
|
||||
#include "tcp/tcp_connect.c"
|
||||
#include "tcp/tcp_io.c"
|
||||
#include "tcp/tcp_init.c"
|
||||
|
||||
#endif /* _CTDBD_TEST_C */
|
@ -704,8 +704,7 @@ def build(bld):
|
||||
source='tests/src/ctdb_takeover_tests.c',
|
||||
deps='''replace popt tdb tevent talloc ctdb-system
|
||||
samba-util tdb-wrap talloc_report
|
||||
ctdb-protocol ctdb-util''' +
|
||||
ib_deps,
|
||||
ctdb-ipalloc ctdb-protocol ctdb-util''',
|
||||
includes='include',
|
||||
install_path='${CTDB_TEST_LIBDIR}')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user