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

Jiri Vanek jvanek at redhat.com
Fri Feb 6 11:54:19 UTC 2015


On 01/30/2015 04:37 AM, Andrew Azores wrote:
> 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.

It seems that the juni.jar+hamcrest.jar do not work as expected a the end. The system how we use it 
should not care whether the file is symlink or final file. AActually it is quite camon to have link 
to versionedFile. Fedora do the same. So I guess  more hamcrest jars are missing on classpath?

As you are currently only reproducer of this, may you elaborate?

I had added also Fridrich to CC, as this is the reason why I would rather kept junit_runtime 
variable existing.

J


More information about the distro-pkg-dev mailing list