Skip to content

Commit 2d06efb

Browse files
committed
Add a task in the nmag role to run tests.
1 parent 9ec8e6c commit 2d06efb

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

roles/nmag/tasks/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
---
2+
# This Ansible role installs Nmag on the virtual machine.
3+
14
- include: install_required_debian_packages.yml
25
- include: download_and_extract_nmag_tarball.yml
36
- include: compile_nmag.yml
47
- include: add_nmag_to_PATH.yml dest=/etc/profile.d/nmag.sh
8+
- include: test.yml

roles/nmag/tasks/test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
# This Ansible playbook runs Nmag tests.
3+
4+
- name: Run Nmag configuration script.
5+
command: bash find_nsim.sh
6+
args:
7+
chdir: "{{ NMAG_INSTALL_PREFIX }}/{{ NMAG_VERSION }}/nsim/tests/config"
8+
environment:
9+
PATH: "$PATH:{{ NMAG_INSTALL_PREFIX }}/{{ NMAG_VERSION }}/nsim/bin"
10+
sudo: yes
11+
12+
- name: Run tests.
13+
command: make test
14+
args:
15+
chdir: "{{ NMAG_INSTALL_PREFIX }}/{{ NMAG_VERSION }}/tests"
16+
environment:
17+
PATH: "$PATH:{{ NMAG_INSTALL_PREFIX }}/{{ NMAG_VERSION }}/nsim/bin"
18+
sudo: yes

0 commit comments

Comments
 (0)