1a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson#!/bin/bash
2a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson#
3a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson# Copyright (C) 2017 The Android Open Source Project
4a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson#
5a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson# Licensed under the Apache License, Version 2.0 (the "License");
6a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson# you may not use this file except in compliance with the License.
7a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson# You may obtain a copy of the License at
8a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson#
9a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson#     http://www.apache.org/licenses/LICENSE-2.0
10a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson#
11a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson# Unless required by applicable law or agreed to in writing, software
12a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson# distributed under the License is distributed on an "AS IS" BASIS,
13a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson# See the License for the specific language governing permissions and
15a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson# limitations under the License.
16a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson
17a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson# Find dx.jar from dx in the android dev tree
18a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodsonprog=`which dx`
19a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodsonprogdir=`dirname "${prog}"`
20a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodsondxjar=$progdir/../framework/dx.jar
21a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodsonjunitjar=$progdir/../framework/junit-host.jar
22a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson
23a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodsonfor i in "$dxjar" "$junitjar"; do
24a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson    if [ ! -r $i ]; then
25a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson        echo Missing dependency $i. Build dx-tests.
26a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson        exit 1
27a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson    fi
28a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodsondone
29a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson
30a9ce640c36c040b9d2d6df879c71fa3ba38f0cebOrion Hodson${JAVAC} -cp $dxjar:$junitjar `find . -name "*.java"`
31