devstack-plugin-tobiko/roles/devstack-tobiko-run-tests/tasks/run-tests.yaml
Federico Ressi 9108be7e83 Avoid re-stacking when not necessary
Also adds a swap file of 8GB

Change-Id: I50b7dcb5ca40c9840ae086006c9d868637d3b5d0
2020-10-02 15:39:53 +02:00

26 lines
502 B
YAML

---
- set_fact:
tox_command_line: "{{ tox_command_line | replace('\n', '') }}"
- debug: var=tox_command_line
- name: "Run test cases: {{ tox_command_line }}"
become: true
become_user: stack
shell:
cmd: |
sudo su -l stack -c "cd '{{ test_dir }}' && {{ tox_command_line }}" 2>&1
rc=$?
echo "*** FINISHED ***"
exit $rc
register: run_tox
ignore_errors: true
- name: Show test cases output
debug: var=run_tox.stdout_lines
failed_when: run_tox is failed