From b8556b97b82c01c422bfec31481d28dfab1297be Mon Sep 17 00:00:00 2001 From: Zach Date: Mon, 8 Oct 2018 02:49:50 -0400 Subject: [PATCH] circle: save p2p logs as artifacts (#2566) --- .circleci/config.yml | 2 ++ Makefile | 3 +++ test/p2p/circleci.sh | 6 +++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9d284be6..55a3da4f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -301,6 +301,8 @@ jobs: - run: mkdir -p $GOPATH/src/github.com/tendermint - run: ln -sf /home/circleci/project $GOPATH/src/github.com/tendermint/tendermint - run: bash test/p2p/circleci.sh + - store_artifacts: + path: /home/circleci/project/test/p2p/logs upload_coverage: <<: *defaults diff --git a/Makefile b/Makefile index 73bd67b0..5711e431 100644 --- a/Makefile +++ b/Makefile @@ -182,6 +182,9 @@ test_p2p: cd .. # requires 'tester' the image from above bash test/p2p/test.sh tester + # the `docker cp` takes a really long time; uncomment for debugging + # + # mkdir -p test/p2p/logs && docker cp rsyslog:/var/log test/p2p/logs test_integrations: make build_docker_test_image diff --git a/test/p2p/circleci.sh b/test/p2p/circleci.sh index 19200afb..c548d575 100644 --- a/test/p2p/circleci.sh +++ b/test/p2p/circleci.sh @@ -6,7 +6,7 @@ SOURCE="${BASH_SOURCE[0]}" while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" -LOGS_DIR="$DIR/../logs" +LOGS_DIR="$DIR/logs" echo echo "* [$(date +"%T")] cleaning up $LOGS_DIR" rm -rf "$LOGS_DIR" @@ -33,3 +33,7 @@ fi echo echo "* [$(date +"%T")] running p2p tests on a local docker network" bash "$DIR/../p2p/test.sh" tester + +echo +echo "* [$(date +"%T")] copying log files out of docker container into $LOGS_DIR" +docker cp rsyslog:/var/log $LOGS_DIR