https://bugzilla.redhat.com/show_bug.cgi?id=2217257



--- Comment #18 from Benson Muite <[email protected]> ---
Adding the following to the spec file (probably better done with patches) seems
to enable the tests to run:

%check
%pyproject_check_import
touch check.sh
echo "PATH=%{buildroot}%{_bindir}:${PATH}
PYTHONPATH=%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}:${PYTHONPATH}
%{python3} %{buildroot}%{_bindir}/nihtest -v \$1 " >> check.sh
# Update CMakelists configuration to use installed nihtest
sed -i 's|${NIHTEST}|bash %{_builddir}/%{pypi_name}-%{version}/check.sh|g'
tests/CMakeLists.txt
sed -i 's|ENVIRONMENT "PATH=${path}"|ENVIRONMENT
"PYTHONPATH=%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}:$ENV{PYTHONPATH}"|g'
tests/CMakeLists.txt
sed -i 's|set|#set|g' CMakeLists.txt
sed -i 's|add_custom|#add_custom|g' CMakeLists.txt
sed -i 's|COMMAND|#COMMAND|g' CMakeLists.txt
sed -i 's|OUTPUT|#OUTPUT|g' CMakeLists.txt
sed -i 's|DEPENDS|#DEPENDS|g' CMakeLists.txt
sed -i 's|^)|#)|g' CMakeLists.txt 
echo "" >> tests/nihtest.conf.in
echo "[environment]" >> tests/nihtest.conf.in
echo
"PYTHONPATH=%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}" >>
tests/nihtest.conf.in
%cmake
%cmake_build
%ctest


-- 
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2217257

Report this comment as SPAM: 
https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202217257%23c18
_______________________________________________
package-review mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to