From 862705bb45d13bcb45e860b9a97b358db9f1b92f Mon Sep 17 00:00:00 2001 From: Marc-Andre Laperle Date: Sun, 22 Mar 2015 15:39:08 -0400 Subject: [PATCH] Bug 426628 - Define V=1 env variable by default for Autotools projects This enables verbose output which is necessary for proper GCC output parsing. Change-Id: I965c50cb4ca3ea46e73efa4d8eb3d7de582deabc Signed-off-by: Marc-Andre Laperle --- .../org.eclipse.cdt.autotools.core/plugin.xml | 1 + .../AutotoolsEnvironmentVariableSupplier.java | 65 +++++++++++++++ .../autotools/tests/AllAutotoolsTests.java | 3 +- .../tests/AutotoolsEnvironmentVarTest.java | 80 +++++++++++++++++++ 4 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsEnvironmentVariableSupplier.java create mode 100644 build/org.eclipse.cdt.autotools.tests/src/org/eclipse/cdt/autotools/tests/AutotoolsEnvironmentVarTest.java diff --git a/build/org.eclipse.cdt.autotools.core/plugin.xml b/build/org.eclipse.cdt.autotools.core/plugin.xml index 17133ed0fc4..fbf5b63700a 100644 --- a/build/org.eclipse.cdt.autotools.core/plugin.xml +++ b/build/org.eclipse.cdt.autotools.core/plugin.xml @@ -396,6 +396,7 @@ name="%Configuration.build.name"> environmentVariables = new HashMap<>(); + for (IEnvironmentVariable var : variables) { + environmentVariables.put(var.getName(), var); + } + + IEnvironmentVariable verboseEnvironmentVariable = environmentVariables.get("V"); + assertNotNull(verboseEnvironmentVariable); + assertEquals("1", verboseEnvironmentVariable.getValue()); + } + + protected void tearDown() throws Exception { + testProject.refreshLocal(IResource.DEPTH_INFINITE, null); + try { + testProject.delete(true, true, null); + } catch (Exception e) { + // FIXME: Why does a ResourceException occur when deleting the + // project?? + } + super.tearDown(); + } +} +