[rfc][icedtea-web] dont expect junit have hamcrest included

Andrew Azores aazores at redhat.com
Fri Jan 30 03:37:45 UTC 2015


On 01/28/2015 02:57 PM, Omair Majid wrote:> * Andrew Azores 
<aazores at redhat.com> [2015-01-28 12:31]:
 >> Aha! This would be why I have never been able to get the ITW tests 
working
 >> on my laptops - my JUnit doesn't include Hamcrest.
 >>
 >> +1 for fixing this
 >
 > Can you confirm that the patch fixes the unit tests and makes them run
 > for you?
 >
 > Thanks,
 > Omair
 >

Just cloned a fresh ITW and tried running unit tests with this patch 
applied:

 > 
CLASSPATH=/home/andrew/icedtea-web-fresh/build/netx.build/lib/classes.jar:/home/andrew/icedtea-web-fresh/build/liveconnect/lib/classes.jar:/usr/share/java/junit.jar:/usr/share/java/hamcrest-library.jar:/home/andrew/icedtea-web-fresh/build/junit-runner.jar:/home/andrew/icedtea-web-fresh/build/tests.build/test-extensions:.:/home/andrew/icedtea-web-fresh/build/../tests/test-extensions: 
; \
 >   /home/andrew/icedtea-web-fresh/build/bootstrap/jdk1.6.0/bin/java 
-Xbootclasspath/a:/home/andrew/icedtea-web-fresh/build/bootstrap/jdk1.6.0/jre/lib/rt.jar:/home/andrew/icedtea-web-fresh/build/bootstrap/jdk1.6.0/jre/lib/jsse.jar:/usr/share/java/js.jar:/home/andrew/icedtea-web-fresh/build/bootstrap/jdk1.6.0/jre/lib/resources.jar:$CLASSPATH 
CommandLine $class_names
 > Passed: net.sourceforge.jnlp.JREDescTest.testMaximumHeapSizeBad
 > Exception in thread "main" java.lang.NoClassDefFoundError: 
org/junit/internal/AssumptionViolatedException
 > 	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
 > 	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
 > 	at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
 > 	at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
 > 	at CommandLine.runMain(CommandLine.java:48)
 > 	at CommandLine.runMainAndExit(CommandLine.java:28)
 > 	at CommandLine.main(CommandLine.java:24)
 > Makefile:1731: recipe for target 'stamps/run-netx-unit-tests.stamp' 
failed
 > make: *** [stamps/run-netx-unit-tests.stamp] Error 1

/usr/share/java/hamcrest-library.jar does exist, though. It's a symlink 
to /usr/share/java/hamcrest/hamcrest-library-1.3.jar (and similar for 
hamcrest-core, hamcrest-generator, hamcrest-integration JARs). Does this 
sound reasonable? My junit is also a symlink to 
/usr/share/java/junit-4.11.jar.

This is Arch Linux by the way.

Thanks,
-- 
Andrew Azores


More information about the distro-pkg-dev mailing list