mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-10-30 02:22:44 +00:00
WIFI-5837 : Added Lanforge Logs as a part of test cases
Signed-off-by: shivamcandela <shivam.thakur@candelatech.com>
This commit is contained in:
@@ -679,3 +679,23 @@ def get_ap_logs(request, get_apnos, get_configuration):
|
||||
pass
|
||||
|
||||
request.addfinalizer(collect_logs)
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
def get_lf_logs(request, get_apnos, get_configuration):
|
||||
S = 9
|
||||
instance_name = ''.join(random.choices(string.ascii_uppercase + string.digits, k=S))
|
||||
for ap in get_configuration['access_point']:
|
||||
ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x")
|
||||
ap_ssh.run_generic_command(cmd="logger start testcase: " + instance_name)
|
||||
|
||||
def collect_logs():
|
||||
for ap in get_configuration['access_point']:
|
||||
ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x")
|
||||
ap_ssh.run_generic_command(cmd="logger stop testcase: " + instance_name)
|
||||
ap_logs = ap_ssh.get_logread(start_ref="start testcase: " + instance_name,
|
||||
stop_ref="stop testcase: " + instance_name)
|
||||
allure.attach(name='logread', body=str(ap_logs))
|
||||
pass
|
||||
|
||||
request.addfinalizer(collect_logs)
|
||||
|
||||
0
tools/scp_util.py
Normal file
0
tools/scp_util.py
Normal file
Reference in New Issue
Block a user