1 #!/usr/bin/env bash 2 # Copyright 2016 The TensorFlow Authors. All Rights Reserved. 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 # 16 # ============================================================================== 17 18 set -e 19 set -x 20 21 N_JOBS=$(grep -c ^processor /proc/cpuinfo) 22 23 echo "" 24 echo "Bazel will use ${N_JOBS} concurrent job(s)." 25 echo "" 26 27 # Run configure. 28 export TF_NEED_CUDA=0 29 export CC_OPT_FLAGS='-mavx' 30 # Only running cc tests, python version does not matter. 31 export PYTHON_BIN_PATH=`which python` 32 yes "" | $PYTHON_BIN_PATH configure.py 33 34 # Run bazel test command. Double test timeouts to avoid flakes. 35 bazel test --test_tag_filters=-no_oss,-gpu,-benchmark-test --test_lang_filters=cc,java -k \ 36 --jobs=${N_JOBS} --test_timeout 300,450,1200,3600 --config=opt \ 37 --test_output=errors -- \ 38 //tensorflow/... -//tensorflow/compiler/... -//tensorflow/contrib/... 39