diff --git a/Robot-Framework/resources/common_keywords.resource b/Robot-Framework/resources/common_keywords.resource index dfd529d9..89ea11bb 100644 --- a/Robot-Framework/resources/common_keywords.resource +++ b/Robot-Framework/resources/common_keywords.resource @@ -3,6 +3,7 @@ *** Settings *** Resource ../config/variables.robot +Resource ../resources/gui_keywords.resource *** Keywords *** @@ -37,11 +38,10 @@ Check If Ping Fails Should Not Be Equal ${result.rc} ${0} Run journalctl recording - ${output} Execute Command journalctl > jrnl.txt - ${output} Execute Command nohup journalctl -f >> jrnl.txt 2>&1 & + ${output} Execute Command nohup journalctl -f >> /tmp/jrnl.txt 2>&1 & Log journctl - ${output} Execute Command cat jrnl.txt + ${output} Execute Command cat /tmp/jrnl.txt Log ${output} @{pid} Find pid by name journalctl Kill process @{pid} @@ -86,3 +86,24 @@ Log versions Log to console Ghaf version: ${ghaf_version} ${nixos_version} Execute Command nixos-version Log to console Nixos version: ${nixos_version} + +Initiate first log in for Lenovo + IF "Lenovo" in "${DEVICE}" + ${first_boot} Detect first boot + Close All Connections + ${connection} Connect + Connect to netvm + Connect to VM ${GUI_VM} + Save most common icons and paths to icons + IF ${first_boot} + Close All Connections + ${connection} Connect + Connect to netvm + Connect to VM ${GUI_VM} + Create test user + END + GUI Log in + GUI Log out + Close All Connections + ${connection} Connect + END diff --git a/Robot-Framework/resources/connection_keywords.resource b/Robot-Framework/resources/connection_keywords.resource index ef2631fb..dbeb923b 100644 --- a/Robot-Framework/resources/connection_keywords.resource +++ b/Robot-Framework/resources/connection_keywords.resource @@ -41,7 +41,7 @@ Initialize Variables And Connect FAIL Failed because port 22 of device was not available, tests can not be run. END ${CONNECTION} Connect - Set Suite Variable ${CONNECTION} + Set Global Variable ${CONNECTION} Initialize Variables, Connect And Start Logging Initialize Variables And Connect diff --git a/Robot-Framework/test-suites/bat-tests/__init__.robot b/Robot-Framework/test-suites/bat-tests/__init__.robot index cf6457d1..64a5d60f 100644 --- a/Robot-Framework/test-suites/bat-tests/__init__.robot +++ b/Robot-Framework/test-suites/bat-tests/__init__.robot @@ -7,7 +7,7 @@ Resource ../../resources/ssh_keywords.resource Resource ../../resources/serial_keywords.resource Resource ../../resources/common_keywords.resource Resource ../../resources/connection_keywords.resource -Suite Setup Initialize Variables, Connect And Start Logging +Suite Setup Run Keywords Initialize Variables, Connect And Start Logging AND Initiate first log in for Lenovo Suite Teardown End Logging And Close Connections diff --git a/Robot-Framework/test-suites/bat-tests/gui-vm.robot b/Robot-Framework/test-suites/bat-tests/gui-vm.robot index 13821d28..7c6a9d15 100644 --- a/Robot-Framework/test-suites/bat-tests/gui-vm.robot +++ b/Robot-Framework/test-suites/bat-tests/gui-vm.robot @@ -65,3 +65,5 @@ Gui-vm apps teardown Connect to VM ${GUI_VM} Kill process @{app_pids} Connect to VM ${GUI_VM} ${USER_LOGIN} ${USER_PASSWORD} + ${app_log} Execute command cat output.log + Log ${app_log}