You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by st...@apache.org on 2014/11/10 21:13:00 UTC
incubator-slider git commit: SLIDER-622 trying to automate adding path
Repository: incubator-slider
Updated Branches:
refs/heads/feature/SLIDER-622-windows 9cc24d008 -> a8e17ab46
SLIDER-622 trying to automate adding path
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/a8e17ab4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/a8e17ab4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/a8e17ab4
Branch: refs/heads/feature/SLIDER-622-windows
Commit: a8e17ab469101ef8bc05e85a9aee52103e8b516b
Parents: 9cc24d0
Author: Steve Loughran <st...@apache.org>
Authored: Mon Nov 10 20:12:48 2014 +0000
Committer: Steve Loughran <st...@apache.org>
Committed: Mon Nov 10 20:12:48 2014 +0000
----------------------------------------------------------------------
pom.xml | 6 ++++++
slider-core/pom.xml | 3 +++
.../slider/common/tools/TestWindowsSupport.groovy | 15 +++++++++++++++
3 files changed, 24 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/a8e17ab4/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2001e4e..33fc1ec 100644
--- a/pom.xml
+++ b/pom.xml
@@ -131,6 +131,8 @@
<test.failIfNoTests>true</test.failIfNoTests>
<test.funtests.failIfNoTests>false</test.funtests.failIfNoTests>
<test.forkMode>always</test.forkMode>
+ <!-- path environment variable -->
+ <test.env.path>${env.PATH}</test.env.path>
<!--
core artifacts
@@ -1316,6 +1318,7 @@
<module>app-packages/storm</module>
</modules>
</profile>
+
<profile>
<id>Windows</id>
<activation>
@@ -1323,6 +1326,9 @@
<family>windows</family>
</os>
</activation>
+ <properties>
+ <test.env.path>${env.PATH}:{$project.basedir}\bin\windows\${hadoop.version}\bin}</test.env.path>
+ </properties>
<modules>
<module>app-packages/hbase-win</module>
<module>app-packages/storm-win</module>
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/a8e17ab4/slider-core/pom.xml
----------------------------------------------------------------------
diff --git a/slider-core/pom.xml b/slider-core/pom.xml
index e6bc513..2c3aaa6 100644
--- a/slider-core/pom.xml
+++ b/slider-core/pom.xml
@@ -116,6 +116,9 @@
<argLine>${test.argLine}</argLine>
<failIfNoTests>${test.failIfNoTests}</failIfNoTests>
<redirectTestOutputToFile>${build.redirect.test.output.to.file}</redirectTestOutputToFile>
+ <environmentVariables>
+ <PATH>${test.env.path}</PATH>
+ </environmentVariables>
<systemPropertyVariables>
<java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
<java.awt.headless>true</java.awt.headless>
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/a8e17ab4/slider-core/src/test/groovy/org/apache/slider/common/tools/TestWindowsSupport.groovy
----------------------------------------------------------------------
diff --git a/slider-core/src/test/groovy/org/apache/slider/common/tools/TestWindowsSupport.groovy b/slider-core/src/test/groovy/org/apache/slider/common/tools/TestWindowsSupport.groovy
index 9b383f4..cbd79a4 100644
--- a/slider-core/src/test/groovy/org/apache/slider/common/tools/TestWindowsSupport.groovy
+++ b/slider-core/src/test/groovy/org/apache/slider/common/tools/TestWindowsSupport.groovy
@@ -169,4 +169,19 @@ class TestWindowsSupport extends YarnMiniClusterTestBase {
exec(0, [winUtilsPath, "systeminfo"])
}
+
+ @Test
+ public void testPath() throws Throwable {
+ String pathkey;
+
+ System.getenv().keySet().each { String it ->
+ if (it.toLowerCase(Locale.ENGLISH).equals("path")) {
+ pathkey = it;
+ }
+ }
+ assert pathkey
+ log.info("Path env variable is $pathkey")
+ def pathval = System.getenv(pathkey)
+ log.info("Path value = $pathval")
+ }
}