tests: Update integration.sh to use TEST_VAR_DIR
authorMartin Schwenke <martin@meltin.net>
Tue, 24 Apr 2012 01:39:07 +0000 (11:39 +1000)
committerMartin Schwenke <martin@meltin.net>
Fri, 27 Apr 2012 05:42:42 +0000 (15:42 +1000)
commit301491802eec0e49e108f5aae7d7be379703d72c
tree41cd97ec8374b340ea6e0c3d308820360fc150e5
parent8e4ec9a40bb7d392d7474b067a74fa121c069007
tests: Update integration.sh to use TEST_VAR_DIR

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>
tests/scripts/integration.bash