Skip to content

Commit

Permalink
Develop keywords for integrating power data
Browse files Browse the repository at this point in the history
Signed-off-by: Samuli Leivo <[email protected]>
  • Loading branch information
leivos-unikie committed Nov 8, 2024
1 parent b715d12 commit 95bdfbd
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions Robot-Framework/resources/power_meas_keywords.resource
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,30 @@

*** Settings ***
Resource ../config/variables.robot
Library SSHLibrary


*** Keywords ***

Start power measurement
[Documentation] Connect to the measurement agent and run script to start collecting measurement results
[Arguments] ${build_id}=power_data
Connect to measurememnt agent
Start recording power
Connect to measurement agent
Start recording power ${build_id}

Connect to measurememnt agent
[Documentation] Set up SSH connection
Connect to measurement agent
[Documentation] Set up SSH connection to the measurement agent
[Arguments] ${IP}=${MEAS_IP_ADDRESS} ${PORT}=22 ${target_output}=ghaf@raspberrypi
${connection}= Open Connection ${IP} port=${PORT} prompt=\$ timeout=15
${output}= Login username=${LOGIN_PI} password=${PASSWORD_PI}
Should Contain ${output} ${target_output}
RETURN ${connection}

Start recording power
Run Keyword And Ignore Error Execute Command -b python ~/ghaf/ghaf-power-meas/measure_power.py timeout=3
[Arguments] ${file_name}=power_data.csv
Run Keyword And Ignore Error Execute Command -b python ~/ghaf/ghaf-power-meas/measure_power.py ${file_name} timeout=3

Get power record
[Arguments] ${file_name}=power_data.csv
Connect to measurement agent
SSHLibrary.Get File ~/ghaf/ghaf-power-meas/power_data/${file_name}

0 comments on commit 95bdfbd

Please sign in to comment.