IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
This could all be done in Makefile.in, but that would be very complex.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 12c9986059cacda819e669fa77d613b408c62599)
Only shuts them down if $TEST_CLEANUP is true.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit eddfc02335202d853e29a89f08225ab44cac8a25)
Sets TEST_CLEANUP=true and causes $TEST_VAR_DIR to be removed... and
potentially other cleanup actions in testcases.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 3219f221a858e499f084b8beb44610537312602b)
No need for a default, especially since there is no sane default!
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit b430a5f61cfdc28e967890602ce6dac0e922c07d)
This directory is already guaranteed to be absolute, so no check is
needed.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 78f6f209eb15102f4e8baa9106583df0ef4bb693)
There are 2 subtleties:
* Local daemons currently use the in-tree tests/events.d/ subdirectory
for their eventscripts. However, some tests install/remove test-specific
eventscripts so now $TEST_VAR_DIR/events.d/ is used and the standard
eventscripts are copied there at setup time.
* The pgrep/pkill logic for killing local daemons currently relies on
ctdbd being run with a full path to tests/bin/ctdbd. If the tests
are installed and run against an installed daemon then this won't
work. Therefore, ctdbd is now expected to be in $PATH and is
found/killed by matching:
ctdbd --socket=.* --nlist .* --nopublicipcheck
This is complex but should avoid killing a real ctdbd running on a
node.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 301491802eec0e49e108f5aae7d7be379703d72c)
Part of preparation to be able to install the tests. The current var/
subdirectories will end up somewhere in /usr/local/ or /usr/ and we
don't want to put temporary files there.
This creates a temporary TEST_VAR_DIR by default.
If -V is specified then the given directory will be used as
TEST_VAR_DIR. This allows the current behaviour where individual
integration tests can be run against already-running daemons 9with
sockets and other stuff already created) to save time and trouble.
Yes, there are plans for a clean-up option... ;-)
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 8e4ec9a40bb7d392d7474b067a74fa121c069007)
This is unused and can't be used with the current test infrastructure.
It may have been useful with ctdb_test_env but I don't think it was
ever used.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 4aa879466dd46cb4e8710edbbaac1276521e475b)
tdbdump may not be installed and would be an unnecessary dependency.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit fbabc05569d91bf033f474d89f51b49490943332)
Hardcoding "sh -x" is suboptimal because some scripts, like onnode,
require bash.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 246809af64c03d26288abff5907ed46614e72b15)
* Add the unit tests to "make test"
* Make scripts run from anywhere
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 95947123eee687ed83eebc567397a5bc9d55a945)
Also add a comment to explain what is being added to $PATH.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 704a3e3b83aff63e8f7b0650c141776ed2c1f047)
This is useful for using run_tests to run one test at a time within an
alternative test framework.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit dc71294a33e88baa4e85fa1fa66cab58a83c2607)
Move the contents to integration.bash and run_tests as appropriate.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 6136ab02db261b26a2a58b526c913e37e8146841)
Testing with local daemons is the current default but this is not the
most common use case. Therefore, we make local daemons optional by
using the -l switch with run_tests or by setting TEST_LOCAL_DAEMONS to
the number of daemons to be used (-l sets this to 3).
TEST_LOCAL_DAEMONS replaces CTDB_TEST_NUM_DAEMONS and
CTDB_TEST_REAL_CLUSTER is removed.
Most relevant logic is moved from ctdb_test_env to integration.bash.
ctdb_test_check_real_cluster() is moved from integration.bash to
complex/scripts/local.bash.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 72ecae61c43b318ec94b527a12cbb0a382e8c3db)
* run_tests no longer includes common.sh, which is only to be included
by test cases. Therefore, it defines its own die() function.
* TEST_SUBDIR is now set in common.sh
* Move complex-only functions to complex/scripts/local.bash
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit bfa1d6638d3e116640eb4e3bb71b21ba6ef8cae5)
Move some options from eventscripts/run_tests.sh to scripts/run_tests.
Remove the former.
Move some functions from eventscripts/scripts/local.sh to
scripts/unit.sh.
Both of these are modified during move so they are no longer
eventscript-specific.
Tweak */local.sh so that the new functions in unit.sh are used.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 7ff485687891732074c9fc9998502ca197663d02)
This fixes eventscripts/scripts/local.sh:setup_generic() so that
directories listed in $FAKE_SHARES are absolute instead of potentially
relative (and, therefore, ignored by the NFS share check).
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 8544162b7a4efa23c92bc0d2774df95bb7f0f463)
It currently has my home directory pasted into it. That can't be
right... ;-)
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 5d6e71cf6e1e0665ec96e7e4e2cfd31f40ebabae)
Although not obvious, when asking each node for nodestatus, it will report
each node is the current node.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit a65ba7211ec7f102b32060b173606a61fb5c20a9)
This makes it run all tests in the specified directory.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 89719384a74161ffa0c03602ecdd9e758d521d75)
Along with minor logic tweaks and removal of test_exit().
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 00713eb46cce638339845799bba2da041b3d02fb)
This will be sourced by all unit tests.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit afdaa5f032938d56ff315d9553cb285ebc413c4c)