Elliott Hughes | 8b7350e | 2010-02-22 16:00:27 -0800 | [diff] [blame] | 1 | # -*- mode: bash -*- |
The Android Open Source Project | adc854b | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 2 | # |
| 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 Hughes | 8b7350e | 2010-02-22 16:00:27 -0800 | [diff] [blame] | 17 | # To run these tests: |
| 18 | # mmm -j14 dalvik snod |
| 19 | # adb reboot && fastboot flashall |
| 20 | # adb shell run-core-tests |
The Android Open Source Project | adc854b | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 21 | |
| 22 | tmp=/data/core-tests.tmp |
| 23 | mkdir $tmp |
| 24 | chmod 777 $tmp |
Andy McFadden | 50c1c23 | 2009-12-02 15:50:09 -0800 | [diff] [blame] | 25 | |
Elliott Hughes | 8b7350e | 2010-02-22 16:00:27 -0800 | [diff] [blame] | 26 | # Build the classpath by putting together the jar file for each module. |
Elliott Hughes | b9cf9cb | 2010-02-26 14:46:53 -0800 | [diff] [blame] | 27 | classpath="/system/framework/sqlite-jdbc.jar" # Bonus item for jdbc testing. |
Elliott Hughes | 8b7350e | 2010-02-22 16:00:27 -0800 | [diff] [blame] | 28 | modules="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 Hughes | 7ee3a06 | 2010-02-18 17:20:15 -0800 | [diff] [blame] | 31 | for module in $modules; do |
| 32 | classpath="$classpath:/system/framework/core-tests-$module.jar" |
| 33 | done |
| 34 | |
Jesse Wilson | addf3d7 | 2009-10-20 11:13:20 -0700 | [diff] [blame] | 35 | exec dalvikvm \ |
Elliott Hughes | b569522 | 2009-11-02 18:16:19 -0800 | [diff] [blame] | 36 | -Duser.name=root \ |
Jesse Wilson | addf3d7 | 2009-10-20 11:13:20 -0700 | [diff] [blame] | 37 | -Duser.language=en \ |
| 38 | -Duser.region=US \ |
Elliott Hughes | 8b7350e | 2010-02-22 16:00:27 -0800 | [diff] [blame] | 39 | -Duser.dir=$tmp \ |
| 40 | -Duser.home=$tmp \ |
Jesse Wilson | addf3d7 | 2009-10-20 11:13:20 -0700 | [diff] [blame] | 41 | -Djava.io.tmpdir=$tmp \ |
| 42 | -Djavax.net.ssl.trustStore=/system/etc/security/cacerts.bks \ |
Elliott Hughes | 7ee3a06 | 2010-02-18 17:20:15 -0800 | [diff] [blame] | 43 | -classpath $classpath \ |
Andy McFadden | 50c1c23 | 2009-12-02 15:50:09 -0800 | [diff] [blame] | 44 | -Xcheck:jni \ |
Elliott Hughes | 50f3a68 | 2010-03-16 17:33:15 -0700 | [diff] [blame] | 45 | -Xmx64M \ |
| 46 | com.google.coretests.Main "$@" |