blob: b1df621e104e42d93581a1d905eeaf13ecdbb691 [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.
Elliott Hughesb9cf9cb2010-02-26 14:46:53 -080027classpath="/system/framework/sqlite-jdbc.jar" # Bonus item for jdbc testing.
Brian Carlstrombcfb3252010-05-02 11:27:52 -070028modules="dom json luni-kernel luni prefs support x-net xml"
Elliott Hughes7ee3a062010-02-18 17:20:15 -080029for module in $modules; do
30 classpath="$classpath:/system/framework/core-tests-$module.jar"
31done
32
Jesse Wilsonaddf3d72009-10-20 11:13:20 -070033exec dalvikvm \
Elliott Hughesb5695222009-11-02 18:16:19 -080034 -Duser.name=root \
Jesse Wilsonaddf3d72009-10-20 11:13:20 -070035 -Duser.language=en \
36 -Duser.region=US \
Elliott Hughes8b7350e2010-02-22 16:00:27 -080037 -Duser.dir=$tmp \
38 -Duser.home=$tmp \
Jesse Wilsonaddf3d72009-10-20 11:13:20 -070039 -Djava.io.tmpdir=$tmp \
40 -Djavax.net.ssl.trustStore=/system/etc/security/cacerts.bks \
Elliott Hughes7ee3a062010-02-18 17:20:15 -080041 -classpath $classpath \
Andy McFadden50c1c232009-12-02 15:50:09 -080042 -Xcheck:jni \
Elliott Hughes50f3a682010-03-16 17:33:15 -070043 -Xmx64M \
44 com.google.coretests.Main "$@"