[tools] Enhancement: Unit Tests for Demikernel CI
This commit addresses
@@ -123,6 +123,16 @@ def job_test_system_rust(test_name: string, repo: string, libos: string, is_debu
return wait_and_report(test_name, jobs, all_pass)
+def job_test_unit_rust(repo: string, libos: string, is_debug: bool, server: string, client: string,
+ is_sudo: bool) -> bool:
+ server_cmd: string = "test-unit-rust LIBOS={}".format(libos)
+ client_cmd: string = "test-unit-rust LIBOS={}".format(libos)
+ jobs: list[subprocess.Popen[str]] = []
+ jobs.append(remote_run(server, repo, is_debug, server_cmd, is_sudo))
+ jobs.append(remote_run(client, repo, is_debug, client_cmd, is_sudo))
+ return wait_and_report("unit-tests", jobs, True)
+
+
def job_cleanup(repository: string, server: string, client: string) -> bool:
jobs: list[subprocess.Popen[str]] = []
jobs.append(remote_cleanup(server, repository))
@@ -209,11 +219,18 @@ def run_pipeline(
if passed:
passed = job_compile(repository, libos, is_debug, server, client)
- # STEP 3: Run system tests.
- if test and passed:
+ if test:
+ # STEP 3: Run unit tests.
+ if passed:
+ passed = job_test_unit_rust(repository, libos, is_debug, server, client, is_sudo)
+
+ # STEP 4: Run system tests.
+ if passed:
if libos != "catmem":
- passed = test_udp_ping_pong(server, client, libos, is_debug, is_sudo, repository, server_addr, client_addr)
- passed = test_udp_push_pop(server, client, libos, is_debug, is_sudo, repository, server_addr, client_addr)
+ passed = test_udp_ping_pong(server, client, libos, is_debug, is_sudo,
+ repository, server_addr, client_addr)
+ passed = test_udp_push_pop(server, client, libos, is_debug, is_sudo,
+ repository, server_addr, client_addr)
passed = test_tcp_ping_pong(server, client, libos, is_debug, is_sudo, repository, server_addr)
passed = test_tcp_push_pop(server, client, libos, is_debug, is_sudo, repository, server_addr)
else:
