aboutsummaryrefslogtreecommitdiffstats
path: root/resources/ansible_roles/unixbench
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-22 09:06:05 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-22 10:03:17 +0800
commitbb208192872c841cafdb27769f3680a56b18fa65 (patch)
tree9ebe854c9baa6acb8c9f237111ab0f894f825815 /resources/ansible_roles/unixbench
parentc480cf222cf50e131f9160a39a7f954946b3353d (diff)
Rename folders
* copy -> defaults * render -> custom * roles -> ansible_roles Change-Id: Ia96214691873f3bd8e6c5f9f433292fd912ac46e Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'resources/ansible_roles/unixbench')
-rw-r--r--resources/ansible_roles/unixbench/defaults/main.yml12
-rw-r--r--resources/ansible_roles/unixbench/tasks/main.yml46
-rw-r--r--resources/ansible_roles/unixbench/templates/floating-point.j22
-rw-r--r--resources/ansible_roles/unixbench/templates/integer.j22
4 files changed, 62 insertions, 0 deletions
diff --git a/resources/ansible_roles/unixbench/defaults/main.yml b/resources/ansible_roles/unixbench/defaults/main.yml
new file mode 100644
index 00000000..d1facef5
--- /dev/null
+++ b/resources/ansible_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/ansible_roles/unixbench/tasks/main.yml b/resources/ansible_roles/unixbench/tasks/main.yml
new file mode 100644
index 00000000..4c01609a
--- /dev/null
+++ b/resources/ansible_roles/unixbench/tasks/main.yml
@@ -0,0 +1,46 @@
+#############################################################################
+# 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_results }}/{{ inventory_hostname }}/unixbench"
+ use_ssh_args: yes
+
+- name: create integer and floating point report
+ template:
+ src: "{{ item }}.j2"
+ dest: "{{ qtip_results }}/{{ inventory_hostname }}/{{ item }}"
+ with_items:
+ - floating-point
+ - integer
+ delegate_to: localhost
+ tags: [report]
diff --git a/resources/ansible_roles/unixbench/templates/floating-point.j2 b/resources/ansible_roles/unixbench/templates/floating-point.j2
new file mode 100644
index 00000000..5989d77c
--- /dev/null
+++ b/resources/ansible_roles/unixbench/templates/floating-point.j2
@@ -0,0 +1,2 @@
+Floating Point
+============== \ No newline at end of file
diff --git a/resources/ansible_roles/unixbench/templates/integer.j2 b/resources/ansible_roles/unixbench/templates/integer.j2
new file mode 100644
index 00000000..b494515f
--- /dev/null
+++ b/resources/ansible_roles/unixbench/templates/integer.j2
@@ -0,0 +1,2 @@
+Integer
+======= \ No newline at end of file