Skip to content

Commit

Permalink
Add keywords for power measurement
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 d3d82e0 commit b715d12
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Robot-Framework/resources/power_meas_keywords.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SPDX-FileCopyrightText: 2022-2024 Technology Innovation Institute (TII)
# SPDX-License-Identifier: Apache-2.0

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


*** 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 measurememnt agent
[Documentation] Set up SSH connection
[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

0 comments on commit b715d12

Please sign in to comment.