On 18 Jul 2014, at 6:29 pm, Radim Kubacki <radim.kuba...@gradleware.com> wrote:

> On Fri, Jul 18, 2014 at 10:10 AM, Harald Schmitt <li...@hschmitt.de> wrote:
> Am 18.07.2014 08:36, schrieb Radim Kubacki:
> > On Fri, Jul 18, 2014 at 1:23 AM, Luke Daley <luke.da...@gradleware.com
> > <mailto:luke.da...@gradleware.com>> wrote:
> >
> >     It would be better to explicitly set the locale for the test builds
> >     so we don’t battle these issues one by one.
> But your test's should verify that gradle runs under different locales.
> If you force your tests to a single locale you loose that.
> I think it is a bad idea to tweak the test environment to pass the tests.
> 
> There is a big problem with the default locale for the VM. It affects a lot 
> of things (l10n messages, sorting, formatting, ...). If you decide to tweak 
> it during the test run it can cause interference between your tests.

This is exactly the kind of thing GradleExecuter takes care of. The test would 
declare that it expects the build to be run with ‘en’ as the language, and the 
executer would either run in-process, if the current JVM’s language is ‘en’ or 
would run the build in a forked process with the appropriate -D options.


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
CTO Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com



Reply via email to