]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: save 9 characters for asok paths 12066/head
authorLoic Dachary <ldachary@redhat.com>
Fri, 18 Nov 2016 07:06:02 +0000 (08:06 +0100)
committerLoic Dachary <ldachary@redhat.com>
Fri, 18 Nov 2016 08:19:18 +0000 (09:19 +0100)
For vstart.sh powered tests, save 9 characters in the path name
by replacing testdir/test- with td/t-

60 characters imposed by jenkins
9 characters for src/test
5 characters for td/t-

33 left (instead of 24) for the test to create asok such as out/client.admin.25327.asok

Moving these files outside of the build directory is a bad idea because
tests should only create/use files within the builddir and not write
outside of this directory. Doing so would make things more complicated
for cleanup in case the test fail and create other problems as a
consequence (filling out disk space, conflicting directories between
runs etc.).

For ceph-helpers.sh tests replace testdir with td, saving 5 characters.
This is not strictly necessary but keeps the directory names consistent:
if the developer wants to get rid of all the test leftovers, it is
enough to remove the a single directory: td.

Fixes: http://tracker.ceph.com/issues/16014
Signed-off-by: Loic Dachary <loic@dachary.org>
.gitignore
qa/workunits/ceph-helpers.sh
src/test/vstart_wrapper.sh

index 9d6945994e75f7f6354e8fa707d67f4bbdc2c7b6..eda9b48c5c22727e641a1cab25c0782c619d3dad 100644 (file)
@@ -28,7 +28,7 @@ core
 
 # Files generated by running tests
 *.log
-/src/testdir
+/src/td
 
 # specific local dir files
 /build-doc
index 265dcd227b14eb87bbbad94a367b17aa533d0738..d309001dd80270c7757cf8868d48b514883ef7ab 100755 (executable)
@@ -1457,7 +1457,7 @@ function test_wait_background() {
 # @return 0 on success, 1 on error
 #
 function main() {
-    local dir=testdir/$1
+    local dir=td/$1
     shift
 
     shopt -s -o xtrace
@@ -1496,7 +1496,7 @@ function run_tests() {
     export CEPH_CONF=/dev/null
 
     local funcs=${@:-$(set | sed -n -e 's/^\(test_[0-9a-z_]*\) .*/\1/p')}
-    local dir=testdir/ceph-helpers
+    local dir=td/ceph-helpers
 
     for func in $funcs ; do
         $func $dir || return 1
index da9cf956e33aa3e2288d06feca03fe3d2d36a01f..2e05608799cb7d2efc5bc15c88f176565fc0ca70 100755 (executable)
@@ -19,7 +19,7 @@
 source $CEPH_ROOT/qa/workunits/ceph-helpers.sh
 
 export CEPH_VSTART_WRAPPER=1
-export CEPH_DIR="${TMPDIR:-$PWD}/testdir/test-$CEPH_PORT"
+export CEPH_DIR="${TMPDIR:-$PWD}/td/t-$CEPH_PORT"
 export CEPH_DEV_DIR="$CEPH_DIR/dev"
 export CEPH_OUT_DIR="$CEPH_DIR/out"