Skip to content

Toggle on/off ffmpeg test if needed #2901

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

Closed
wants to merge 7 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion test/smoke_test/smoke_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Run smoke tests"""

import argparse

import torchaudio # noqa: F401
import torchaudio.compliance.kaldi # noqa: F401
import torchaudio.datasets # noqa: F401
Expand All @@ -9,4 +11,22 @@
import torchaudio.sox_effects # noqa: F401
import torchaudio.transforms # noqa: F401
import torchaudio.utils # noqa: F401
from torchaudio.io import StreamReader # noqa: F401


def ffmpeg_test():
from torchaudio.io import StreamReader # noqa: F401


def main() -> None:
parser = argparse.ArgumentParser()

# Warning: Please note this option should not be widely used, only use it when absolutely necessary
parser.add_argument("--no-ffmpeg", dest="ffmpeg", action="store_false")

options = parser.parse_args()
if options.ffmpeg:
ffmpeg_test()


if __name__ == "__main__":
main()