From 4945ca8ed6f67e9eb5b42ad5b698833a76bb535d Mon Sep 17 00:00:00 2001 From: Francisco Massa Date: Tue, 5 May 2020 07:01:54 -0700 Subject: [PATCH 1/2] Fix missing compilation files for video-reader --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index eb5fb20b280..85a692120b3 100644 --- a/setup.py +++ b/setup.py @@ -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 From 5687ae56ca4b160ac149e916b1d0e142485c3039 Mon Sep 17 00:00:00 2001 From: Francisco Massa Date: Tue, 5 May 2020 08:31:03 -0700 Subject: [PATCH 2/2] Disable IO tests in travis --- .travis.yml | 2 +- test/test_io.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 698d09bdef1..220ef0c48ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/test/test_io.py b/test/test_io.py index 80dd55e0485..7bc312a1d2c 100644 --- a/test/test_io.py +++ b/test/test_io.py @@ -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