OSDN Git Service

Update run-core-tests' documentation, remove the leading : from the classpath, and...
authorElliott Hughes <enh@google.com>
Tue, 23 Feb 2010 00:00:27 +0000 (16:00 -0800)
committerElliott Hughes <enh@google.com>
Tue, 23 Feb 2010 00:10:42 +0000 (16:10 -0800)
(I did look at replacing this with a bash script we run on the host, but adb
turns out to have a command-line limit of 1024 bytes, and our classpath alone
is ~850 bytes long!)

libcore/run-core-tests

index ba858f2..9c47f7c 100755 (executable)
@@ -1,3 +1,4 @@
+# -*- mode: bash -*-
 #
 # Copyright (C) 2007 The Android Open Source Project
 #
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# Run all the tests contained in the core-tests library.
-#
-# To install this script and the tests on a device:
-# $ make (only necessary once)
-# $ make CtsCoreTests snod (to create a system.img containing these files)
-#  OR
-# $ make CtsCoreTests && adb sync (to push these files to a running system)
+# To run these tests:
+# mmm -j14 dalvik snod
+# adb reboot && fastboot flashall
+# adb shell run-core-tests
 
 tmp=/data/core-tests.tmp
 mkdir $tmp
 chmod 777 $tmp
 
-modules="annotation archive concurrent crypto dom icu logging luni-kernel \
-        luni math nio nio_char prefs regex security sql suncompat support \
-        text x-net xml"
+# Build the classpath by putting together the jar file for each module.
+modules="annotation archive concurrent crypto dom icu json \
+        logging luni-kernel luni math nio nio_char prefs regex security sql \
+        suncompat support text x-net xml"
 classpath=""
 for module in $modules; do
   classpath="$classpath:/system/framework/core-tests-$module.jar"
 done
+classpath=${classpath#:}
 
 exec dalvikvm \
      -Duser.name=root \
      -Duser.language=en \
      -Duser.region=US \
+     -Duser.dir=$tmp \
+     -Duser.home=$tmp \
      -Djava.io.tmpdir=$tmp \
      -Djavax.net.ssl.trustStore=/system/etc/security/cacerts.bks \
      -classpath $classpath \