Skip to content

Commit b558699

Browse files
committed
[ci] Enhancement: Integration Tests in Windows
1 parent 457cd79 commit b558699

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

tools/ci/job/factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def unit_test(self, test_name: str) -> BaseJob:
5959

6060
def integration_test(self, run_mode="") -> BaseJob:
6161
if self.config["platform"] == "windows":
62-
raise Exception("Integration tests are not supported on Windows")
62+
return windows.TcpIntegrationTestJobOnWindows(self.config)
6363
else:
6464
if self.config["libos"] == "catmem":
6565
return linux.PipeIntegrationTestJobOnLinux(self.config, run_mode=run_mode)

tools/ci/job/windows.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Copyright (c) Microsoft Corporation.
22
# Licensed under the MIT license.
33

4+
import subprocess
5+
import time
46
from ci.task.windows import BaseWindowsTask, CheckoutOnWindows, CompileOnWindows, RunOnWindows, CleanupOnWindows
57
from ci.job.utils import wait_and_report
68
from ci.job.generic import BaseJob
@@ -94,3 +96,25 @@ def __init__(self, config: dict):
9496

9597
def execute(self) -> bool:
9698
return super().execute()
99+
100+
101+
class IntegrationTestJobOnWindows(BaseWindowsJob):
102+
def __init__(self, config: dict, name: str):
103+
super().__init__(config, name)
104+
105+
def execute(self, server_cmd: str) -> bool:
106+
serverTask: RunOnWindows = RunOnWindows(
107+
super().server(), super().repository(), server_cmd, super().is_debug(), super().is_sudo(), super().config_path())
108+
return super().execute(serverTask)
109+
110+
111+
class TcpIntegrationTestJobOnWindows(IntegrationTestJobOnWindows):
112+
113+
def __init__(self, config: dict):
114+
config["all_pass"] = True
115+
super().__init__(config, "integration-test")
116+
self.server_args: str = f"--local-address {super().server_addr()}:12345 --remote-address {super().client_addr()}:23456"
117+
118+
def execute(self) -> bool:
119+
server_cmd: str = f"test-integration-rust TEST_INTEGRATION=tcp-test LIBOS={super().libos()} ARGS=\'{self.server_args}\'"
120+
return super().execute(server_cmd)

tools/demikernel_ci.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def run_pipeline(
7171
# STEP 4: Run integration tests.
7272
if test_integration:
7373
if status["checkout"] and status["compile"]:
74-
if libos == "catnap" or libos == "catloop":
74+
if libos == "catnap" or libos == "catnapw" or libos == "catloop":
7575
status["integration_tests"] = factory.integration_test().execute()
7676
elif libos == "catmem":
7777
status["integration_tests"] = factory.integration_test("standalone").execute()

0 commit comments

Comments
 (0)