Optimize Qemu installation to speed up vhost tests
[csit.git] / resources / libraries / robot / performance / performance_configuration.robot
index 61bc4bd..e544cdd 100644 (file)
 | | ... | jumbo_frames=${jumbo_frames}
 | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False}
 | | ... | ${True}
-| | Run Keyword Unless | ${qemu_built} | ${vm_name}.Build QEMU | ${dut_node}
-| | ... | force_install=${True} | apply_patch=${apply_patch}
+| | ${perf_qemu_path}= | Set Variable If | ${apply_patch}
+| | ... | ${perf_qemu_path}-patch/bin/
+| | ... | ${perf_qemu_path}-base/bin/
+| | Run Keyword If | ${qemu_build} | ${vm_name}.Build QEMU | ${dut_node}
+| | ... | apply_patch=${apply_patch}
 | | Run keyword | ${vm_name}.Qemu Set Path | ${perf_qemu_path}
 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
 | | | ... | skip=${skip_cpus} | count=${vm_cpus} | qemu_id=${number}
 | | | ... | jumbo_frames=${jumbo_frames}
 | | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM${number} | ${vm2}
-| | | Run Keyword Unless | ${qemu_built} | Set Suite Variable | ${qemu_built}
-| | | ... | ${True}
 
 | Configure guest VM with dpdk-testpmd using SMT connected via vhost-user
 | | [Documentation]
 | | ... | jumbo_frames=${jumbo_frames}
 | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False}
 | | ... | ${True}
-| | Run Keyword Unless | ${qemu_built} | ${vm_name}.Build QEMU | ${dut_node}
-| | ... | force_install=${True} | apply_patch=${apply_patch}
+| | ${perf_qemu_path}= | Set Variable If | ${apply_patch}
+| | ... | ${perf_qemu_path}-patch/bin/
+| | ... | ${perf_qemu_path}-base/bin/
+| | Run Keyword If | ${qemu_build} | ${vm_name}.Build QEMU | ${dut_node}
+| | ... | apply_patch=${apply_patch}
 | | Run keyword | ${vm_name}.Qemu Set Path | ${perf_qemu_path}
 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
 | | ... | jumbo_frames=${jumbo_frames}
 | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False}
 | | ... | ${True}
-| | Run Keyword Unless | ${qemu_built} | ${vm_name}.Build QEMU | ${dut_node}
-| | ... | force_install=${True} | apply_patch=${apply_patch}
+| | ${perf_qemu_path}= | Set Variable If | ${apply_patch}
+| | ... | ${perf_qemu_path}-patch/bin/
+| | ... | ${perf_qemu_path}-base/bin/
+| | Run Keyword If | ${qemu_build} | ${vm_name}.Build QEMU | ${dut_node}
+| | ... | apply_patch=${apply_patch}
 | | Run keyword | ${vm_name}.Qemu Set Path | ${perf_qemu_path}
 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
 | | | ... | count=${vm_cpus} | qemu_id=${number}
 | | | ... | jumbo_frames=${jumbo_frames}
 | | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM${number} | ${vm2}
-| | | Run Keyword Unless | ${qemu_built} | Set Suite Variable | ${qemu_built}
-| | | ... | ${True}
 
 | Configure guest VM with dpdk-testpmd-mac using SMT connected via vhost-user
 | | [Documentation]
 | | ... | jumbo_frames=${jumbo_frames}
 | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False}
 | | ... | ${True}
-| | Run Keyword Unless | ${qemu_built} | ${vm_name}.Build QEMU | ${dut_node}
-| | ... | force_install=${True} | apply_patch=${apply_patch}
+| | ${perf_qemu_path}= | Set Variable If | ${apply_patch}
+| | ... | ${perf_qemu_path}-patch/bin/
+| | ... | ${perf_qemu_path}-base/bin/
+| | Run Keyword If | ${qemu_build} | ${vm_name}.Build QEMU | ${dut_node}
+| | ... | apply_patch=${apply_patch}
 | | Run keyword | ${vm_name}.Qemu Set Path | ${perf_qemu_path}
 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
 | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False}
 | | ... | ${True}
-| | Run Keyword Unless | ${qemu_built} | ${vm_name}.Build QEMU | ${dut_node}
-| | ... | force_install=${True} | apply_patch=${apply_patch}
+| | ${perf_qemu_path}= | Set Variable If | ${apply_patch}
+| | ... | ${perf_qemu_path}-patch/bin/
+| | ... | ${perf_qemu_path}-base/bin/
+| | Run Keyword If | ${qemu_build} | ${vm_name}.Build QEMU | ${dut_node}
+| | ... | apply_patch=${apply_patch}
 | | Run keyword | ${vm_name}.Qemu Set Path | ${perf_qemu_path}
 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
 | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False}
 | | ... | ${True}
-| | Run Keyword Unless | ${qemu_built} | ${vm_name}.Build QEMU | ${dut_node}
-| | ... | force_install=${True} | apply_patch=${apply_patch}
+| | ${perf_qemu_path}= | Set Variable If | ${apply_patch}
+| | ... | ${perf_qemu_path}-patch/bin/
+| | ... | ${perf_qemu_path}-base/bin/
+| | Run Keyword If | ${qemu_build} | ${vm_name}.Build QEMU | ${dut_node}
+| | ... | apply_patch=${apply_patch}
 | | Run keyword | ${vm_name}.Qemu Set Path | ${perf_qemu_path}
 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1