ctdb-tests: Allow modularisation of event script testing support
authorMartin Schwenke <martin@meltin.net>
Wed, 7 Feb 2018 18:57:44 +0000 (05:57 +1100)
committerAmitay Isaacs <amitay@samba.org>
Wed, 28 Mar 2018 00:57:17 +0000 (02:57 +0200)
local.sh is enormous.  Allow per-event-script customisation.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/eventscripts/scripts/local.sh

index d525c8d0961824ffbfe2f479df18dff488ea27b7..0bfd66839b5a1b664d64843e53947fe971455b32 100644 (file)
@@ -1283,6 +1283,11 @@ define_test ()
 
     printf "%-17s %-10s %-4s - %s\n\n" "$script" "$event" "$_num" "$desc"
 
+    _f="${TEST_SUBDIR}/scripts/${script}.sh"
+    if [ -r "$_f" ] ; then
+           . "$_f"
+    fi
+
     ctdb_set_pnn 0
 }