Run the tests directly without make

The `make test` command runs `make build` which runs `setup.py build_ext -i`.
We want to ensure we are testing the installed extension modules.
This commit is contained in:
Miro Hrončok 2023-11-21 12:02:40 +01:00
parent e595f10324
commit f251ff1be7

View File

@ -24,7 +24,6 @@ Patch: python-psutil-include-unistd.h.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: sed BuildRequires: sed
BuildRequires: make
BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-devel
# Test dependencies # Test dependencies
BuildRequires: procps-ng BuildRequires: procps-ng
@ -89,7 +88,9 @@ done
# That way, some unreliable tests are skipped and some timeouts are extended. # That way, some unreliable tests are skipped and some timeouts are extended.
# Previously, this was done by the CI_TESTING variable, but that works no more. # Previously, this was done by the CI_TESTING variable, but that works no more.
# Alternative is to set GITHUB_ACTIONS but that has undesirable side effects. # Alternative is to set GITHUB_ACTIONS but that has undesirable side effects.
make test APPVEYOR=1 PYTHON=%{__python3} PYTHONPATH=%{buildroot}/%{python3_sitearch}
# Note: We deliberately bypass the Makefile here to test the installed modules.
APPVEYOR=1 %{py3_test_envvars} %{python3} psutil/tests/runner.py
%endif %endif