Skip to content

Commit

Permalink
Test updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mcfadden8 committed Jun 27, 2024
1 parent 6042455 commit 7f3f036
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/test_client_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ int run_service()
int run_client()
{
fprintf(stdout, "Client Started!\n");
sleep(10);
sleep(2);
fprintf(stdout, "Client Ending!\n");
return AXLCS_SUCCESS;
}
Expand Down
9 changes: 6 additions & 3 deletions test/test_driver_client_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@ def wait_for_completion(procname, proc, wait_time):
return proc.returncode, outs, err

if __name__ == '__main__':
errors = 0
# Launch the server then the client
server = subprocess.Popen(['./test_client_server server'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
client = subprocess.Popen(['./test_client_server client'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)

# Wait for the client then the server to finish
server_ecode, server_out, server_err = wait_for_completion("axl_client", client, 120)
client_ecode, client_out, client_err = wait_for_completion("axl_server", server, 10)
client_ecode, client_out, client_err = wait_for_completion("axl_client", client, 120)
server_ecode, server_out, server_err = wait_for_completion("axl_server", server, 2)

if server_ecode != 0 or client_ecode != 0:
sys.exit(server_ecode + client_ecode)
errors = server_ecode + client_ecode

sys.exit(errors)

0 comments on commit 7f3f036

Please sign in to comment.