blob: 67b79ee9585a1ba2f18736cb723f9093cf0aa671 [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
19# adb reboot && fastboot flashall
20# 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.
Elliott Hughes8b7350e2010-02-22 16:00:27 -080028modules="annotation archive concurrent crypto dom icu json \
29 logging luni-kernel luni math nio nio_char prefs regex security sql \
30 suncompat support text x-net xml"
Elliott Hughes7ee3a062010-02-18 17:20:15 -080031for module in $modules; do
32 classpath="$classpath:/system/framework/core-tests-$module.jar"
33done
34
Jesse Wilsonaddf3d72009-10-20 11:13:20 -070035exec dalvikvm \
Elliott Hughesb5695222009-11-02 18:16:19 -080036 -Duser.name=root \
Jesse Wilsonaddf3d72009-10-20 11:13:20 -070037 -Duser.language=en \
38 -Duser.region=US \
Elliott Hughes8b7350e2010-02-22 16:00:27 -080039 -Duser.dir=$tmp \
40 -Duser.home=$tmp \
Jesse Wilsonaddf3d72009-10-20 11:13:20 -070041 -Djava.io.tmpdir=$tmp \
42 -Djavax.net.ssl.trustStore=/system/etc/security/cacerts.bks \
Elliott Hughes7ee3a062010-02-18 17:20:15 -080043 -classpath $classpath \
Andy McFadden50c1c232009-12-02 15:50:09 -080044 -Xcheck:jni \
Elliott Hughes50f3a682010-03-16 17:33:15 -070045 -Xmx64M \
46 com.google.coretests.Main "$@"