Skip to content

Commit

Permalink
Fix iperf tests
Browse files Browse the repository at this point in the history
Signed-off-by: Mariia Azbeleva <[email protected]>
  • Loading branch information
azbeleva committed Dec 16, 2024
1 parent 72ffc48 commit f6a08f4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Robot-Framework/test-suites/performance-tests/fileio_test
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ THREADS="$1"
DISK_CHECK_DIRECTORY="${2:-/}"

# Create a directory for the results and copy this script into it
RESULT_DIR="/home/ghaf/sysbench_results"
RESULT_DIR="/tmp/sysbench_results"
echo -e "\nCreating directory for test results:\n$RESULT_DIR"
mkdir -p $RESULT_DIR
FileName=${0##*/}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Run iperf server on DUT
[Documentation] Run iperf on DUT in server mode
Clear iptables rules
${command} Set Variable iperf -s
Execute Command nohup ${command} > output.log 2>&1 &
Execute Command nohup ${command} > /tmp/output.log 2>&1 &
Check iperf was started

Clear iptables rules
Expand Down
28 changes: 16 additions & 12 deletions Robot-Framework/test-suites/performance-tests/performance.robot
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,13 @@ FileIO test
# In case of Lenovo-X1 run the test in /gp_storage which has more disk space than /home/ghaf
# Results are still saved to /home/ghaf
IF "Lenovo" in "${DEVICE}"
Execute Command cp ./fileio_test /gp_storage sudo=True sudo_password=${PASSWORD}
Execute Command cd /gp_storage sudo=True sudo_password=${PASSWORD}
Execute Command ./fileio_test ${threads_number} /gp_storage sudo=True sudo_password=${PASSWORD}
Execute Command cd /home/ghaf sudo=True sudo_password=${PASSWORD}
Execute Command cp /tmp/fileio_test /gp_storage sudo=True sudo_password=${PASSWORD}
Execute Command cd /gp_storage
Execute Command ./fileio_test ${threads_number} /gp_storage
Execute Command cd /tmp
ELSE
Execute Command ./fileio_test ${threads_number} sudo=True sudo_password=${PASSWORD}
Execute Command /tmp/fileio_test ${threads_number} sudo=True sudo_password=${PASSWORD}
Execute Command cd /tmp sudo=True sudo_password=${PASSWORD}
END

${test_info} Execute Command cat sysbench_results/test_info
Expand Down Expand Up @@ -293,7 +294,7 @@ Sysbench test in VMs on LenovoX1
IF '${vm_fail}' == 'FAIL'
Log to Console Skipping tests for ${vm} because couldn't connect to it
ELSE
${output} Execute Command ./sysbench_test ${threads_n} sudo=True sudo_password=${PASSWORD}
${output} Execute Command /tmp/sysbench_test ${threads_n} sudo=True sudo_password=${PASSWORD}
Run Keyword If ${threads_n} > 1 Save sysbench results ${vm}
Save sysbench results ${vm} _1thread
Switch Connection ${netvm_ssh}
Expand Down Expand Up @@ -364,13 +365,15 @@ LenovoX1 Setup
${output} Execute Command ssh-keygen -R ${NETVM_IP}

Transfer FileIO Test Script To DUT
Put File performance-tests/fileio_test /home/ghaf
Execute Command chmod 777 fileio_test
Put File performance-tests/fileio_test /tmp
Execute Command chmod 777 /tmp/fileio_test
Execute Command cd /tmp

Transfer Sysbench Test Script To NetVM
Connect to netvm
Put File performance-tests/sysbench_test /home/ghaf
Execute Command chmod 777 sysbench_test
Put File performance-tests/sysbench_test /tmp
Execute Command chmod 777 /tmp/sysbench_test
Execute Command cd /tmp

Transfer Sysbench Test Script To VM
[Arguments] ${vm}
Expand All @@ -380,8 +383,9 @@ Transfer Sysbench Test Script To VM
Run Keyword If '${vm_fail}' == 'FAIL' Return From Keyword ${vm_fail}
Log to console Successfully connected to ${vm}
END
Put File performance-tests/sysbench_test /home/ghaf
Execute Command chmod 777 sysbench_test
Put File performance-tests/sysbench_test /tmp
Execute Command chmod 777 /tmp/sysbench_test
Execute Command cd /tmp

Save cpu results
[Arguments] ${test}=cpu ${host}=ghaf_host
Expand Down

0 comments on commit f6a08f4

Please sign in to comment.