1081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson#!/bin/bash 2081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson# 3081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson# Copyright (C) 2007 The Android Open Source Project 4081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson# 5081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson# Licensed under the Apache License, Version 2.0 (the "License"); 6081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson# you may not use this file except in compliance with the License. 7081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson# You may obtain a copy of the License at 8081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson# 9081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson# http://www.apache.org/licenses/LICENSE-2.0 10081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson# 11081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson# Unless required by applicable law or agreed to in writing, software 12081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson# distributed under the License is distributed on an "AS IS" BASIS, 13081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson# See the License for the specific language governing permissions and 15081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson# limitations under the License. 16081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson 17081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson# Find dx.jar from dx in the android dev tree 18081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilsonprog=`which dx` 19081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilsonprogdir=`dirname "${prog}"` 20324d2f23a7174848f7d130c43c903325c99a93c7Jesse Wilsondxjar=$progdir/../framework/dx.jar 21081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson 22324d2f23a7174848f7d130c43c903325c99a93c7Jesse Wilsonjavac -cp $dxjar `find . -name "*.java"` 23324d2f23a7174848f7d130c43c903325c99a93c7Jesse Wilsonjava -classpath $dxjar:. junit.textui.TestRunner com.android.dx.util.Leb128UtilsTest > unit-out.txt 24081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson 25081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilsonif [ "$?" = "0" ]; then 26081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson echo "Yay!" 27081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilsonelse 28081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilson cat unit-out.txt 29081c7142b29ccd6e1744b26e097b6a4d7c12f2bdJesse Wilsonfi 30