Home | History | Annotate | Download | only in dicttoolkit
      1 #!/bin/bash
      2 # Copyright 2014, The Android Open Source Project
      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 # check script arguments
     17 if [[ $(type -t mmm) != function ]]; then
     18 if [[ ${BASH_SOURCE[0]} != $0 ]]; then return; else exit 1; fi
     19 fi
     20 
     21 # Host build is never supported in unbundled (NDK/tapas) build
     22 if [[ -n $TARGET_BUILD_APPS ]]; then
     23   echo "Host build is never supported in tapas build."  1>&2
     24   echo "Use lunch command instead."  1>&2
     25   if [[ ${BASH_SOURCE[0]} != $0 ]]; then return; else exit 1; fi
     26 fi
     27 
     28 test_name=dicttoolkit_unittests
     29 
     30 pushd $PWD > /dev/null
     31 cd $(gettop)
     32 (mmm -j16 packages/inputmethods/LatinIME/native/dicttoolkit) || (make -j16 $test_name)
     33 $ANDROID_HOST_OUT/bin/$test_name
     34 popd > /dev/null
     35