Skip to content

Commit

Permalink
Fix missing compilation files for video-reader (#2183)
Browse files Browse the repository at this point in the history
* Fix missing compilation files for video-reader

* Disable IO tests in travis
  • Loading branch information
fmassa committed May 5, 2020
1 parent 5db8998 commit 6f849df
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ install:
cd -
script:
- pytest --cov-config .coveragerc --cov torchvision --cov $TV_INSTALL_PATH -k 'not TestVideoReader and not TestVideoTransforms' test
- pytest --cov-config .coveragerc --cov torchvision --cov $TV_INSTALL_PATH -k 'not TestVideoReader and not TestVideoTransforms and not TestIO' test
- pytest test/test_hub.py

after_success:
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ def get_extensions():
video_reader_src = glob.glob(os.path.join(video_reader_src_dir, "*.cpp"))
base_decoder_src_dir = os.path.join(this_dir, 'torchvision', 'csrc', 'cpu', 'decoder')
base_decoder_src = glob.glob(
os.path.join(base_decoder_src_dir, "[!sync_decoder_test,!utils_test]*.cpp"))
os.path.join(base_decoder_src_dir, "*.cpp"))
# exclude tests
base_decoder_src = [x for x in base_decoder_src if '_test.cpp' not in x]

combined_src = video_reader_src + base_decoder_src

Expand Down
2 changes: 1 addition & 1 deletion test/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def temp_video(num_frames, height, width, fps, lossless=False, video_codec=None,
@unittest.skipIf(get_video_backend() != "pyav" and not io._HAS_VIDEO_OPT,
"video_reader backend not available")
@unittest.skipIf(av is None, "PyAV unavailable")
class Tester(unittest.TestCase):
class TestIO(unittest.TestCase):
# compression adds artifacts, thus we add a tolerance of
# 6 in 0-255 range
TOLERANCE = 6
Expand Down

0 comments on commit 6f849df

Please sign in to comment.