/srv/irclogs.ubuntu.com/2009/06/24/#ubuntu-java.txt

=== maxb_ is now known as maxb
juli_Hi everybody, can someone answer my question, please.12:31
juli_I want to package a java lib which is built using Ant. Source distribution contains java sources and a number of tests. Is it ok to skip tests in the build target i.e.  don't build and run them but only build the library's jar itself (“ant jar” vs “ant release” in my case)? Or I have to run tests?  The problem is that tests introduce extra-dependencies.12:31
maxbjuli_: AFAIK it's largely up to the people working on the package whether they consider running the testsuite as part of the build is worthwhile13:46
persiajuli_, It's considered best practice to run the tests, but it's certainly not required.14:21
persiaThe reason for running the tests is to make sure that the library works.  In some cases it's more convenient to have a FTBFS than a broken library.14:21
juli_persia, thanks for the answer. I did run tests on my system, but they require a lot of jars (build-dep) so it is not easy to run them in package.  I think  I'll also ask the lib author's opinion.14:40
persiajuli_, It's really just about your peace of mind as the maintainer.14:41
persiaIf you're willing to make sure that the shipped binary package always works, then you can do it that way.  Forcing the build failure just automates this.14:42
persiaThe trick is that if you don't run the tests during the build, you probably need to rewrite some of the tests to use the library installed by the package, rather than the library constructed by ant.14:43
persiaOr you can just hope it works, which is what most folk do :)14:43
juli_persia, thank you. I think I'll run tests locally but skip them in the package.  Furthermore this lib is used by NetBeans so it will be a kind of test:)15:51
persiaAs long as you're feeling confident :)15:53
juli_I'll definitely be confident before I'll ask to upload a package.15:56
persiaWell, it's also the testing post-upload.  Without running the tests at build time, you have to manually check the results, in case there was something funny about the buildd that day, etc.15:59
persia(not that this is usually an issue)16:00
juli_ok, I'll see what I can do about post-upload testing.16:03

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!