summaryrefslogtreecommitdiffstats
path: root/resources/roles/unixbench/tasks/main.yml
blob: d9d5c8f77d40875db7ec656e3a42299d0b4bd660 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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