-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-core-tests.sh
executable file
·46 lines (38 loc) · 1.36 KB
/
run-core-tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
#
# Run the core library tests.
#
# You can build and run the unit tests as follows (assuming sh/bash;
# csh users should modify to suit):
#
# $ cd <client>/device
# $ . envsetup.sh
# $ lunch 2
# $ make
# $ make core-tests
# $ ./dalvik/run-core-tests.sh
#
# Note: You may also specify a specific test as an argument.
datadir=/tmp/${USER}
base=$OUT
framework=$base/system/framework
export ANDROID_PRINTF_LOG=tag
export ANDROID_LOG_TAGS='*:w' # was: jdwp:i dalvikvm:i dalvikvmi:i'
export ANDROID_DATA=$datadir
export ANDROID_ROOT=$base/system
debug_opts=-Xcheck:jni
debug_opts="$debug_opts -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
export LD_LIBRARY_PATH=$base/system/lib
export DYLD_LIBRARY_PATH=$base/system/lib
exe=$base/system/bin/dalvikvm
bpath=$framework/core.jar:$framework/ext.jar:$framework/framework.jar:$framework/core-tests.jar:$framework/http-tests.jar
# Notes:
# (1) The IO tests create lots of files in the current directory, so we change
# to /tmp first.
# (2) Some of the core tests need a hell of a lot of memory, so we use a
# large value for both heap and stack.
rm -rf ${datadir}/xml_source
mkdir ${datadir}/xml_source
cp -R libcore/xml/src/test/resources/* ${datadir}/xml_source
cd $tmp
exec $valgrind $exe -Djava.io.tmpdir=$tmp -Xmx512M -Xss32K -Xbootclasspath:$bpath $debug_opts com.google.coretests.Main "$@"