blob: 9a4ff383475c3b277b4f08418e011c9993af7c3f [file] [log] [blame]
Elliott Hughes8b7350e2010-02-22 16:00:27 -08001# -*- mode: bash -*-
The Android Open Source Projectadc854b2009-03-03 19:28:47 -08002#
3# Copyright (C) 2007 The Android Open Source Project
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
Elliott Hughes8b7350e2010-02-22 16:00:27 -080017# To run these tests:
18# mmm -j14 dalvik snod
Brian Carlstromebabb912010-04-02 14:13:53 -070019# adb reboot bootloader && fastboot flashall
Elliott Hughes8b7350e2010-02-22 16:00:27 -080020# adb shell run-core-tests
The Android Open Source Projectadc854b2009-03-03 19:28:47 -080021
22tmp=/data/core-tests.tmp
23mkdir $tmp
24chmod 777 $tmp
Andy McFadden50c1c232009-12-02 15:50:09 -080025
Elliott Hughes8b7350e2010-02-22 16:00:27 -080026# Build the classpath by putting together the jar file for each module.
Brian Carlstrom7cb339e2010-06-15 13:28:00 -070027classpath="/system/framework/core-junitrunner.jar:/system/framework/core-tests.jar"
Brian Carlstroma653cca2010-05-18 13:45:26 -070028classpath="$classpath:/system/framework/sqlite-jdbc.jar" # Bonus item for jdbc testing.
Brian Carlstrom7cb339e2010-06-15 13:28:00 -070029modules="dom json support xml"
Elliott Hughes7ee3a062010-02-18 17:20:15 -080030for module in $modules; do
31 classpath="$classpath:/system/framework/core-tests-$module.jar"
32done
33
Jesse Wilsonaddf3d72009-10-20 11:13:20 -070034exec dalvikvm \
Elliott Hughesb5695222009-11-02 18:16:19 -080035 -Duser.name=root \
Jesse Wilsonaddf3d72009-10-20 11:13:20 -070036 -Duser.language=en \
37 -Duser.region=US \
Elliott Hughes8b7350e2010-02-22 16:00:27 -080038 -Duser.dir=$tmp \
39 -Duser.home=$tmp \
Jesse Wilsonaddf3d72009-10-20 11:13:20 -070040 -Djava.io.tmpdir=$tmp \
41 -Djavax.net.ssl.trustStore=/system/etc/security/cacerts.bks \
Elliott Hughes7ee3a062010-02-18 17:20:15 -080042 -classpath $classpath \
Andy McFadden50c1c232009-12-02 15:50:09 -080043 -Xcheck:jni \
Elliott Hughes50f3a682010-03-16 17:33:15 -070044 -Xmx64M \
45 com.google.coretests.Main "$@"