Skip to content

Commit 1acff9c

Browse files
authored
Disable ffprobe test internally
Differential Revision: D82378431 Pull Request resolved: #900
1 parent ab026c8 commit 1acff9c

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

test/test_decoders.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,9 @@ def test_get_frame_at_av1(self, device):
577577
if device == "cuda" and get_ffmpeg_major_version() == 4:
578578
return
579579

580+
if device == "cuda" and in_fbcode():
581+
pytest.skip("AV1 decoding on CUDA is not supported internally")
582+
580583
decoder = VideoDecoder(AV1_VIDEO.path, device=device)
581584
ref_frame10 = AV1_VIDEO.get_frame_data_by_index(10)
582585
ref_frame_info10 = AV1_VIDEO.get_frame_info(10)
@@ -1292,6 +1295,10 @@ def setup_frame_mappings(tmp_path, file, stream_index):
12921295
# Return the custom frame mappings as a JSON string
12931296
return custom_frame_mappings
12941297

1298+
@pytest.mark.skipif(
1299+
in_fbcode(),
1300+
reason="ffprobe not available internally",
1301+
)
12951302
@pytest.mark.parametrize("device", all_supported_devices())
12961303
@pytest.mark.parametrize("stream_index", [0, 3])
12971304
@pytest.mark.parametrize(
@@ -1338,12 +1345,16 @@ def test_custom_frame_mappings_json_and_bytes(
13381345
),
13391346
)
13401347

1348+
@pytest.mark.skipif(
1349+
in_fbcode(),
1350+
reason="ffprobe not available internally",
1351+
)
13411352
@pytest.mark.parametrize("device", all_supported_devices())
13421353
@pytest.mark.parametrize(
13431354
"custom_frame_mappings,expected_match",
13441355
[
13451356
pytest.param(
1346-
NASA_VIDEO.generate_custom_frame_mappings(0),
1357+
None,
13471358
"seek_mode",
13481359
id="valid_content_approximate",
13491360
),
@@ -1361,6 +1372,8 @@ def test_custom_frame_mappings_json_and_bytes(
13611372
def test_custom_frame_mappings_init_fails(
13621373
self, device, custom_frame_mappings, expected_match
13631374
):
1375+
if custom_frame_mappings is None:
1376+
custom_frame_mappings = NASA_VIDEO.generate_custom_frame_mappings(0)
13641377
with pytest.raises(ValueError, match=expected_match):
13651378
VideoDecoder(
13661379
NASA_VIDEO.path,

test/test_ops.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
import os
1010
from functools import partial
1111

12+
from .utils import in_fbcode
13+
1214
os.environ["TORCH_LOGS"] = "output_code"
1315
import json
1416
import subprocess
@@ -480,6 +482,10 @@ def test_frame_pts_equality(self):
480482
)
481483
assert pts_is_equal
482484

485+
@pytest.mark.skipif(
486+
in_fbcode(),
487+
reason="ffprobe not available internally",
488+
)
483489
def test_seek_mode_custom_frame_mappings_fails(self):
484490
decoder = create_from_file(
485491
str(NASA_VIDEO.path), seek_mode="custom_frame_mappings"
@@ -506,6 +512,10 @@ def test_seek_mode_custom_frame_mappings_fails(self):
506512
decoder, stream_index=0, custom_frame_mappings=different_lengths
507513
)
508514

515+
@pytest.mark.skipif(
516+
in_fbcode(),
517+
reason="ffprobe not available internally",
518+
)
509519
@pytest.mark.parametrize("device", all_supported_devices())
510520
def test_seek_mode_custom_frame_mappings(self, device):
511521
stream_index = 3 # custom_frame_index seek mode requires a stream index

0 commit comments

Comments
 (0)