From a76bdc8bf6a86d1f642ad1191e28e50b1cfe3be3 Mon Sep 17 00:00:00 2001 From: Hiroshi Yokoi Date: Tue, 15 Sep 2015 12:47:54 +0900 Subject: scenario_test: preserve test logs Signed-off-by: Hiroshi Yokoi --- test/scenario_test/ci-scripts/jenkins-build-script.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'test/scenario_test') 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 + -- cgit v1.2.3