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

testsuite require network access by default #623

Closed
jonassmedegaard opened this issue Apr 16, 2020 · 18 comments
Closed

testsuite require network access by default #623

jonassmedegaard opened this issue Apr 16, 2020 · 18 comments

Comments

@jonassmedegaard
Copy link

The test file tests/test_doctests.py fails in a build environment without network access.

Some build environments - including Debian autobuilders - explicitly disable network to make builds more deterministic.

Please rely on network access only optionally.
One elegant way to do that is to borrow the logic used in Perl: Check environment variable EXTENDED_TESTING and if not set to a non-empty value then skip all such "extended testing".

Thanks for considering.

@mikeboers
Copy link
Member

I'm pretty sure a few more will also fail, because we pull from the FFmpeg FATE suite for samples in a few places.

@jonassmedegaard
Copy link
Author

jonassmedegaard commented Apr 16, 2020 via email

@mikeboers
Copy link
Member

mikeboers commented Apr 16, 2020

Is there a stage in the build environment in which network access is allowed to fetch the assets for the tests?

@jonassmedegaard
Copy link
Author

On Debian autobuilders, no.
But there is the option of including the test assets in a package - either shipping them with this package or separately packaged.
Depending on what really need testing, a more elegant option is, I guess, to not use ffmpeg test assets but tell ffmpeg to generate test data and use that (as I guess what needs testing is not internal routines of ffmpeg but interfacing with those)

@jonassmedegaard
Copy link
Author

This seems to be the most minimal workaround for now:

cd '/build/python-av-7.0.1~git/.pybuild/cpython3_3.8/build'; python3.8 -m pytest --ignore=tests/test_doctests.py --ignore=tests/test_timeout.py -k '-test_audio_transcode -test_container_probing -test_context_manager -test_data -test_decode_audio_sample_count -test_decoded_motion_vectors -test_decoded_time_base -test_decoded_video_frame_count -test_decode_half -test_deprecated_stream_seek -test_encoding -test_movtext -test_parse -test_reading -test_seek_end -test_seek_float -test_seek_int64 -test_seek_middle -test_seek_start -test_selection -test_stream_probing -test_stream_seek -test_stream_tuples -test_vobsub'

@jlaine
Copy link
Member

jlaine commented Apr 22, 2020

Hi @jonassmedegaard ! Are you planning on packaging PyAV for Debian? That would be awesome news!

@jonassmedegaard
Copy link
Author

jonassmedegaard commented Apr 22, 2020 via email

@jlaine
Copy link
Member

jlaine commented Apr 30, 2020

@jonassmedegaard I can't remember, does buildd accept network tests which only rely on the loopback interface?

@jonassmedegaard
Copy link
Author

jonassmedegaard commented Apr 30, 2020 via email

@jlaine
Copy link
Member

jlaine commented Mar 26, 2022

@jonassmedegaard how are you handling this in Debian nowadays?

@jonassmedegaard
Copy link
Author

During build (where network access is forbidden and blocked) I test like this:

pytest --ignore=tests/test_doctests.py --ignore=tests/test_timeout.py -k 'not test_audio_transcode and not test_codec_tag and not test_container_probing and not test_context_manager and not test_data and not test_decode_audio_sample_count and not test_decoded_motion_vectors and not test_decoded_time_base and not test_decoded_video_frame_count and not test_decode_half and not test_deprecated_stream_seek and not test_encoding and not test_movtext and not test_parse and not test_reading and not test_seek_end and not test_seek_float and not test_seek_int64 and not test_seek_middle and not test_seek_start and not test_selection and not test_stream_probing and not test_stream_seek and not test_stream_tuples and not test_vobsub and not test_reformat_pixel_format_align'

For continuous integration tests I do same, and then run another test flagged as "flaky" and "needs-internet", where I omit only test_reformat_pixel_format_align (which consistently fails on PowerPC).

@jonassmedegaard
Copy link
Author

if you want to know the exact tests I omit then it is easier to read here.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jul 25, 2022
@jlaine
Copy link
Member

jlaine commented Jul 25, 2022

Lets keep this alive

@github-actions github-actions bot removed the stale label Jul 26, 2022
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Nov 24, 2022
@jonassmedegaard
Copy link
Author

la la la

@github-actions github-actions bot removed the stale label Nov 25, 2022
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@emilazy
Copy link

emilazy commented Jul 16, 2024

Still relevant for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants