Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make pytest succeeds even if python-3-pytest is not installed #542

Closed
tmakatos opened this issue May 28, 2021 · 3 comments · Fixed by #556
Closed

make pytest succeeds even if python-3-pytest is not installed #542

tmakatos opened this issue May 28, 2021 · 3 comments · Fixed by #556
Labels
bug Something isn't working

Comments

@tmakatos
Copy link
Member

tmakatos commented May 28, 2021

We should at least print that no tests have been run because python-3-pytest is not installed.

@tmakatos tmakatos added the bug Something isn't working label May 28, 2021
@tmakatos tmakatos changed the title make pytest succeeds even if pytest-3 is not installed make pytest succeeds even if python-3-pytest is not installed May 28, 2021
@jlevon
Copy link
Collaborator

jlevon commented Jun 1, 2021

This is so we don't require Python when actually being used.

As we test in our CI, I don't think this is a big deal or worth fixing.

@tmakatos
Copy link
Member Author

tmakatos commented Jun 1, 2021

I implemented a unit test and as I didn't have pytest installed it didn't do anything, wouldn't a warning be a reasonable compromise?

@jlevon
Copy link
Collaborator

jlevon commented Jun 1, 2021

If you like, though I feel it'd be pretty lost in the noise of make test, and you'd find out when pushing to the PR branch anyway.

awarus added a commit to awarus/libvfio-user that referenced this issue Jun 8, 2021
Fix for issue nutanix#542. Fixing issue for Makefile by means of 'which pytest-3'
When python-3-pytest isn't installed the following message will be displayed:

make pytest
[  3%] Built target pci_caps
[  6%] Built target irq
[  9%] Built target libvfio-user
[ 12%] Built target migration
[ 16%] Built target tran_sock
[ 19%] Built target pci
[ 22%] Built target dma
[ 25%] Built target vfio-user-static
[ 29%] Built target vfio-user-shared
[ 35%] Built target lspci
[ 41%] Built target gpio-pci-idio-16
[ 48%] Built target null
[ 54%] Built target server
[ 67%] Built target client
[100%] Built target unit-tests
=== Running python tests ===
No pytest-3 found in system. Try 'apt-get install python3-pytest' or try 'which pytest-3'
0 tests passed
awarus added a commit to awarus/libvfio-user that referenced this issue Jun 8, 2021
Fix for issue nutanix#542. Fixing issue for Makefile by means of 'which pytest-3'
When python-3-pytest isn't installed the following message will be displayed:

make pytest
[  3%] Built target pci_caps
[  6%] Built target irq
[  9%] Built target libvfio-user
[ 12%] Built target migration
[ 16%] Built target tran_sock
[ 19%] Built target pci
[ 22%] Built target dma
[ 25%] Built target vfio-user-static
[ 29%] Built target vfio-user-shared
[ 35%] Built target lspci
[ 41%] Built target gpio-pci-idio-16
[ 48%] Built target null
[ 54%] Built target server
[ 67%] Built target client
[100%] Built target unit-tests
=== Running python tests ===
No pytest-3 found in system. Try 'apt-get install python3-pytest' or try 'which pytest-3'
0 tests passed

Signed-off-by: Ivan Efremov <i350300800e@gmail.com>
@tmakatos tmakatos linked a pull request Jun 9, 2021 that will close this issue
awarus added a commit to awarus/libvfio-user that referenced this issue Jun 9, 2021
Fix for issue nutanix#542. Fixing issue for Makefile by means of 'which pytest-3'
When python-3-pytest isn't installed the following message will be displayed:

make pytest
[  3%] Built target pci_caps
[  6%] Built target irq
[  9%] Built target libvfio-user
[ 12%] Built target migration
[ 16%] Built target tran_sock
[ 19%] Built target pci
[ 22%] Built target dma
[ 25%] Built target vfio-user-static
[ 29%] Built target vfio-user-shared
[ 35%] Built target lspci
[ 41%] Built target gpio-pci-idio-16
[ 48%] Built target null
[ 54%] Built target server
[ 67%] Built target client
[100%] Built target unit-tests
=== Running python tests ===
No pytest-3 found in system. Try 'apt-get install python3-pytest' or try 'which pytest-3'
0 tests passed

Signed-off-by: Ivan Efremov <i350300800e@gmail.com>
jlevon pushed a commit that referenced this issue Jun 9, 2021
Fix for issue #542.

Signed-off-by: Ivan Efremov <i350300800e@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants