summaryrefslogtreecommitdiff
path: root/ctdb/wscript
Commit message (Collapse)AuthorAgeFilesLines
* build: Remove workaround for missing os.path.relpath in Python < 2.6Andrew Bartlett2019-11-131-1/+1
| | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Mulder <dmulder@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* ctdb-tests: Add ctdb-db-test toolMartin Schwenke2019-10-241-0/+6
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Drop setting of test state directory for testonly targetMartin Schwenke2019-10-221-1/+1
| | | | | | | This is the default and deciding this should be left to run_tests.sh. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Enable printing of logs on failure in autobuildMartin Schwenke2019-10-221-1/+1
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Add cluster.bash include fileMartin Schwenke2019-10-041-0/+1
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Move simple tests to INTEGRATION/ subdirectoryMartin Schwenke2019-09-261-2/+2
| | | | | | | | Split some tests out into database/ and failover/ subdirectories. Rename the remaining tests in simple/. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Move complex tests to CLUSTER/ subdirectoryMartin Schwenke2019-09-261-1/+1
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Convert local daemons include file into top-level includeMartin Schwenke2019-09-261-1/+3
| | | | | | | | | | | | | Do the same with the alternative code for real clusters. Both of these can now be used by other test suites. Fix some basic shellcheck warnings (e.g. avoid word-splitting by quoting) while moving code and add the new files to the shellcheck test. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Move tool tests to UNIT/ subdirectoryMartin Schwenke2019-09-261-2/+1
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Move takeover_helper tests to UNIT/ subdirectoryMartin Schwenke2019-09-261-1/+0
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Move takeover tests to UNIT/ subdirectoryMartin Schwenke2019-09-261-1/+0
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Move shellcheck tests to UNIT/ subdirectoryMartin Schwenke2019-09-261-1/+0
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Move onnode tests to UNIT/ subdirectoryMartin Schwenke2019-09-261-1/+0
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Move eventscript tests to UNIT/ subdirectoryMartin Schwenke2019-09-261-1/+0
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Move eventd tests to UNIT/ subdirectoryMartin Schwenke2019-09-261-1/+0
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Move cunit tests to UNIT/ subdirectoryMartin Schwenke2019-09-261-1/+1
| | | | | | | | The UNIT subdirectory directory will contain all unit tests. Use an uppercase name to avoid conflicts with source code subdirectories. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Drop reference to unused ctdb_eventd test directoryMartin Schwenke2019-09-171-1/+0
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* build: remove unneeded libceph-common dependencyBjörn Baumbach2019-09-021-2/+1
| | | | | | | | | | | | | librados and libcephfs are both dependent on ceph-common, but ctdb_mutex_ceph_rados_helper and vfs_ceph needn't be explicitly linked against it. Signed-off-by: Björn Baumbach <bb@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Sep 2 03:44:24 UTC 2019 on sn-devel-184
* build: drop --with-libcephfs=<path> supportDavid Disseldorp2019-09-021-11/+6
| | | | | | | | | | --with-libcephfs=<path> provides a mechanism for explicitly specifying header and library paths for Ceph. This adds unnecessary complexity and can be achieved using generic compiler environment variables (e.g. GCC LIBRARY_PATH and C_INCLUDE_PATH), so drop --with-libcephfs support. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ctdb-tests: Simplify test_wrap scriptMartin Schwenke2019-08-141-8/+4
| | | | | | | Given other improvements, this is now needlessly complex. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Avoid shellcheck warning SC2155Martin Schwenke2019-08-141-2/+2
| | | | | | | | | | | | SC2155 Declare and assign separately to avoid masking return values The wscript changes require an identical change in local_daemons.sh. While touching the lines in wscript, escape the backslashes to make them literal backslashes. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb: fix compilation on systems with glibc robust mutexesRalph Boehme2019-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | On older systems like SLES 11 without POSIX robust mutexes, but with glib robust mutexes where all the functions are available but have a "_np" suffix, compilation fails in: ctdb/tests/src/test_mutex_raw.c.239.o: In function `worker': /root/samba-4.10.6/bin/default/../../ctdb/tests/src/test_mutex_raw.c:129: undefined reference to `pthread_mutex_consistent' ctdb/tests/src/test_mutex_raw.c.239.o: In function `main': /root/samba-4.10.6/bin/default/../../ctdb/tests/src/test_mutex_raw.c:285: undefined reference to `pthread_mutex_consistent' /root/samba-4.10.6/bin/default/../../ctdb/tests/src/test_mutex_raw.c:332: undefined reference to `pthread_mutexattr_setrobust' /root/samba-4.10.6/bin/default/../../ctdb/tests/src/test_mutex_raw.c:363: undefined reference to `pthread_mutex_consistent' collect2: ld returned 1 exit status This could be fixed by using libreplace system/threads.h instead of pthreads.h directly, but as there has been a desire to keep test_mutex_raw.c standalone and compilable without other external depenencies then libc and libpthread, make the tool developer build only. This should get the average user over the cliff. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14038 RN: Fix compiling ctdb on older systems lacking POSIX robust mutexes Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-mutex: Change parent checking to use an asynchronous computationMartin Schwenke2019-07-261-1/+3
| | | | | | | | | Put the checking for the process being immediately re-parented into the computation too. This will be very rare and doing it consistently makes testing saner. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Add cluster mutex testsMartin Schwenke2019-07-261-0/+5
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-build: Tweak hacking of rpcgen outputMartin Schwenke2019-07-051-1/+1
| | | | | | | | | csbuild doesn't like the hack where variable buf is initialised to itself to avoid an unused variable warning. buf is unused so remove it instead. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb/build: fix ctdb_mutex_ceph_rados_helper buildsDavid Disseldorp2019-05-091-1/+4
| | | | | | | | | | | | 2b5dbb352553699afce62dca4964eb0bd64477f8 fixed builds with an explicit --with-libcephfs but broke builds against system Ceph libraries. This change handles both cases. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Thu May 9 04:24:56 UTC 2019 on sn-devel-184
* ctdb-tests: Don't clean up test var directory in autotest targetMartin Schwenke2019-05-071-1/+1
| | | | | | | | | | | | | | | | If the directory is always cleaned up then it is not possible to look at daemon logs to debug test failures. This target is only really used by autobuild.py, which (optionally) cleans up the parent directory anyway. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13924 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): Tue May 7 06:56:01 UTC 2019 on sn-devel-184
* ctdb-build: Add check for getrusage()Martin Schwenke2019-05-071-0/+1
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* build: add explicit cephfs include path for vfs_ceph buildsDavid Disseldorp2019-04-121-1/+1
| | | | | | | Needed if building with a custom --with-libcephfs path. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* build: Standardise on calling conf.SAMBA_CHECK_PYTHON() in librariesAndrew Bartlett2019-03-211-2/+4
| | | | | | | | | | | | | We do this by removing the confusing mandatory option to conf.SAMBA_CHECK_PYTHON{,_HEADERS}(), instead just use the value of --disable-python internally This follows the default minimum of Python 3.4 and keeps things consistent with the main Samba build where --disable-python is required to skip building python bindings. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* build: Remove manual specification of minimum python versionAndrew Bartlett2019-03-211-1/+1
| | | | | | | We now used the default of 3.4 from conf.SAMBA_CHECK_PYTHON() Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* ctdb-version: Simplify version string usageAmitay Isaacs2019-03-151-1/+1
| | | | | | | | | | | | | | | There is no need to write SAMBA_VERSION_STRING as CTDB_VERSION_STRING. Wherever required use SAMBA_VERSION_STRING directly. Avoids the confusion with two version.h files. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13789 Signed-off-by: Amitay Isaacs <amitay@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Fri Mar 15 06:31:50 UTC 2019 on sn-devel-144
* ctdb-build: Drop creation of .distversion in tarballMartin Schwenke2019-03-151-8/+0
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13789 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-build: use a fixed ctdb_version.h using SAMBA_VERSION_STRINGStefan Metzmacher2019-03-151-15/+0
| | | | | | | | | | | This way we don't get constant rebuild as SAMBA_VERSION_STRING is "4.7.0pre1.DEVELOPERBUILD" for the binaries under bin/ instead of "4.7.0pre1.GIT.59e51f6". BUG: https://bugzilla.samba.org/show_bug.cgi?id=13789 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-tests: Add test for ctdb_io.cChristof Schmitt2019-02-221-0/+6
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13791 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Fri Feb 22 03:51:37 CET 2019 on sn-devel-144
* ctdb-build: Use open() instead of file() for python3Amitay Isaacs2018-12-181-1/+1
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb/wscript: make use of MODE_{644,744,755,777}Stefan Metzmacher2018-12-051-12/+13
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ctdb/wscript: use python 3.6 compatible functionsStefan Metzmacher2018-12-051-2/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ctdb-tests: Use local_daemons.sh in local_daemons.bashMartin Schwenke2018-11-061-0/+1
| | | | | | | | | The etc-ctdb/ subdirectory containing the event script moves into the top-level tests/ directory because the subdirectory is really now owned by local_daemons.sh instead of simple/. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Add local_daemons.shMartin Schwenke2018-11-061-0/+8
| | | | | | | | | | | This provides a separate script for handling local daemons. It can be used for testing outside of the CTDB simple test suite. It is installed as ctdb_local_daemons. The logic is copied from ctdb/tests/simple/scripts/local_daemons.bash. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-build: Don't set unused variable TEST_BIN_DIRMartin Schwenke2018-11-061-3/+2
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* PY3: make sure print stmt is enclosed by '(' & ')'Noel Power2018-09-191-1/+1
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* PY3: fix some octal literalsNoel Power2018-09-161-11/+11
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ctdb-build: Fix version handling when building tarballMartin Schwenke2018-09-121-8/+14
| | | | | | | | | | | | Split get_version() into 2 functions, so that .distversion file can be created. Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> 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): Wed Sep 12 05:50:46 CEST 2018 on sn-devel-144
* ctdb-build: Use wafsamba's INSTALL_DIR()Martin Schwenke2018-09-111-4/+4
| | | | | | | | install_dir() doesn't work (doesn't respect $DESTDIR) and is only available for backward compatibilty. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* ctdb/wscript: rework how version number is retrievedAlexander Bokovoy2018-09-051-21/+25
| | | | | | | | | Using default context functions before waf initialization occured is prone to error. Postpone calling samba_version.* code until we got default context initialized. Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* cdtb/wscript: use top and out for waf 2.0Alexander Bokovoy2018-09-051-10/+9
| | | | | Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ctdb/wscript: adopt to waf-2.0Alexander Bokovoy2018-09-051-8/+7
| | | | | Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ctdb/wscript: update to handle waf 2.0.4Alexander Bokovoy2018-09-051-2/+3
| | | | | Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ctdb-tests: Extend TCP packet test to also do packet extractionMartin Schwenke2018-08-301-1/+1
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>