Tests: eventscripts and onnode tests use stubs/ subdirectory instead of bin/.
authorMartin Schwenke <martin@meltin.net>
Thu, 7 Jul 2011 06:17:52 +0000 (16:17 +1000)
committerMartin Schwenke <martin@meltin.net>
Wed, 3 Aug 2011 05:55:35 +0000 (15:55 +1000)
This sets up a more useful convention and avoids future .gitignore
problems.

Resolved conflict while cherry-picking this:

  Don't take the eventscripts files for this branch.  We'll put them
  elsewhere.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a9879e37d4e3bb714ef6c0c4144c6949daec0b53)

ctdb/tests/onnode/README
ctdb/tests/onnode/common.sh
ctdb/tests/onnode/stubs/ctdb [moved from ctdb/tests/onnode/bin/ctdb with 100% similarity]
ctdb/tests/onnode/stubs/onnode-buggy-001 [moved from ctdb/tests/onnode/bin/onnode-buggy-001 with 100% similarity]
ctdb/tests/onnode/stubs/ssh [moved from ctdb/tests/onnode/bin/ssh with 100% similarity]

index 1bbf7af5a59dc7c9b6014d025ffcda569fb65c28..58943d3845f95d10d5e5ab0a1e215615005f7ee5 100644 (file)
@@ -17,7 +17,7 @@ Examples:
 
 * ONNODE=onnode-buggy-001 ./run_tests.sh -s
 
-  Run against bin/onnode-buggy-001 instead of default onnode version.
+  Run against stubs/onnode-buggy-001 instead of default onnode version.
 
   Add more buggy versions of onnode to this directory as bugs are
   fixed to enable test validation using this feature.
@@ -26,7 +26,7 @@ Examples:
 
   Run only the specified tests.
 
-* ONNODE="bash -x bin/onnode-buggy-001" ./run_tests.sh ./0090.sh
+* ONNODE="bash -x stubs/onnode-buggy-001" ./run_tests.sh ./0090.sh
   ONNODE="bash -x ../../tools/onnode" ./run_tests.sh ./0090.sh
 
   Debug the specified test or test failure.  The test will fail
index e4cca321627e846c963521bdc4257ed43fe9d15c..f920bc398a687cdebf3a6863d797df4a5425d450 100644 (file)
@@ -6,10 +6,10 @@ unset CTDB_NODES_SOCKETS
 # Default to just "onnode".
 : ${ONNODE:=onnode}
 
-# Augment PATH with relevant bin/ directories.
+# Augment PATH with relevant stubs/ directories.
 
-if [ -d "${ONNODE_TESTS_DIR}/bin" ] ; then
-    PATH="${ONNODE_TESTS_DIR}/bin:$PATH"
+if [ -d "${ONNODE_TESTS_DIR}/stubs" ] ; then
+    PATH="${ONNODE_TESTS_DIR}/stubs:$PATH"
 fi
 
 export ONNODE_TESTCASE_DIR=$(dirname "$0")
@@ -17,8 +17,8 @@ if [ $(basename "$ONNODE_TESTCASE_DIR") = "onnode" ] ; then
     # Just a test script, no testcase subdirectory.
     ONNODE_TESTCASE_DIR="$ONNODE_TESTS_DIR"
 else
-    if [ -d "${ONNODE_TESTCASE_DIR}/bin" ] ; then
-       PATH="${ONNODE_TESTCASE_DIR}/bin:$PATH"
+    if [ -d "${ONNODE_TESTCASE_DIR}/stubs" ] ; then
+       PATH="${ONNODE_TESTCASE_DIR}/stubs:$PATH"
     fi
 fi