Home | History | Annotate | Download | only in kokoro
      1 #!/bin/bash
      2 
      3 # This file is used for Linux builds.
      4 # To run locally:
      5 #  ./buildscripts/kokoro/linux.sh
      6 
      7 # This script assumes `set -e`. Removing it may lead to undefined behavior.
      8 set -exu -o pipefail
      9 
     10 # It would be nicer to use 'readlink -f' here but osx does not support it.
     11 readonly OPENCENSUS_JAVA_DIR="$(cd "$(dirname "$0")"/../.. && pwd)"
     12 
     13 # cd to the root dir of opencensus-java
     14 cd $(dirname $0)/../..
     15 
     16 # Run tests
     17 ./gradlew clean build
     18 
     19 OS=`uname`
     20 # Check the example only on Linux.
     21 if [ "$OS" = "Linux" ] ; then
     22     pushd examples; ./gradlew clean assemble check --stacktrace; popd
     23 fi
     24