14 |
14 |
|
15 |
15 |
LICENSE="Apache-2.0"
|
16 |
16 |
SLOT="0"
|
17 |
|
KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
|
|
17 |
KEYWORDS="~amd64 ~riscv ~x86"
|
18 |
18 |
IUSE="test"
|
19 |
19 |
|
20 |
20 |
RDEPEND="
|
21 |
21 |
dev-python/attrs[${PYTHON_USEDEP}]
|
22 |
|
dev-python/pytest-tempdir[${PYTHON_USEDEP}]
|
23 |
22 |
dev-python/docker[${PYTHON_USEDEP}]
|
24 |
23 |
dev-python/psutil[${PYTHON_USEDEP}]
|
25 |
|
>=dev-python/pytest-6.0.0[${PYTHON_USEDEP}]
|
|
24 |
>=dev-python/pytest-7.0.0[${PYTHON_USEDEP}]
|
26 |
25 |
dev-python/pytest-helpers-namespace[${PYTHON_USEDEP}]
|
27 |
26 |
dev-python/pytest-skip-markers[${PYTHON_USEDEP}]
|
28 |
27 |
dev-python/pytest-system-statistics[${PYTHON_USEDEP}]
|
... | ... | |
30 |
29 |
dev-python/pyzmq[${PYTHON_USEDEP}]
|
31 |
30 |
dev-python/msgpack[${PYTHON_USEDEP}]
|
32 |
31 |
dev-python/virtualenv[${PYTHON_USEDEP}]
|
33 |
|
>=app-admin/salt-3001.0[${PYTHON_USEDEP}]
|
|
32 |
>=app-admin/salt-3005.1[${PYTHON_USEDEP}]
|
34 |
33 |
"
|
35 |
34 |
BDEPEND="
|
36 |
35 |
${RDEPEND}
|
37 |
36 |
test? (
|
|
37 |
dev-python/importlib-metadata[${PYTHON_USEDEP}]
|
38 |
38 |
dev-python/pyfakefs[${PYTHON_USEDEP}]
|
39 |
39 |
dev-python/pytest-subtests[${PYTHON_USEDEP}]
|
40 |
40 |
)
|
41 |
41 |
"
|
42 |
42 |
|
43 |
43 |
PATCHES=(
|
44 |
|
"${FILESDIR}/pytest-salt-factories-1.0.0_rc20-tests.patch"
|
45 |
44 |
)
|
46 |
45 |
|
47 |
46 |
distutils_enable_tests pytest
|
... | ... | |
56 |
55 |
}
|
57 |
56 |
|
58 |
57 |
python_test() {
|
59 |
|
local tempdir
|
60 |
|
|
61 |
|
local -a disable_tests=(
|
62 |
|
testexcludetest
|
63 |
|
test_version_info
|
|
58 |
local -a EPYTEST_DESELECT=(
|
|
59 |
tests/functional/factories/cli/test_call.py::test_version_info
|
|
60 |
tests/functional/factories/cli/test_cloud.py::test_version_info
|
|
61 |
tests/functional/factories/cli/test_cp.py::test_version_info
|
|
62 |
tests/functional/factories/cli/test_key.py::test_version_info
|
|
63 |
tests/functional/factories/cli/test_run.py::test_version_info
|
|
64 |
tests/functional/factories/cli/test_salt.py::test_version_info
|
|
65 |
tests/functional/factories/cli/test_spm.py::test_version_info
|
|
66 |
tests/functional/factories/cli/test_ssh.py::test_version_info
|
|
67 |
tests/integration/factories/daemons/ssh/test_salt_ssh.py::test_salt_ssh
|
|
68 |
tests/integration/factories/daemons/sshd/test_sshd.py::test_connect
|
|
69 |
tests/scenarios/examples/test_echoext.py::test_echoext
|
|
70 |
tests/functional/factories/daemons/test_container_factory.py::test_skip_on_pull_failure
|
|
71 |
tests/functional/factories/daemons/test_container_factory.py::test_skip_if_docker_client_not_connectable
|
64 |
72 |
)
|
65 |
|
local textexpr
|
66 |
|
testexpr=$(printf 'not %s and ' "${disable_tests[@]}")
|
67 |
73 |
|
|
74 |
local tempdir
|
68 |
75 |
# ${T} is too long a path for the tests to work
|
69 |
76 |
tempdir="$(mktemp -du --tmpdir=/tmp salt-XXX)" || die
|
70 |
77 |
addwrite "${tempdir}"
|
... | ... | |
74 |
81 |
|
75 |
82 |
trap cleanup EXIT
|
76 |
83 |
export SHELL="/bin/bash" TMPDIR="${tempdir}"
|
77 |
|
epytest -vv -k "${testexpr%and }"
|
|
84 |
epytest --no-sys-stats
|
78 |
85 |
)
|
79 |
86 |
}
|