summaryrefslogtreecommitdiffstats
path: root/resources/roles
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-19 15:06:28 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-20 11:34:11 +0800
commit31d52cd81cbd143f619d44e113cd6336fc726e40 (patch)
tree45397c8f4990b25673c3a615003cbedb68d21ded /resources/roles
parentac8c825582a56bba3a1d1c966322f80aa93fe137 (diff)
Add UnixBench benchmarking role
Change-Id: I14e1630ff67bf4dff0998456e57fee2b1656f585 Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'resources/roles')
-rw-r--r--resources/roles/unixbench/defaults/main.yml12
-rw-r--r--resources/roles/unixbench/meta/main.yml12
-rw-r--r--resources/roles/unixbench/tasks/main.yml36
3 files changed, 60 insertions, 0 deletions
diff --git a/resources/roles/unixbench/defaults/main.yml b/resources/roles/unixbench/defaults/main.yml
new file mode 100644
index 00000000..d1facef5
--- /dev/null
+++ b/resources/roles/unixbench/defaults/main.yml
@@ -0,0 +1,12 @@
+#############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+#############################################################################
+
+cwd: "{{ ansible_env.HOME }}/qtip/unixbench"
+iterations: 1
+parallel_copies: 1 \ No newline at end of file
diff --git a/resources/roles/unixbench/meta/main.yml b/resources/roles/unixbench/meta/main.yml
new file mode 100644
index 00000000..03c96c42
--- /dev/null
+++ b/resources/roles/unixbench/meta/main.yml
@@ -0,0 +1,12 @@
+#############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+#############################################################################
+
+---
+dependencies:
+ - { role: development-tools }
diff --git a/resources/roles/unixbench/tasks/main.yml b/resources/roles/unixbench/tasks/main.yml
new file mode 100644
index 00000000..d9d5c8f7
--- /dev/null
+++ b/resources/roles/unixbench/tasks/main.yml
@@ -0,0 +1,36 @@
+#############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+#############################################################################
+
+- name: make unixbench working directory
+ file:
+ path: "{{ cwd }}"
+ state: directory
+
+- name: download unixbench source code
+ unarchive:
+ src: https://github.com/kdlucas/byte-unixbench/archive/v5.1.3.tar.gz
+ dest: "{{ cwd }}"
+ remote_src: yes
+
+- name: build UnixBench
+ command: "make"
+ args:
+ chdir: "{{ cwd }}/byte-unixbench-5.1.3/UnixBench"
+
+- name: run whetstone and dhrystone
+ shell: "./Run -i {{ iterations }} -c {{ parallel_copies }} dhrystone whetstone"
+ args:
+ chdir: "{{ cwd }}/byte-unixbench-5.1.3/UnixBench"
+
+- name: synchronize test results to local
+ synchronize:
+ mode: pull
+ src: "{{ cwd }}/byte-unixbench-5.1.3/UnixBench/results"
+ dest: "{{ qtip_dump }}/{{ inventory_hostname }}/unixbench"
+ use_ssh_args: yes