Skip to content

Commit

Permalink
Add logging for each vm
Browse files Browse the repository at this point in the history
Signed-off-by: Maarit Härkönen <[email protected]>
  • Loading branch information
maaharko committed Oct 10, 2024
1 parent 5c9b209 commit 4c8d2e2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Robot-Framework/resources/ssh_keywords.resource
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ Start application
Log To Console ${\n}Starting ${app_name}
${output} Execute Command cat /etc/xdg/weston/weston.ini
${path} Get App Path ${output} ${app_name}
Execute Command nohup sh -c '$(${path})' > output.log 2>&1 &
Execute Command nohup sh -c '${path}' > output.log 2>&1 &

Start XDG application
[Arguments] ${app_name}
Log To Console ${\n}Starting ${app_name}
${output} Execute Command cat /run/current-system/sw/share/applications/${app_name}.desktop
${path} Get App Path From Desktop ${output}
Execute Command nohup sh -c '$(${path})' > output.log 2>&1 &
Execute Command nohup sh -c '${path}' > output.log 2>&1 &

Start Firefox
[Documentation] It's needed to set display variable manually because there is no real monitor connected to DUT
Expand Down
24 changes: 16 additions & 8 deletions Robot-Framework/test-suites/bat-tests/apps.robot
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Start Firefox
Connect
Start Firefox
Check that the application was started firefox
[Teardown] Kill process @{app_pids}
[Teardown] Kill Process And Log journalctl

Start Chromium on LenovoX1
[Documentation] Start Chromium in dedicated VM and verify process started
Expand All @@ -36,7 +36,7 @@ Start Chromium on LenovoX1
Start XDG application Chromium
Connect to VM ${CHROMIUM_VM}
Check that the application was started chromium
[Teardown] Kill process @{app_pids}
[Teardown] Kill Process And Log journalctl

Start Zathura on LenovoX1
[Documentation] Start Zathura in dedicated VM and verify process started
Expand All @@ -47,7 +47,7 @@ Start Zathura on LenovoX1
Start XDG application 'PDF Viewer'
Connect to VM ${ZATHURA_VM}
Check that the application was started zathura
[Teardown] Kill process @{app_pids}
[Teardown] Kill Process And Log journalctl

Start Gala on LenovoX1
[Documentation] Start Gala in dedicated VM and verify process started
Expand All @@ -58,7 +58,7 @@ Start Gala on LenovoX1
Start XDG application GALA
Connect to VM ${GALA_VM}
Check that the application was started gala
[Teardown] Kill process @{app_pids}
[Teardown] Kill Process And Log journalctl

Start Element on LenovoX1
[Documentation] Start Element in dedicated VM and verify process started
Expand All @@ -69,7 +69,7 @@ Start Element on LenovoX1
Start XDG application Element
Connect to VM ${COMMS_VM}
Check that the application was started element
[Teardown] Kill process @{app_pids}
[Teardown] Kill Process And Log journalctl

Start Slack on LenovoX1
[Documentation] Start Slack in dedicated VM and verify process started
Expand All @@ -80,15 +80,23 @@ Start Slack on LenovoX1
Start XDG application Slack
Connect to VM ${COMMS_VM}
Check that the application was started slack
[Teardown] Kill process @{app_pids}
[Teardown] Kill Process And Log journalctl

Start Appflowy on LenovoX1
[Documentation] Start Appflowy in dedicated VM and verify process started
[Tags] bat appflowy lenovo-x1
[Tags] appflowy lenovo-x1 # Removed bat tag until final decision of this app is made
[Setup] Connect to netvm
Connect to VM ${GUI_VM}
Check if ssh is ready on vm appflowy-vm
Start XDG application AppFlowy
Connect to VM ${APPFLOWY_VM}
Check that the application was started appflowy
[Teardown] Kill process @{app_pids}
[Teardown] Kill Process And Log journalctl


*** Keywords ***
Kill Process And Log journalctl
[Documentation] Kill all running process and log journalctl
${output} Execute Command journalctl
Log ${output}
Kill process @{app_pids}

0 comments on commit 4c8d2e2

Please sign in to comment.