ahnan4arch / vogar

Automatically exported from code.google.com/p/vogar
0 stars 0 forks source link

Running on device fails with vogar and passes with command directly #54

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a simple TestMath.java with some junit tests
2. run "vogar --mode host src/TestMath.java"

What is the expected output? What do you see instead?
expected output is passing test. Actual is a class path exception:

 Dalvik VM unable to locate class 'vogar/target/TestRunner'
    W(26020) threadid=1: thread exiting with uncaught exception (group=0xf5e54380)  (dalvikvm)
    java.lang.NoClassDefFoundError: vogar/target/TestRunner
        at dalvik.system.NativeStart.main(Native Method)
    Caused by: java.lang.ClassNotFoundException: vogar.target.TestRunner
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
        ... 1 more

If I run the command (keeping cached files), I get success:

ANDROID_PRINTF_LOG=tag ANDROID_LOG_TAGS=*:i 
ANDROID_DATA=/tmp/vogar/fcde3446-4c5d-41a3-a587-95435544c224/android-data 
ANDROID_ROOT=/mnt/sshfs/london.novoda.com/FOSS/android/head/out/host/linux-x86 
LD_LIBRARY_PATH=/mnt/sshfs/london.novoda.com/FOSS/android/head/out/host/linux-x8
6/lib 
DYLD_LIBRARY_PATH=/mnt/sshfs/london.novoda.com/FOSS/android/head/out/host/linux-
x86/lib 
/mnt/sshfs/london.novoda.com/FOSS/android/head/out/host/linux-x86/bin/dalvikvm 
-classpath  
-Xbootclasspath/a:/tmp/vogar/fcde3446-4c5d-41a3-a587-95435544c224/tmp.tests.src.
TestMath.java/tmp.tests.src.TestMath.java.dex.jar:/tmp/vogar/fcde3446-4c5d-41a3-
a587-95435544c224/core_intermediates/core_intermediates.dex.jar:/tmp/vogar/fcde3
446-4c5d-41a3-a587-95435544c224/vogar/vogar.dex.jar:/tmp/vogar/fcde3446-4c5d-41a
3-a587-95435544c224/vogar/vogar.dex.jar 
-Duser.dir=/tmp/vogar/run/tmp.tests.src.TestMath.java 
-Djava.io.tmpdir=/tmp/vogar/run/tmp.tests.src.TestMath.java 
-Xbootclasspath:/mnt/sshfs/london.novoda.com/FOSS/android/head/out/host/linux-x8
6/framework/core-hostdex.jar:/mnt/sshfs/london.novoda.com/FOSS/android/head/out/
host/linux-x86/framework/bouncycastle-hostdex.jar:/mnt/sshfs/london.novoda.com/F
OSS/android/head/out/host/linux-x86/framework/apache-xml-hostdex.jar 
-Duser.language=en -Duser.region=US -Xverify:none -Xdexopt:none -Xcheck:jni 
-Xjnigreflimit:2000 vogar.target.TestRunner
//00xx{"outcome":"TestMath#testAdd","runner":"vogar.target.junit.JUnitRunner"}
//00xx{"result":"SUCCESS"}
//00xx{"outcome":"TestMath#testMulitply","runner":"vogar.target.junit.JUnitRunne
r"}
//00xx{"result":"SUCCESS"}
//00xx{"completedNormally":true}

Original issue reported on code.google.com by charroch on 2 Mar 2012 at 12:03

GoogleCodeExporter commented 8 years ago
The summary says "Running on device" but you passed "--mode host" which means 
run with a dalvikvm on the host. Did you mean to use "--mode target"?

Original comment by b...@google.com on 2 Mar 2012 at 5:29

GoogleCodeExporter commented 8 years ago
Yes I meant running locally on host against dalvikvm compiled against x86.

1. So running with vogar fails with class not found
2. Using the same command as outputed by --verbose (i.e. the one above) yields 
correct result.

I am unfamiliar with "--mode target"

Original comment by charroch on 3 Mar 2012 at 10:12