aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>2018-07-11 17:39:46 +0100
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-07-13 08:57:35 +0000
commitafef5cdc3356c6466db520c10bb7c829c213ef8a (patch)
treefa46ba28469f849dd431c341c03278c1a6bdb761
parenta89e1737d628885f6a208eac5a4d6c22327011ae (diff)
nsb_setup.sh fails to build DPDK
Some DPDK archive releases have different prefix in the unzipped archived folder name. Fixed scripts to determine the DPDK path using find. JIRA: YARDSTICK-1307 Change-Id: Id50bc1256f458e94aa7d4050a0f8ea3462fe9083 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
-rw-r--r--ansible/roles/download_dpdk/tasks/main.yml14
1 files changed, 13 insertions, 1 deletions
diff --git a/ansible/roles/download_dpdk/tasks/main.yml b/ansible/roles/download_dpdk/tasks/main.yml
index bea3febed..55b466cb7 100644
--- a/ansible/roles/download_dpdk/tasks/main.yml
+++ b/ansible/roles/download_dpdk/tasks/main.yml
@@ -37,8 +37,20 @@
path: "{{ dpdk_dest }}/{{ dpdk_file }}"
state: absent
+- name: find unzipped DPDK folder
+ find:
+ paths: "{{ dpdk_dest }}"
+ patterns: "^dpdk-.*{{ dpdk_version }}$"
+ file_type: directory
+ use_regex: yes
+ register: dpdk_folder_match
+
+- fail:
+ msg: "Cannot find unzipped DPDK folder or more than one found"
+ when: dpdk_folder_match.matched != 1
+
- set_fact:
- dpdk_path: "{{ dpdk_dest }}/{{ dpdk_unarchive }}"
+ dpdk_path: "{{ dpdk_folder_match.files[0].path }}"
- set_fact:
RTE_SDK: "{{ dpdk_path }}"