From 5b03fb003c1e04d5b658197e6617d4846d85c2d3 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Wed, 11 May 2011 21:46:49 -0700 Subject: [PATCH] Don't let the debug option in Maven to block Mavens forked from tests --- .../main/java/org/jvnet/hudson/test/HudsonTestCase.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java b/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java index a6417608e5..7e492bcb45 100644 --- a/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java +++ b/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java @@ -1851,6 +1851,15 @@ public abstract class HudsonTestCase extends TestCase implements RootAction { // DNS multicast support takes up a lot of time during tests, so just disable it altogether // this also prevents tests from falsely advertising Hudson DNSMultiCast.disabled = true; + + if (!Functions.isWindows()) { + try { + GNUCLibrary.LIBC.unsetenv("MAVEN_OPTS"); + GNUCLibrary.LIBC.unsetenv("MAVEN_DEBUG_OPTS"); + } catch (Exception e) { + LOGGER.log(Level.WARNING,"Failed to cancel out MAVEN_OPTS",e); + } + } } public static class TestBuildWrapper extends BuildWrapper { -- GitLab