1f79470583759d20c20268711e6111461aefa8461Jim Grosbach#!/bin/bash
28a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopher#
38a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopher# Copyright (C) 2007 The Android Open Source Project
48a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopher#
58a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopher# Licensed under the Apache License, Version 2.0 (the "License");
68a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopher# you may not use this file except in compliance with the License.
78a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopher# You may obtain a copy of the License at
88a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopher#
98a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopher#     http://www.apache.org/licenses/LICENSE-2.0
108a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopher#
118a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopher# Unless required by applicable law or agreed to in writing, software
128a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopher# distributed under the License is distributed on an "AS IS" BASIS,
138a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopher# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
148a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopher# See the License for the specific language governing permissions and
158a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopher# limitations under the License.
168a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopher
178a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopher# Find dx.jar from dx in the android dev tree
188a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopherprog=`which dx`
198a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopherprogdir=`dirname "${prog}"`
208a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopherdxjar=$progdir/../framework/dx.jar
218a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopher
228a37c79f03e62aecfa2c58b9179f90dd1fcdb253Eric Christopherjavac -cp $dxjar `find . -name "*.java"`
23java -classpath $dxjar:. junit.textui.TestRunner com.android.dx.util.Mutf8Test > unit-out.txt
24
25if [ "$?" = "0" ]; then
26    echo "Yay!"
27else
28    cat unit-out.txt
29fi
30