diff options
author | Raghavendra Talur <rtalur@redhat.com> | 2015-09-07 00:24:05 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-10-27 07:15:04 -0700 |
commit | d6c7ca9d30ee573dd4620941a5b5dd1a2a4a6e98 (patch) | |
tree | 4eda1bdf0e90b1b9caab3abb3a4088d96ddfd9aa /tests/include.rc | |
parent | 92aec1cd091d23056c76e5b625b40c4766475dbb (diff) |
tests: Separate logs for each test
Change-Id: Ib286e3d4d7c432dab8073fce582ccbf723eb31d2
BUG: 1251592
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/12110
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'tests/include.rc')
-rw-r--r-- | tests/include.rc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/include.rc b/tests/include.rc index fb3002d945e..79fbd6c4b0b 100644 --- a/tests/include.rc +++ b/tests/include.rc @@ -539,6 +539,20 @@ function cleanup() echo return 1; fi >&2 + + # tar logs at the start and end of every test + if [ -n $LOGDIR ] + then + tarname=$(basename $0 .t) + tar -rvf ${LOGDIR}/${tarname}.tar ${LOGDIR}/* \ + --exclude="*.tar" \ + && \ + find $LOGDIR/* -maxdepth 0 -name '*.tar' -prune \ + -o -exec rm -rf '{}' ';' + else + echo "LOGDIR is not set" + fi + mkdir -p $WORKDIRS # This is usually the last thing a test script calls, so our return # value becomes their exit value. While it's not great for the mkdir |