GitHub user KellenSunderland opened a pull request:
https://github.com/apache/incubator-joshua/pull/30
JOSHUA-279 Skip tests that rely on KenLM when KenLM is not present.
For unit tests that rely on KenLM I'm going to try and convert them all to
follow this pattern. We'll initialize the unit of work in the setup, and catch
the usual exception kenlm throws when the library is not found. We'll then
swallow the exception and rethrow an exception indicating to testng that the
test should be skipped. This way on systems that don't have the KenLM binaries
the test will be skipped without failing, and on systems that do have KenLM the
test will be properly run.
I've run this with 'mvn' and 'mvn clean install' and both are working for
me with/without KenLM.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/KellenSunderland/incubator-joshua master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-joshua/pull/30.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #30
----
commit 7326befe556f8ab0a744dd2a7718e9af097bfbf4
Author: Kellen Sunderland <[email protected]>
Date: 2016-07-11T16:21:54Z
JOSHUA-279 Skip tests that rely on KenLM when KenLM is not present.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---