|
| 1 | +# ******************************************************************************* |
| 2 | +# Copyright (c) 2025 Contributors to the Eclipse Foundation |
| 3 | +# |
| 4 | +# See the NOTICE file(s) distributed with this work for additional |
| 5 | +# information regarding copyright ownership. |
| 6 | +# |
| 7 | +# This program and the accompanying materials are made available under the |
| 8 | +# terms of the Apache License Version 2.0 which is available at |
| 9 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# SPDX-License-Identifier: Apache-2.0 |
| 12 | +# ******************************************************************************* |
| 13 | +from itf.plugins.com.ping import ping |
| 14 | +from itf.plugins.com.ssh import execute_command_output |
| 15 | +import logging |
| 16 | + |
| 17 | +logger = logging.getLogger(__name__) |
| 18 | + |
| 19 | + |
| 20 | +def test_scrample_app_is_deployed(target_fixture): |
| 21 | + user = "qnxuser" |
| 22 | + with target_fixture.sut.ssh(username=user) as ssh: |
| 23 | + exit_code, stdout, stderr = execute_command_output( |
| 24 | + ssh, "test -f scrample" |
| 25 | + ) |
| 26 | + assert exit_code == 0, "SSH command failed" |
| 27 | + |
| 28 | + |
| 29 | +# def test_scrample_app_is_running(target_fixture): |
| 30 | +# user = "qnxuser" |
| 31 | +# with target_fixture.sut.ssh(username=user) as ssh: |
| 32 | +# exit_code, stdout, stderr = execute_command_output( |
| 33 | +# # ssh, "./scrample -n 5 -t 100 -m recv & ./scrample -n 20 -t 100 -m send" |
| 34 | +# # ssh, "./scrample -n 20 -t 100 -m send" |
| 35 | +# ssh, "./scrample -n 10 -t 100 -m send", |
| 36 | +# timeout = 30, max_exec_time = 180, |
| 37 | +# logger_in = logger, verbose = True, |
| 38 | +# ) |
| 39 | +# assert exit_code == 0, "SSH command failed" |
0 commit comments