diff options
Diffstat (limited to 'tools/jenkins')
-rwxr-xr-x | tools/jenkins/docker_run_tests.sh | 10 | ||||
-rwxr-xr-x | tools/jenkins/run_jenkins.sh | 11 | ||||
-rwxr-xr-x | tools/jenkins/run_portability.sh | 18 |
3 files changed, 28 insertions, 11 deletions
diff --git a/tools/jenkins/docker_run_tests.sh b/tools/jenkins/docker_run_tests.sh index 148a0f5e08..26e5585d2d 100755 --- a/tools/jenkins/docker_run_tests.sh +++ b/tools/jenkins/docker_run_tests.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -43,8 +43,12 @@ chown `whoami` $XDG_CACHE_HOME mkdir -p /var/local/git git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc -nvm use 0.12 -rvm use ruby-2.1 +nvm use 0.12 || true + +if [ -x "$(command -v rvm)" ] +then + rvm use ruby-2.1 +fi mkdir -p reports diff --git a/tools/jenkins/run_jenkins.sh b/tools/jenkins/run_jenkins.sh index 123b252719..da6ca69809 100755 --- a/tools/jenkins/run_jenkins.sh +++ b/tools/jenkins/run_jenkins.sh @@ -41,7 +41,7 @@ set -ex -o igncr || set -ex if [ "$platform" == "linux" ] then - USE_DOCKER_MAYBE="--use_docker" + PLATFORM_SPECIFIC_ARGS="--use_docker --measure_cpu_costs" elif [ "$platform" == "freebsd" ] then export MAKE=gmake @@ -49,7 +49,14 @@ fi unset platform # variable named 'platform' breaks the windows build -python tools/run_tests/run_tests.py $USE_DOCKER_MAYBE -t -l $language -c $config -x report.xml -j 3 $@ || TESTS_FAILED="true" +python tools/run_tests/run_tests.py \ + $PLATFORM_SPECIFIC_ARGS \ + -t \ + -l $language \ + -c $config \ + -x report.xml \ + -j 2 \ + $@ || TESTS_FAILED="true" if [ ! -e reports/index.html ] then diff --git a/tools/jenkins/run_portability.sh b/tools/jenkins/run_portability.sh index f76dbd3144..6f15da73f4 100755 --- a/tools/jenkins/run_portability.sh +++ b/tools/jenkins/run_portability.sh @@ -41,6 +41,14 @@ set -ex -o igncr || set -ex echo "building $scenario" +# If scenario has _bo suffix, add --build_only flag. +# Short suffix name had to been chosen due to path length limit on Windows. +if [ "$scenario" != "${scenario%_bo}" ] +then + scenario="${scenario%_bo}" + BUILD_ONLY_MAYBE="--build_only" +fi + parts=($(echo $scenario | tr '_' ' ')) # split scenario into parts curr_platform=${parts[0]} # variable named 'platform' breaks the windows build @@ -48,12 +56,10 @@ curr_arch=${parts[1]} curr_compiler=${parts[2]} config='dbg' -maybe_build_only='--build_only' -if [ "$curr_platform" == "windows" ] +if [ "$curr_platform" == "linux" ] then - python tools/run_tests/run_tests.py -t -l $language -c $config --arch ${curr_arch} --compiler ${curr_compiler} ${maybe_build_only} -x report.xml $@ -else - echo "Unsupported scenario." - exit 1 + USE_DOCKER_MAYBE="--use_docker" fi + +python tools/run_tests/run_tests.py $USE_DOCKER_MAYBE $BUILD_ONLY_MAYBE -t -l $language -c $config --arch ${curr_arch} --compiler ${curr_compiler} -x report.xml -j 3 $@ |