blob: 288858592560aae2bfb6c15a2bc90c3edbff17fe [file] [log] [blame]
Leo Hsub9fda882018-07-20 19:10:30 +08001#!/bin/bash
2set -o errexit
3
4# Copyright 2018 The Android Open Source Project
5#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17
18if [ -z "${ANDROID_BUILD_TOP}" ] ; then
19 echo "You need to source and lunch before you can use this script" 1>&2
20 exit 1
21fi
22
sqian44c9c942019-10-22 16:34:03 -070023if ! [ -x "$(which aprotoc)" ] ; then
24 echo "Missing aprotoc, build it with 'm aprotoc'." 1>&2
Leo Hsub9fda882018-07-20 19:10:30 +080025 exit 1
26fi
27
28ECC_ROOT=`realpath \`dirname $0\``
29TOOLSET_DIR="${ECC_ROOT}/conversion_toolset_v1"
30INPUT_DIR="${ECC_ROOT}/input"
31OUTPUT_DIR="${ECC_ROOT}/output"
32INTERMEDIATE_DIR="${ECC_ROOT}/.intermediate"
33
34rm -rf "${INTERMEDIATE_DIR}" "${OUTPUT_DIR}/*"
35mkdir -p "${INTERMEDIATE_DIR}"
36
37source "${TOOLSET_DIR}/gen_eccdata.sh"
38echo
39
Leo Hsu7dd2abd2018-11-13 14:25:57 +080040echo "To verify data compatibility:"
41echo " 1. make TeleService"
42echo " 2. push TeleService.apk to system/priv-app/TeleService"
43echo " 3. reboot device"
Leo Hsu909f9252019-01-22 17:44:25 +080044echo " 4. run 'atest TeleServiceTests:EccDataTest#testEccDataContent'"