forked from saltstack/salt-ci-images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
testrun.sls
30 lines (27 loc) · 1012 Bytes
/
testrun.sls
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
{% from '_python.sls' import python with context %}
{% import 'git/salt.sls' as gitsalt with context %}
{% set test_transport = pillar.get('test_transport', 'zeromq') %}
{% set with_coverage = pillar.get('with_coverage', True) %}
include:
- git.salt
test_cmd:
{%- if 'runtests.run' in salt %}
runtests.run:
{%- else %}
cmd.run:
{%- endif %}
- name: '{{ python }} /testing/tests/runtests.py -v --run-destructive --sysinfo --no-colors --ssh --xml=/tmp/xml-unittests-output{% if with_coverage %} --coverage-xml=/tmp/coverage.xml{% endif %} --transport={{ test_transport }}; code=$?; echo "Test Suite Exit Code: ${code}";'
- order: last
- require:
- git: clone-salt-repo
{%- if gitsalt.test_git_url != "https://github.com/saltstack/salt.git" %}
- cmd: fetch-upstream-tags
{%- endif %}
- env:
- XML_TESTS_OUTPUT_DIR: /tmp/xml-unittests-output
sdist_cmd:
cmd.run:
- name: '{{ python }} setup.py sdist'
- cwd: '/testing'
- require:
- cmd: test_cmd