You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by jm...@apache.org on 2014/09/08 15:30:34 UTC
[18/50] git commit: SLIDER-350 windows support
SLIDER-350 windows support
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/93c3c770
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/93c3c770
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/93c3c770
Branch: refs/heads/feature/update_storm_for_93
Commit: 93c3c770fed878895e4fb67ac17cbbb098cb4fb3
Parents: 8f9caa9
Author: Steve Loughran <st...@apache.org>
Authored: Thu Sep 4 14:05:38 2014 +0100
Committer: Steve Loughran <st...@apache.org>
Committed: Thu Sep 4 14:05:38 2014 +0100
----------------------------------------------------------------------
.../common/tools/TestWindowsSupport.groovy | 22 +++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/93c3c770/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 61ede62..6ae683a 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
@@ -109,13 +109,13 @@ class TestWindowsSupport extends SliderTestBase {
@Test
public void testHasGawkInstalled() throws Throwable {
assume(Shell.WINDOWS, "not windows")
- assert 0 == exec(["gawk", "--version"])
+ exec(0, ["gawk", "--version"])
}
@Test
public void testHasXargsInstalled() throws Throwable {
assume(Shell.WINDOWS, "not windows")
- assert 0 == exec(["xargs", "--version"])
+ exec(0, ["xargs", "--version"])
}
@@ -145,16 +145,28 @@ class TestWindowsSupport extends SliderTestBase {
File winUtils = new File(winUtilsPath)
log.debug("Winutils is at $winUtils)")
- ForkedProcessService process = exec([winUtilsPath, "systeminfo"])
- assert 0 == process.exitCode
+ exec(0, [winUtilsPath, "systeminfo"])
}
/**
* Exec a set of commands, wait a few seconds for it to finish.
+ * @param status code
* @param commands
- * @return
+ * @return the process
*/
+ public ForkedProcessService exec(int status, List<String> commands) {
+ ForkedProcessService process = exec(commands)
+ assert status == process.exitCode
+ return process
+ }
+
+ /**
+ * Exec a set of commands, wait a few seconds for it to finish.
+ * @param commands
+ * @return
+ */
+
public ForkedProcessService exec(List<String> commands) {
ForkedProcessService process;
process = new ForkedProcessService(