diff --git a/test/test_decoders.py b/test/test_decoders.py index 72b586891..cef88372b 100644 --- a/test/test_decoders.py +++ b/test/test_decoders.py @@ -577,6 +577,9 @@ def test_get_frame_at_av1(self, device): if device == "cuda" and get_ffmpeg_major_version() == 4: return + if device == "cuda" and in_fbcode(): + pytest.skip("AV1 decoding on CUDA is not supported internally") + decoder = VideoDecoder(AV1_VIDEO.path, device=device) ref_frame10 = AV1_VIDEO.get_frame_data_by_index(10) ref_frame_info10 = AV1_VIDEO.get_frame_info(10) @@ -1292,6 +1295,10 @@ def setup_frame_mappings(tmp_path, file, stream_index): # Return the custom frame mappings as a JSON string return custom_frame_mappings + @pytest.mark.skipif( + in_fbcode(), + reason="ffprobe not available internally", + ) @pytest.mark.parametrize("device", all_supported_devices()) @pytest.mark.parametrize("stream_index", [0, 3]) @pytest.mark.parametrize( @@ -1338,12 +1345,16 @@ def test_custom_frame_mappings_json_and_bytes( ), ) + @pytest.mark.skipif( + in_fbcode(), + reason="ffprobe not available internally", + ) @pytest.mark.parametrize("device", all_supported_devices()) @pytest.mark.parametrize( "custom_frame_mappings,expected_match", [ pytest.param( - NASA_VIDEO.generate_custom_frame_mappings(0), + None, "seek_mode", id="valid_content_approximate", ), @@ -1361,6 +1372,8 @@ def test_custom_frame_mappings_json_and_bytes( def test_custom_frame_mappings_init_fails( self, device, custom_frame_mappings, expected_match ): + if custom_frame_mappings is None: + custom_frame_mappings = NASA_VIDEO.generate_custom_frame_mappings(0) with pytest.raises(ValueError, match=expected_match): VideoDecoder( NASA_VIDEO.path, diff --git a/test/test_ops.py b/test/test_ops.py index 64ec09063..bc4caddd8 100644 --- a/test/test_ops.py +++ b/test/test_ops.py @@ -9,6 +9,8 @@ import os from functools import partial +from .utils import in_fbcode + os.environ["TORCH_LOGS"] = "output_code" import json import subprocess @@ -480,6 +482,10 @@ def test_frame_pts_equality(self): ) assert pts_is_equal + @pytest.mark.skipif( + in_fbcode(), + reason="ffprobe not available internally", + ) def test_seek_mode_custom_frame_mappings_fails(self): decoder = create_from_file( str(NASA_VIDEO.path), seek_mode="custom_frame_mappings" @@ -506,6 +512,10 @@ def test_seek_mode_custom_frame_mappings_fails(self): decoder, stream_index=0, custom_frame_mappings=different_lengths ) + @pytest.mark.skipif( + in_fbcode(), + reason="ffprobe not available internally", + ) @pytest.mark.parametrize("device", all_supported_devices()) def test_seek_mode_custom_frame_mappings(self, device): stream_index = 3 # custom_frame_index seek mode requires a stream index