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 17if [[ $(type -t mmm) != function ]]; then 18if [[ ${BASH_SOURCE[0]} != $0 ]]; then return; else exit 1; fi 19fi 20 21# Host build is never supported in unbundled (NDK/tapas) build 22if [[ -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 26fi 27 28test_name=dicttoolkit_unittests 29 30pushd $PWD > /dev/null 31cd $(gettop) 32(mmm -j16 packages/inputmethods/LatinIME/native/dicttoolkit) || (make -j16 $test_name) 33$ANDROID_HOST_OUT/bin/$test_name 34popd > /dev/null 35