From a41225b11ec4abb9b70e203ced5fa46c423cf787 Mon Sep 17 00:00:00 2001 From: Jennie Xie Date: Tue, 17 Sep 2019 11:41:10 -0700 Subject: [PATCH] add lcov report --- .travis.yml | 4 ++-- .travis/after_failure.sh | 2 +- .travis/before_install.sh | 4 ++++ .travis/script.sh | 14 ++++++++++---- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index c860cc8fa8..914600016e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -97,8 +97,8 @@ deploy: bucket: openweave skip_cleanup: true acl: public-read - upload-dir: happy-test-log/$TRAVIS_BUILD_NUMBER - local-dir: "$TRAVIS_BUILD_DIR/happy-test-logs" + upload-dir: openweave-core-build-artifacts/$TRAVIS_BUILD_NUMBER + local-dir: "$TRAVIS_BUILD_DIR/build_artifacts" on: repo: openweave/openweave-core tags: true diff --git a/.travis/after_failure.sh b/.travis/after_failure.sh index 60e906c18b..0dafcccb7f 100755 --- a/.travis/after_failure.sh +++ b/.travis/after_failure.sh @@ -36,5 +36,5 @@ bundle update dpl --provider=gcs --access-key-id=GOOGNPZYTVTEPZM5VBRAVVUU \ --secret-access-key=$GCSKEY --bucket=openweave \ - --local-dir=$TRAVIS_BUILD_DIR/happy-test-logs --upload-dir=happy-test-log/$TRAVIS_BUILD_NUMBER \ + --local-dir=$TRAVIS_BUILD_DIR/build_artifacts --upload-dir=happy-test-log/$TRAVIS_BUILD_NUMBER \ --acl=public-read --skip_cleanup=true diff --git a/.travis/before_install.sh b/.travis/before_install.sh index f41c79783e..853724b267 100755 --- a/.travis/before_install.sh +++ b/.travis/before_install.sh @@ -160,6 +160,10 @@ case "${BUILD_TARGET}" in installdeps "happy-deps" + # install lcov + sudo apt-get update + sudo apt-get install lcov + cd $HOME git clone https://github.com/openweave/happy.git cd ${HOME}/happy diff --git a/.travis/script.sh b/.travis/script.sh index beec7862e1..af109f34b2 100755 --- a/.travis/script.sh +++ b/.travis/script.sh @@ -38,8 +38,8 @@ die() ############################################################### gcc_check_happy() { - cmd_start="sudo make -f Makefile-Standalone DEBUG=1 TIMESTAMP=1 COVERAGE=1 " - cmd_end="BuildJobs=24 check" + cmd_start="sudo make -f Makefile-Standalone DEBUG=1 TIMESTAMP=1 COVERAGE=1" + cmd_end="BuildJobs=24 coverage" if [ "lwip" in "${BUILD_TARGET}" ];then build_cmd="$cmd_start USE_LWIP=1 $cmd_end" @@ -49,11 +49,17 @@ gcc_check_happy() build_folder="x86_64-unknown-linux-gnu" fi - mkdir -p $TRAVIS_BUILD_DIR/happy-test-logs/$1 + mkdir -p $TRAVIS_BUILD_DIR/build_artifacts/$1 eval $build_cmd make_status=${?} - cp $TRAVIS_BUILD_DIR/build/$build_folder/src/test-apps/happy $TRAVIS_BUILD_DIR/happy-test-logs/$1 -rf + cp $TRAVIS_BUILD_DIR/build/$build_folder/src/test-apps/happy $TRAVIS_BUILD_DIR/build_artifacts/$1 -rf echo "please check happy-test-log/ under link: https://storage.cloud.google.com/openweave" + cp $TRAVIS_BUILD_DIR/build/$build_folder/src/test-apps/*.lcov $TRAVIS_BUILD_DIR/build_artifacts/$1 -rf + echo "===========ls build_artifacts x86 folder===============" + ls $TRAVIS_BUILD_DIR/build_artifacts/$1 + echo "===========ls happy===============" + ls $TRAVIS_BUILD_DIR/build_artifacts/$1/happy/ + return ${make_status} }