diff options
-rw-r--r-- | benchmarks/perftest/dhrystone.yaml | 16 | ||||
-rw-r--r-- | benchmarks/perftest/dpi.yaml | 16 | ||||
-rw-r--r-- | benchmarks/perftest/fio.yaml | 16 | ||||
-rw-r--r-- | benchmarks/perftest/iperf.yaml | 22 | ||||
-rw-r--r-- | benchmarks/perftest/ramspeed.yaml | 16 | ||||
-rw-r--r-- | benchmarks/perftest/ssl.yaml | 16 | ||||
-rw-r--r-- | benchmarks/perftest/whetstone.yaml | 16 | ||||
-rw-r--r-- | docker/Dockerfile | 2 | ||||
-rw-r--r-- | func/driver.py | 3 | ||||
-rw-r--r-- | results/foo.txt | 1 | ||||
-rw-r--r-- | scripts/ref_results/suite_result.py | 4 | ||||
-rw-r--r-- | tests/driver_test.py | 9 |
12 files changed, 70 insertions, 67 deletions
diff --git a/benchmarks/perftest/dhrystone.yaml b/benchmarks/perftest/dhrystone.yaml index 478cd970..83de5103 100644 --- a/benchmarks/perftest/dhrystone.yaml +++ b/benchmarks/perftest/dhrystone.yaml @@ -4,10 +4,10 @@ tasks: - name: making dhrystone directory - file: path={{workingdir}}/{{Dest_dir}}/dhrystone state=directory + file: path={{Dest_dir}}/dhrystone state=directory - name: making temporary dhrystone directory - file: path={{workingdir}}/{{Dest_dir}}/dhrystone/dhrystone_temp state=directory + file: path={{Dest_dir}}/dhrystone/dhrystone_temp state=directory - hosts: "{{role}}" become: yes @@ -76,7 +76,7 @@ register: files_to_copy - name: copy results - fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/dhrystone/dhrystone_temp + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/dhrystone/dhrystone_temp with_items: "{{files_to_copy.stdout_lines}}" - name: registering log files @@ -84,7 +84,7 @@ register: copy_log_results - name: copying log results - fetch: src={{home_dir.stdout}}/qtip_result/log/{{item}} dest={{workingdir}}/{{Dest_dir}}/dhrystone/dhrystone_temp + fetch: src={{home_dir.stdout}}/qtip_result/log/{{item}} dest={{Dest_dir}}/dhrystone/dhrystone_temp with_items: "{{copy_log_results.stdout_lines}}" - name: cleaning tempT @@ -99,13 +99,13 @@ tasks: - name: extracting_json - shell: ( find {{workingdir}}/{{Dest_dir}}/dhrystone/dhrystone_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/dhrystone/) + shell: (find {{Dest_dir}}/dhrystone/dhrystone_temp/ -name "*.json" | xargs cp -t {{Dest_dir}}/dhrystone/) - name: making_logs_folder - file: path={{workingdir}}/{{Dest_dir}}/dhrystone/logs state=directory + file: path={{Dest_dir}}/dhrystone/logs state=directory - name: extracting_log - shell: ( find {{workingdir}}/{{Dest_dir}}/dhrystone/dhrystone_temp/ -name "*.log" | xargs cp -t {{workingdir}}/{{Dest_dir}}/dhrystone/logs) + shell: (find {{Dest_dir}}/dhrystone/dhrystone_temp/ -name "*.log" | xargs cp -t {{Dest_dir}}/dhrystone/logs) - name: removing dhrystone_temp - file: path={{workingdir}}/{{Dest_dir}}/dhrystone/dhrystone_temp state=directory + file: path={{Dest_dir}}/dhrystone/dhrystone_temp state=directory diff --git a/benchmarks/perftest/dpi.yaml b/benchmarks/perftest/dpi.yaml index 455c5ac9..0afd4f81 100644 --- a/benchmarks/perftest/dpi.yaml +++ b/benchmarks/perftest/dpi.yaml @@ -4,10 +4,10 @@ tasks: - name: making dpi directory - file: path={{workingdir}}/{{Dest_dir}}/dpi state=directory + file: path={{Dest_dir}}/dpi state=directory - name: making temporary whetstone directory - file: path={{workingdir}}/{{Dest_dir}}/dpi/dpi_temp state=directory + file: path={{Dest_dir}}/dpi/dpi_temp state=directory - hosts: "{{role}}" become: yes @@ -91,7 +91,7 @@ register: files_to_copy - name: copy results - fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/dpi/dpi_temp + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/dpi/dpi_temp with_items: "{{files_to_copy.stdout_lines}}" - name: registering log files @@ -99,7 +99,7 @@ register: copy_log_results - name: copying log results - fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/dpi/dpi_temp + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/dpi/dpi_temp with_items: "{{copy_log_results.stdout_lines}}" - name: cleaning tempD @@ -114,13 +114,13 @@ tasks: - name: extracting_json - shell: ( find {{workingdir}}/{{Dest_dir}}/dpi/dpi_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/dpi/) + shell: (find {{Dest_dir}}/dpi/dpi_temp/ -name "*.json" | xargs cp -t {{Dest_dir}}/dpi/) - name: making_logs_folder - file: path={{workingdir}}/{{Dest_dir}}/dpi/logs state=directory + file: path={{Dest_dir}}/dpi/logs state=directory - name: extracting_log - shell: ( find {{workingdir}}/{{Dest_dir}}/dpi/dpi_temp/ -name "*.log" | xargs cp -t {{workingdir}}/{{Dest_dir}}/dpi/logs) + shell: (find {{Dest_dir}}/dpi/dpi_temp/ -name "*.log" | xargs cp -t {{Dest_dir}}/dpi/logs) - name: removing dpi_temp - file: path={{workingdir}}/{{Dest_dir}}/dpi/dpi_temp state=absent + file: path={{Dest_dir}}/dpi/dpi_temp state=absent diff --git a/benchmarks/perftest/fio.yaml b/benchmarks/perftest/fio.yaml index 23f2b202..c9fd9011 100644 --- a/benchmarks/perftest/fio.yaml +++ b/benchmarks/perftest/fio.yaml @@ -4,10 +4,10 @@ tasks: - name: making fio directory - file: path={{workingdir}}/{{Dest_dir}}/fio state=directory + file: path={{Dest_dir}}/fio state=directory - name: making temporary fio directory - file: path={{workingdir}}/{{Dest_dir}}/fio/fio_temp state=directory + file: path={{Dest_dir}}/fio/fio_temp state=directory - hosts: "{{role}}" @@ -77,7 +77,7 @@ register: files_to_copy - name: copy results - fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/fio/fio_temp + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/fio/fio_temp with_items: "{{files_to_copy.stdout_lines}}" - name: registering log files @@ -85,7 +85,7 @@ register: copy_log_results - name: copying log results - fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/fio/fio_temp + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/fio/fio_temp with_items: "{{copy_log_results.stdout_lines}}" - name: cleaning fio @@ -100,13 +100,13 @@ tasks: - name: extracting_json - shell: ( find {{workingdir}}/{{Dest_dir}}/fio/fio_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/fio/) + shell: (find {{Dest_dir}}/fio/fio_temp/ -name "*.json" | xargs cp -t {{Dest_dir}}/fio/) - name: making_logs_folder - file: path={{workingdir}}/{{Dest_dir}}/fio/logs state=directory + file: path={{Dest_dir}}/fio/logs state=directory - name: extracting_log - shell: ( find {{workingdir}}/{{Dest_dir}}/fio/fio_temp/ -name "*.log" | xargs cp -t {{workingdir}}/{{Dest_dir}}/fio/logs) + shell: (find {{Dest_dir}}/fio/fio_temp/ -name "*.log" | xargs cp -t {{Dest_dir}}/fio/logs) - name: removing fio_log - file: path={{workingdir}}/{{Dest_dir}}/fio/fio_temp state=absent + file: path={{Dest_dir}}/fio/fio_temp state=absent diff --git a/benchmarks/perftest/iperf.yaml b/benchmarks/perftest/iperf.yaml index 46c8d6cf..7886e8a1 100644 --- a/benchmarks/perftest/iperf.yaml +++ b/benchmarks/perftest/iperf.yaml @@ -3,15 +3,11 @@ gather_facts: no tasks: - - name: getting directory - shell: sudo echo $PWD - register: qtip_dir - - name: making Iperf directory - file: path={{workingdir}}/{{Dest_dir}}/iperf state=directory + file: path={{Dest_dir}}/iperf state=directory - name: making temporary iperf directory - file: path={{workingdir}}/{{Dest_dir}}/iperf/iperf_temp state=directory + file: path={{Dest_dir}}/iperf/iperf_temp state=directory - hosts: "{{role}}" @@ -117,7 +113,7 @@ when: rolename =="2-host" and "{{ip2}}" == '' - name: copy results - fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/iperf/iperf_temp + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/iperf/iperf_temp with_items: "{{files_to_copy.stdout_lines}}" when: rolename =="2-host" and "{{ip2}}" == '' @@ -127,7 +123,7 @@ when: rolename =="2-host" and "{{ip2}}" == '' - name: copying log results - fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/iperf/iperf_temp + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/iperf/iperf_temp with_items: "{{copy_log_results.stdout_lines}}" when: rolename =="2-host" and "{{ip2}}" == '' @@ -148,19 +144,19 @@ when: role is defined - name: extracting_json - shell: ( find {{workingdir}}/{{Dest_dir}}/iperf/iperf_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/iperf/) + shell: (find {{Dest_dir}}/iperf/iperf_temp/ -name "*.json" | xargs cp -t {{Dest_dir}}/iperf/) when: rolename == "2-host" - name: making_logs_folder - file: path={{workingdir}}/{{Dest_dir}}/iperf/logs state=directory + file: path={{Dest_dir}}/iperf/logs state=directory - name: extracting_log - shell: ( find {{workingdir}}/{{Dest_dir}}/iperf/iperf_temp/ -name "*.log" | xargs cp -t {{workingdir}}/{{Dest_dir}}/iperf/logs) + shell: ( find {{Dest_dir}}/iperf/iperf_temp/ -name "*.log" | xargs cp -t {{Dest_dir}}/iperf/logs) when: rolename == "2-host" - name: removing iperf_raw file - file: path={{workingdir}}/{{Dest_dir}}/iperf/iperf_raw.json state=absent + file: path={{Dest_dir}}/iperf/iperf_raw.json state=absent when: rolename == "2-host" - name: removing iperf_temp - file: path={{workingdir}}/{{Dest_dir}}/iperf/iperf_temp state=absent + file: path={{Dest_dir}}/iperf/iperf_temp state=absent diff --git a/benchmarks/perftest/ramspeed.yaml b/benchmarks/perftest/ramspeed.yaml index 847a8641..f3205755 100644 --- a/benchmarks/perftest/ramspeed.yaml +++ b/benchmarks/perftest/ramspeed.yaml @@ -4,10 +4,10 @@ tasks: - name: making ramspeed directory - file: path={{workingdir}}/{{Dest_dir}}/ramspeed state=directory + file: path={{Dest_dir}}/ramspeed state=directory - name: making temporary ramspeed directory - file: path={{workingdir}}/{{Dest_dir}}/ramspeed/ramspeed_temp state=directory + file: path={{Dest_dir}}/ramspeed/ramspeed_temp state=directory - hosts: "{{role}}" @@ -80,7 +80,7 @@ register: files_to_copy - name: copy results - fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/ramspeed/ramspeed_temp + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/ramspeed/ramspeed_temp with_items: "{{files_to_copy.stdout_lines}}" - name: registering log files @@ -88,7 +88,7 @@ register: copy_log_results - name: copying log results - fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/ramspeed/ramspeed_temp + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/ramspeed/ramspeed_temp with_items: "{{copy_log_results.stdout_lines}}" - name: cleaning ramspeed directory @@ -103,13 +103,13 @@ tasks: - name: extracting_json - shell: ( find {{workingdir}}/{{Dest_dir}}/ramspeed/ramspeed_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/ramspeed/) + shell: (find /{{Dest_dir}}/ramspeed/ramspeed_temp/ -name "*.json" | xargs cp -t {{Dest_dir}}/ramspeed/) - name: making_logs_folder - file: path={{workingdir}}/{{Dest_dir}}/ramspeed/logs state=directory + file: path={{Dest_dir}}/ramspeed/logs state=directory - name: extracting_log - shell: ( find {{workingdir}}/{{Dest_dir}}/ramspeed/ramspeed_temp/ -name "*.log" | xargs cp -t {{workingdir}}/{{Dest_dir}}/ramspeed/logs) + shell: ( find {{Dest_dir}}/ramspeed/ramspeed_temp/ -name "*.log" | xargs cp -t {{Dest_dir}}/ramspeed/logs) - name: removing ramspeed_log - file: path={{workingdir}}/{{Dest_dir}}/ramspeed/ramspeed_temp state=absent + file: path={{Dest_dir}}/ramspeed/ramspeed_temp state=absent diff --git a/benchmarks/perftest/ssl.yaml b/benchmarks/perftest/ssl.yaml index 0c0e5129..f72c7cfe 100644 --- a/benchmarks/perftest/ssl.yaml +++ b/benchmarks/perftest/ssl.yaml @@ -4,10 +4,10 @@ tasks: - name: making ssl directory - file: path={{workingdir}}/{{Dest_dir}}/ssl state=directory + file: path={{Dest_dir}}/ssl state=directory - name: making temporary ssl directory - file: path={{workingdir}}/{{Dest_dir}}/ssl/ssl_temp state=directory + file: path={{Dest_dir}}/ssl/ssl_temp state=directory - hosts: "{{role}}" become: yes @@ -81,7 +81,7 @@ register: files_to_copy - name: copy results - fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/ssl/ssl_temp + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/ssl/ssl_temp with_items: "{{files_to_copy.stdout_lines}}" - name: registering log files @@ -89,7 +89,7 @@ register: copy_log_results - name: copying log results - fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/ssl/ssl_temp + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/ssl/ssl_temp with_items: "{{copy_log_results.stdout_lines}}" - name: cleaning Open_SSL directory @@ -107,13 +107,13 @@ shell: echo $PWD - name: extracting_json - shell: ( find {{workingdir}}/{{Dest_dir}}/ssl/ssl_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/ssl/) + shell: (find {{Dest_dir}}/ssl/ssl_temp/ -name "*.json" | xargs cp -t {{Dest_dir}}/ssl/) - name: making_logs_folder - file: path={{workingdir}}/{{Dest_dir}}/ssl/logs state=directory + file: path={{Dest_dir}}/ssl/logs state=directory - name: extracting_log - shell: ( find {{workingdir}}/{{Dest_dir}}/ssl/ssl_temp/ -name "*.log" | xargs cp -t {{workingdir}}/{{Dest_dir}}/ssl/logs) + shell: (find {{Dest_dir}}/ssl/ssl_temp/ -name "*.log" | xargs cp -t {{Dest_dir}}/ssl/logs) - name: removing ssl_temp - file: path={{workingdir}}/{{Dest_dir}}/ssl/ssl_temp state=absent + file: path={{Dest_dir}}/ssl/ssl_temp state=absent diff --git a/benchmarks/perftest/whetstone.yaml b/benchmarks/perftest/whetstone.yaml index 94532841..0bacb253 100644 --- a/benchmarks/perftest/whetstone.yaml +++ b/benchmarks/perftest/whetstone.yaml @@ -4,10 +4,10 @@ tasks: - name: making whetstone directory - file: path={{workingdir}}/{{Dest_dir}}/whetstone state=directory + file: path={{Dest_dir}}/whetstone state=directory - name: making temporary whetstone directory - file: path={{workingdir}}/{{Dest_dir}}/whetstone/whetstone_temp state=directory + file: path={{Dest_dir}}/whetstone/whetstone_temp state=directory - hosts: "{{role}}" become: yes @@ -76,7 +76,7 @@ register: files_to_copy - name: copy results - fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/whetstone/whetstone_temp + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/whetstone/whetstone_temp with_items: "{{files_to_copy.stdout_lines}}" - name: registering log files @@ -84,7 +84,7 @@ register: copy_log_results - name: copying log results - fetch: src={{home_dir.stdout}}/qtip_result/log/{{item}} dest={{workingdir}}/{{Dest_dir}}/whetstone/whetstone_temp + fetch: src={{home_dir.stdout}}/qtip_result/log/{{item}} dest={{Dest_dir}}/whetstone/whetstone_temp with_items: "{{copy_log_results.stdout_lines}}" - name: cleaning tempT directory @@ -99,13 +99,13 @@ tasks: - name: extracting_json - shell: ( find {{workingdir}}/{{Dest_dir}}/whetstone/whetstone_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/whetstone/) + shell: (find {{Dest_dir}}/whetstone/whetstone_temp/ -name "*.json" | xargs cp -t {{Dest_dir}}/whetstone/) - name: making_logs_folder - file: path={{workingdir}}/{{Dest_dir}}/whetstone/logs state=directory + file: path={{Dest_dir}}/whetstone/logs state=directory - name: extracting_log - shell: ( find {{workingdir}}/{{Dest_dir}}/whetstone/whetstone_temp/ -name "*.log" | xargs cp -t {{workingdir}}/{{Dest_dir}}/whetstone/logs) + shell: (find {{Dest_dir}}/whetstone/whetstone_temp/ -name "*.log" | xargs cp -t {{Dest_dir}}/whetstone/logs) - name: removing whetstone_temp - file: path={{workingdir}}/{{Dest_dir}}/whetstone/whetstone_temp state=absent + file: path={{Dest_dir}}/whetstone/whetstone_temp state=absent diff --git a/docker/Dockerfile b/docker/Dockerfile index 8d951fc5..5762409a 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -48,6 +48,8 @@ RUN apt-get install ansible --force-yes -y RUN mkdir -p ${REPOS_DIR} RUN mkdir -p /root/.ssh RUN mkdir -p $HOME/qtip/logs +RUN mkdir -p $HOME/qtip/results + RUN chmod 700 /root/.ssh #Config ansible diff --git a/func/driver.py b/func/driver.py index 47d00f1f..c765728b 100644 --- a/func/driver.py +++ b/func/driver.py @@ -9,6 +9,7 @@ from utils import logger_utils from operator import add from ansible_api import AnsibleApi +from os.path import expanduser logger = logger_utils.QtipLogger('driver').get @@ -35,7 +36,7 @@ class Driver: def get_common_var_json(self, installer_type, pwd, benchmark_fname, benchmark_detail, pip_dict, proxy_info): - common_json = {'Dest_dir': 'results', + common_json = {'Dest_dir': expanduser('~') + '/qtip/results', 'ip1': '', 'ip2': '', 'installer': str(installer_type), diff --git a/results/foo.txt b/results/foo.txt deleted file mode 100644 index 257cc564..00000000 --- a/results/foo.txt +++ /dev/null @@ -1 +0,0 @@ -foo diff --git a/scripts/ref_results/suite_result.py b/scripts/ref_results/suite_result.py index 4d9eae08..217181f9 100644 --- a/scripts/ref_results/suite_result.py +++ b/scripts/ref_results/suite_result.py @@ -10,6 +10,7 @@ import json import importlib import sys from utils import logger_utils +from os.path import expanduser logger = logger_utils.QtipLogger('suite_result').get @@ -43,7 +44,8 @@ def get_suite_result(suite_name): suite_index = temp / l suite_dict_f = {'index': suite_index, 'suite_results': suite_dict} - with open('results/{0}_result.json'.format(suite_name), 'w+') as result_json: + result_path = expanduser('~') + '/qtip/results' + with open('{0}/{1}_result.json'.format(result_path, suite_name), 'w+') as result_json: json.dump(suite_dict_f, result_json, indent=4, sort_keys=True) return True diff --git a/tests/driver_test.py b/tests/driver_test.py index bc705dad..41a7dee4 100644 --- a/tests/driver_test.py +++ b/tests/driver_test.py @@ -1,6 +1,9 @@ import pytest import mock from func.driver import Driver +from os.path import expanduser + +HOME_DIR = expanduser('~') class TestClass: @@ -15,7 +18,7 @@ class TestClass: {'http_proxy': 'http://10.20.0.1:8118', 'https_proxy': 'http://10.20.0.1:8118', 'no_proxy': 'localhost,127.0.0.1,10.20.*,192.168.*'}], - [{'Dest_dir': 'results', + [{'Dest_dir': HOME_DIR + '/qtip/results', 'ip1': '', 'ip2': '', 'installer': 'fuel', @@ -37,7 +40,7 @@ class TestClass: [('duration', 20), ('protocol', 'tcp'), ('bandwidthGbps', 0)], [('1-server', '10.10.17.4'), ('2-host', '10.10.17.5')], {}], - [{'Dest_dir': 'results', + [{'Dest_dir': HOME_DIR + '/qtip/results', 'ip1': '10.20.0.13', 'ip2': '', 'installer': 'joid', @@ -49,7 +52,7 @@ class TestClass: 'protocol': 'tcp', 'bandwidthGbps': 0, "role": "1-server"}, - {'Dest_dir': 'results', + {'Dest_dir': HOME_DIR + '/qtip/results', 'ip1': '10.20.0.13', 'ip2': '', 'installer': 'joid', |