diff --git a/Robot-Framework/resources/power_meas_keywords.resource b/Robot-Framework/resources/power_meas_keywords.resource index 06d5e150..ebcc90e3 100644 --- a/Robot-Framework/resources/power_meas_keywords.resource +++ b/Robot-Framework/resources/power_meas_keywords.resource @@ -3,6 +3,7 @@ *** Settings *** Resource ../config/variables.robot +Library SSHLibrary *** Keywords *** @@ -10,11 +11,11 @@ Resource ../config/variables.robot 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} @@ -22,4 +23,10 @@ Connect to measurememnt agent RETURN ${connection} Start recording power - Run Keyword And Ignore Error Execute Command -b python ~/ghaf/ghaf-power-meas/measure_power.py timeout=3 \ No newline at end of file + [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} \ No newline at end of file