Signed-off-by: John Howard <jhoward@microsoft.com>
| ... | ... |
@@ -14,6 +14,11 @@ import ( |
| 14 | 14 |
) |
| 15 | 15 |
|
| 16 | 16 |
func TestIsKilledFalseWithNonKilledProcess(t *testing.T) {
|
| 17 |
+ // TODO Windows: Port this test |
|
| 18 |
+ if runtime.GOOS == "windows" {
|
|
| 19 |
+ t.Skip("Needs porting to Windows")
|
|
| 20 |
+ } |
|
| 21 |
+ |
|
| 17 | 22 |
lsCmd := exec.Command("ls")
|
| 18 | 23 |
lsCmd.Start() |
| 19 | 24 |
// Wait for it to finish |
| ... | ... |
@@ -134,6 +139,11 @@ Try 'ls --help' for more information. |
| 134 | 134 |
} |
| 135 | 135 |
|
| 136 | 136 |
func TestRunCommandWithOutputForDurationFinished(t *testing.T) {
|
| 137 |
+ // TODO Windows: Port this test |
|
| 138 |
+ if runtime.GOOS == "windows" {
|
|
| 139 |
+ t.Skip("Needs porting to Windows")
|
|
| 140 |
+ } |
|
| 141 |
+ |
|
| 137 | 142 |
cmd := exec.Command("ls")
|
| 138 | 143 |
out, exitCode, timedOut, err := RunCommandWithOutputForDuration(cmd, 50*time.Millisecond) |
| 139 | 144 |
if out == "" || exitCode != 0 || timedOut || err != nil {
|
| ... | ... |
@@ -142,6 +152,10 @@ func TestRunCommandWithOutputForDurationFinished(t *testing.T) {
|
| 142 | 142 |
} |
| 143 | 143 |
|
| 144 | 144 |
func TestRunCommandWithOutputForDurationKilled(t *testing.T) {
|
| 145 |
+ // TODO Windows: Port this test |
|
| 146 |
+ if runtime.GOOS == "windows" {
|
|
| 147 |
+ t.Skip("Needs porting to Windows")
|
|
| 148 |
+ } |
|
| 145 | 149 |
cmd := exec.Command("sh", "-c", "while true ; do echo 1 ; sleep .1 ; done")
|
| 146 | 150 |
out, exitCode, timedOut, err := RunCommandWithOutputForDuration(cmd, 500*time.Millisecond) |
| 147 | 151 |
ones := strings.Split(out, "\n") |
| ... | ... |
@@ -164,6 +178,11 @@ func TestRunCommandWithOutputForDurationErrors(t *testing.T) {
|
| 164 | 164 |
} |
| 165 | 165 |
|
| 166 | 166 |
func TestRunCommandWithOutputAndTimeoutFinished(t *testing.T) {
|
| 167 |
+ // TODO Windows: Port this test |
|
| 168 |
+ if runtime.GOOS == "windows" {
|
|
| 169 |
+ t.Skip("Needs porting to Windows")
|
|
| 170 |
+ } |
|
| 171 |
+ |
|
| 167 | 172 |
cmd := exec.Command("ls")
|
| 168 | 173 |
out, exitCode, err := RunCommandWithOutputAndTimeout(cmd, 50*time.Millisecond) |
| 169 | 174 |
if out == "" || exitCode != 0 || err != nil {
|
| ... | ... |
@@ -172,6 +191,11 @@ func TestRunCommandWithOutputAndTimeoutFinished(t *testing.T) {
|
| 172 | 172 |
} |
| 173 | 173 |
|
| 174 | 174 |
func TestRunCommandWithOutputAndTimeoutKilled(t *testing.T) {
|
| 175 |
+ // TODO Windows: Port this test |
|
| 176 |
+ if runtime.GOOS == "windows" {
|
|
| 177 |
+ t.Skip("Needs porting to Windows")
|
|
| 178 |
+ } |
|
| 179 |
+ |
|
| 175 | 180 |
cmd := exec.Command("sh", "-c", "while true ; do echo 1 ; sleep .1 ; done")
|
| 176 | 181 |
out, exitCode, err := RunCommandWithOutputAndTimeout(cmd, 500*time.Millisecond) |
| 177 | 182 |
ones := strings.Split(out, "\n") |
| ... | ... |
@@ -194,6 +218,11 @@ func TestRunCommandWithOutputAndTimeoutErrors(t *testing.T) {
|
| 194 | 194 |
} |
| 195 | 195 |
|
| 196 | 196 |
func TestRunCommand(t *testing.T) {
|
| 197 |
+ // TODO Windows: Port this test |
|
| 198 |
+ if runtime.GOOS == "windows" {
|
|
| 199 |
+ t.Skip("Needs porting to Windows")
|
|
| 200 |
+ } |
|
| 201 |
+ |
|
| 197 | 202 |
p := "$PATH" |
| 198 | 203 |
if runtime.GOOS == "windows" {
|
| 199 | 204 |
p = "%PATH%" |