]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: group clusters in a single directory 3322/head
authorLoic Dachary <ldachary@redhat.com>
Thu, 8 Jan 2015 10:11:07 +0000 (11:11 +0100)
committerLoic Dachary <ldachary@redhat.com>
Thu, 8 Jan 2015 11:53:57 +0000 (12:53 +0100)
Group all test directories used for mini clusters into a single
sub-directory (testdir). This is easier to cleanup manually and less
error prone.

http://tracker.ceph.com/issues/10426 Fixes: #10426

Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/test/ceph-helpers.sh
src/test/mon/mon-test-helpers.sh
src/test/vstart_wrapper.sh

index 00e2d82abed3bb2c3e7a7d57b8f4afc7dd11f77e..570543b0d236d4b29181f415bea6bf358af7d792 100755 (executable)
@@ -82,7 +82,7 @@ TIMEOUT=60
 function setup() {
     local dir=$1
     teardown $dir || return 1
-    mkdir $dir
+    mkdir -p $dir
 }
 
 function test_setup() {
@@ -929,7 +929,7 @@ function test_repair() {
 # @return 0 on success, 1 on error
 #
 function main() {
-    local dir=$1
+    local dir=testdir/$1
     shift
 
     set -x
@@ -966,7 +966,7 @@ function run_tests() {
     export CEPH_CONF=/dev/null
 
     local funcs=${@:-$(set | sed -n -e 's/^\(test_[0-9a-z_]*\) .*/\1/p')}
-    local dir=ceph-helpers
+    local dir=testdir/ceph-helpers
 
     for func in $funcs ; do
         $func $dir || return 1
index ca25dd52db2954e638f399f7bb81db3f2e883160..02ab03a222242de05adc3b90fce7ccd30c6976b9 100644 (file)
@@ -20,7 +20,7 @@ source test/test_btrfs_common.sh
 function setup() {
     local dir=$1
     teardown $dir
-    mkdir $dir
+    mkdir -p $dir
 }
 
 function teardown() {
@@ -103,7 +103,7 @@ function call_TEST_functions() {
 }
 
 function main() {
-    local dir=$1
+    local dir=testdir/$1
 
     export PATH=:$PATH # make sure program from sources are prefered
 
index 860cb78a960a388413bcae549d09e76bd32608ea..afeb951d654f2d53bbc21c2c9fca87e866077914 100755 (executable)
@@ -17,7 +17,7 @@
 
 source test/mon/mon-test-helpers.sh
 
-export CEPH_DIR="$PWD/test-$CEPH_PORT"
+export CEPH_DIR="$PWD/testdir/test-$CEPH_PORT"
 export CEPH_DEV_DIR="$CEPH_DIR/dev"
 export CEPH_OUT_DIR="$CEPH_DIR/out"