run-libcore-tests - how to run the tests under libcore/luni/src/test/java/libcore ?

295 views
Skip to first unread message

Roberto Tyley

unread,
Jan 20, 2012, 1:11:19 PM1/20/12
to android-...@googlegroups.com
(this is reposted from android-building at the suggestion of JBQ)

I'd like to run the libcore java tests - specifically the ones in the 
libcore.java.io package - they don't seem to get invoked as part of the plain 'make' target, does anyone know what the correct make target is to invoke?

thanks,
Roberto

p.s. I noticed there was a script called 'run-libcore-tests' but running that complained that '/libcore/out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar' didn't exist. I haven't figured out what the process required to create that is - compiling a full system image doesn't seem to do it. Full error is:


...
Actions: 109
executing mkdir -p /tmp/vogar/e1fd08f3-af6f-42e1-b894-453c6ab516f4/core-tests_intermediatesException in thread "main" java.lang.RuntimeException: Unable to compute MD5 of "/home/roberto/development/android-repos/libcore/out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar"
at vogar.Md5Cache.md5(Md5Cache.java:67)
at vogar.Md5Cache.makeKey(Md5Cache.java:93)
at vogar.android.AndroidSdk.dex(AndroidSdk.java:201)
at vogar.android.DeviceDalvikVm.dexAndPush(DeviceDalvikVm.java:79)
at vogar.android.DeviceDalvikVm.installRunner(DeviceDalvikVm.java:62)
at vogar.Mode.prepare(Mode.java:82)
at vogar.android.DeviceDalvikVm.prepare(DeviceDalvikVm.java:49)
at vogar.Driver.buildAndRun(Driver.java:114)
at vogar.Vogar.run(Vogar.java:504)
at vogar.Vogar.main(Vogar.java:513)
Caused by: java.io.FileNotFoundException: /home/roberto/development/android-repos/libcore/out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:120)
at vogar.Md5Cache.md5(Md5Cache.java:56)
... 9 more

Roberto Tyley

unread,
Jan 21, 2012, 12:15:37 AM1/21/12
to android-...@googlegroups.com

After more searching, looks like the 'cts' command might be the key to running the libcore tests - yet the supplied instructions to build it don't work for me:


Invoking 'make cts' performed a build of some kind, but afters there was no 'cts' executable that I could find - the contents of the 'out/host/linux-x86/bin/' folder had about a hundred files, 3 of which started with 'cts' (cts-native-xml-generator, cts-tradefed, cts-tradefed) - but no executable named just 'cts'.

This is against a recently 'repo sync'd tree, with lunch set to 'full_crespo-userdebug' - no problem building a device image.

Can anyone reproduce this situation, or explain how to get the cts tool running?

Roberto

Jesse Wilson

unread,
Jan 21, 2012, 9:17:36 AM1/21/12
to android-...@googlegroups.com
Try running "mmm libcore" before running run-libcore-tests.

Roberto Tyley

unread,
Jan 21, 2012, 11:52:07 AM1/21/12
to android-...@googlegroups.com
Thanks for the 'mmm libcore' suggestion - although this doesn't fix my problem, it's nice to have a specific make target.

However, trying to run  'run-libcore-tests'  again, I realised that this error:

Caused by: java.io.FileNotFoundException: /home/roberto/development/android-repos/libcore/out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar (No such file or directory)

-was caused by executing 'run-libcore-tests' from the libcore folder, rather than the parent root folder for the android source. So obviously the solution was to execute:

$ libcore/run-libcore-tests

At that point I was getting some more vogar errors (unable to find adb and then also dx)... but then I saw you recently uploaded a new version of the vogar.jar (sha d4e5f250) and after updating the jar, the test suite finally executed! So, thanks for helping and also maintaining vogar :-)

Roberto

Atul Raut

unread,
Jan 21, 2012, 1:48:13 PM1/21/12
to android-...@googlegroups.com, robert...@gmail.com
Roberto,

"cts-tradefed" this is the executable, its script you have to run,
then you will get cts command prompt where you can run
cts command.
 
Thanks,
----------------------------------------------------------------------------------------------------------------------------------
Atul Raut

http://rautatul.weebly.com/




Roberto

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-platform/-/cnaKnDQQFeQJ.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

peng cang

unread,
Feb 8, 2012, 11:27:04 PM2/8/12
to android-...@googlegroups.com
You should recompile vogar.
 
I can run libcore/run-libcore-tests, but lost test.properties, who know it?
 
 
executing jar cvfM /tmp/vogar/32b5787d-8371-464d-b03b-3ef1eb2429b4/libcore.dalvik.system/libcore.dalvik.system.jar -C /tmp/vogar/32bexecuting cp /tmp/vogar-md5-cache/dex-26acf98739e5cf247eb228e4741c2aae /tmp/vogar/32b5787d-8371-464d-b03b-3ef1eb2429b4/sqlite-jdbc_iexecuting cp /tmp/vogar-md5-cache/dex-d43f0540c4fdd8cee5d953c0e736385a /tmp/vogar/32b5787d-8371-464d-b03b-3ef1eb2429b4/vogar/vogar.dexecuting cp /tmp/vogar-md5-cache/dex-f7205624d1982be42c079fcd6df4c8b3 /tmp/vogar/32b5787d-8371-464d-b03b-3ef1eb2429b4/core-tests_inexecuting adb push /tmp/vogar/32b5787d-8371-464d-b03b-3ef1eb2429b4/sqlite-jdbc_intermediates/sqlite-jdbc_intermediates.dex.jar /sdcaexecuting adb shell cat /sdcard/vogar/run/sqlite-jdbc_intermediates.dex.jar > /sdcard/vogar/run/md5-cache/pushed-c34c47a416e66bd1acaexecuting adb shell mv /sdcard/vogar/run/md5-cache/pushed-c34c47a416e66bd1acacd3ed8805019f.tmp /sdcard/vogar/run/md5-cache/pushed-c3executing adb shell mv /sdcard/vogar/run/md5-cache/pushed-2ef8ece7f94baa755afa3ed81769bd18.tmp /sdcard/vogar/run/md5-cache/pushed-2eexecuting adb push /tmp/vogar/32b5787d-8371-464d-b03b-3ef1eb2429b4/core-tests_intermediates/core-tests_intermediates.dex.jar /sdcardexecuting adb shell cat /sdcard/vogar/run/core-tests_intermediates.dex.jar > /sdcard/vogar/run/md5-cache/pushed-acacd0052d9736687560executing adb shell mv /sdcard/vogar/run/md5-cache/pushed-acacd0052d9736687560677d26faa2f7.tmp /sdcard/vogar/run/md5-cache/pushed-acexecuting dx -JXms16M -JXmx1536M --dex --output=/tmp/vogar/32b5787d-8371-464d-b03b-3ef1eb2429b4/libcore.dalvik.system/libcore.dalvikexecuting cp /tmp/vogar/32b5787d-8371-464d-b03b-3ef1eb2429b4/libcore.dalvik.system/libcore.dalvik.system.dex.jar /tmp/vogar-md5-cachexecuting adb push /tmp/vogar/32b5787d-8371-464d-b03b-3ef1eb2429b4/libcore.dalvik.system/libcore.dalvik.system.dex.jar /sdcard/vogarexecuting adb shell cat /sdcard/vogar/run/libcore.dalvik.system.dex.jar > /sdcard/vogar/run/md5-cache/pushed-d7be65d619b5631ac878861executing adb shell mv /sdcard/vogar/run/md5-cache/pushed-d7be65d619b5631ac8788614761b4979.tmp /sdcard/vogar/run/md5-cache/pushed-d7Action libcore.dalvik.system
executing adb shell cd /sdcard/vogar/run/libcore.dalvik.system && ANDROID_DATA=/sdcard/vogar dalvikvm -classpath /sdcard/vogar/run/libcore.dalvik.system.dex.jar:/sdcard/vogar/run/core-tests_intermediates.dex.jar:/sdcard/vogar/run/sqlite-jdbc_intermediates.dex.jar:/sdcard/vogar/run/vogar.dex.jar -Djava.io.tmpdir=/sdcard/vogar/run/libcore.dalvik.system -Duser.home=/sdcard/vogar/run/user.home -Duser.name=root -Duser.language=en -Duser.region=US -Xverify:none -Xdexopt:none -Xcheck:jni -Xjnigreflimit:2000 -Xmx32M vogar.target.T    java.lang.RuntimeException: java.io.IOException: test.properties missing!
        at vogar.target.TestRunner.loadProperties(TestRunner.java:112)
        at vogar.target.TestRunner.<init>(TestRunner.java:62)
        at vogar.target.TestRunner.main(TestRunner.java:257)
        at dalvik.system.NativeStart.main(Native Method)
    Caused by: java.io.IOException: test.properties missing!
        at vogar.target.TestRunner.getPropertiesStream(TestRunner.java:137)
        at vogar.target.TestRunner.loadProperties(TestRunner.java:106)
        ... 3 more
    Action libcore.dalvik.system did not complete normally.
    timedOut=false
    lastStartedOutcome=null
    lastFinishedOutcome=null
 


 

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-platform/-/y1TrqLoBVNoJ.
Reply all
Reply to author
Forward
0 new messages