Home | History | Annotate | Download | only in cpu
      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=$(sysctl -n hw.ncpu)
     22 N_JOBS=$((N_JOBS+1))
     23 
     24 echo ""
     25 echo "Bazel will use ${N_JOBS} concurrent job(s)."
     26 echo ""
     27 
     28 # Run configure.
     29 export TF_NEED_CUDA=0
     30 export CC_OPT_FLAGS='-mavx'
     31 export PYTHON_BIN_PATH=$(which python2)
     32 yes "" | $PYTHON_BIN_PATH configure.py
     33 which bazel
     34 bazel test --test_tag_filters=-no_oss,-gpu,-benchmark-test,-nomac \
     35     --test_timeout 300,450,1200,3600 --config=opt \
     36     --test_size_filters=small,medium \
     37     --jobs=${N_JOBS} --build_tests_only --test_output=errors -k -- \
     38     //tensorflow/... -//tensorflow/compiler/... -//tensorflow/contrib/...
     39