diff options
author | Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> | 2015-09-15 12:47:54 +0900 |
---|---|---|
committer | Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> | 2015-09-15 13:52:16 +0900 |
commit | a76bdc8bf6a86d1f642ad1191e28e50b1cfe3be3 (patch) | |
tree | 9139b6ea695a61a2dfcda171eddafa231b661fff /test/scenario_test | |
parent | 7d16e3e1db32f3af524f8bc3eb26859a109b6586 (diff) |
scenario_test: preserve test logs
Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
Diffstat (limited to 'test/scenario_test')
-rw-r--r-- | test/scenario_test/ci-scripts/jenkins-build-script.sh | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/scenario_test/ci-scripts/jenkins-build-script.sh b/test/scenario_test/ci-scripts/jenkins-build-script.sh index f6ddd386..ffad1255 100644 --- a/test/scenario_test/ci-scripts/jenkins-build-script.sh +++ b/test/scenario_test/ci-scripts/jenkins-build-script.sh @@ -9,6 +9,11 @@ export GOROOT=/usr/local/go export GOBGP=/usr/local/jenkins/src/github.com/osrg/gobgp export WS=`pwd` +# clear docker.log +if [ "${BUILD_TAG}" != "" ]; then + sudo sh -c ": > /var/log/upstart/docker.log" +fi + rm -r ${WS}/nosetest*.xml cp -r ../workspace $GOBGP pwd @@ -31,5 +36,17 @@ cd $GOBGP/gobgpd $GOROOT/bin/go get -v cd $GOBGP/test/scenario_test - ./run_all_tests.sh + +if [ "${BUILD_TAG}" != "" ]; then + cd ${WS} + mkdir jenkins-log-${BUILD_NUMBER} + sudo cp *.xml jenkins-log-${BUILD_NUMBER}/ + sudo cp /var/log/upstart/docker.log jenkins-log-${BUILD_NUMBER}/docker.log + sudo chown -R jenkins:jenkins jenkins-log-${BUILD_NUMBER} + + tar cvzf jenkins-log-${BUILD_NUMBER}.tar.gz jenkins-log-${BUILD_NUMBER} + s3cmd put jenkins-log-${BUILD_NUMBER}.tar.gz s3://gobgp/jenkins/ + rm -rf jenkins-log-${BUILD_NUMBER} jenkins-log-${BUILD_NUMBER}.tar.gz +fi + |