Skip to content

Commit e9d8492

Browse files
committed
Instead of importing tests as modules into the venv we direct pytest to
the subset (directory) of tests we want to run.
1 parent 2c1d7d5 commit e9d8492

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

etc/kayobe/ansible/stackhpc-cloud-tests.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
suffix: sct-repo
2626
register: repo_tmpdir
2727

28+
- debug: var=repo_tmpdir
29+
2830
- name: Create a temporary directory for results
2931
ansible.builtin.tempfile:
3032
state: directory
@@ -52,7 +54,6 @@
5254
- name: Ensure required individual Python packages are installed
5355
ansible.builtin.pip:
5456
name:
55-
- "{{ repo_tmpdir.path }}"
5657
- pytest-html
5758
- pytest-timeout
5859
virtualenv: "{{ sct_venv }}"
@@ -67,6 +68,14 @@
6768
file: "{{ kayobe_env_config_path }}/kolla/passwords.yml"
6869
name: kolla_passwords
6970

71+
- name: Print CWD
72+
ansible.builtin.command:
73+
cmd: >
74+
/usr/bin/pwd
75+
register: debug_working_dir
76+
77+
- debug: var=debug_working_dir
78+
7079
# Monitoring tests should run once, executed on the host in the
7180
# tempest_runner group.
7281
- name: Run StackHPC Cloud monitoring tests
@@ -75,11 +84,10 @@
7584
{{ sct_venv }}/bin/py.test
7685
--html={{ results_tmpdir.path }}/monitoring.html
7786
--self-contained-html
78-
--pyargs stackhpc_cloud_tests
7987
--timeout {{ sct_timeout }}
8088
-rfEx
8189
-vv
82-
# -k monitoring
90+
"{{ repo_tmpdir.path }}/stackhpc_cloud_tests/monitoring"
8391
environment:
8492
GRAFANA_URL: "{{ sct_grafana_url }}"
8593
GRAFANA_USERNAME: "{{ sct_grafana_username }}"
@@ -125,10 +133,9 @@
125133
{{ sct_venv }}/bin/py.test
126134
--html={{ results_tmpdir.path }}/host-{{ inventory_hostname }}.html
127135
--self-contained-html
128-
--pyargs stackhpc_cloud_tests
129136
--timeout {{ sct_timeout }}
130137
-vv
131-
# -k monitoring
138+
"{{ repo_tmpdir.path }}/stackhpc_cloud_tests/host"
132139
environment:
133140
DOCKER_VERSION_MIN: "{{ sct_docker_version_min }}"
134141
DOCKER_VERSION_MAX: "{{ sct_docker_version_max }}"

0 commit comments

Comments
 (0)