artiq/artiq/test/test_frontends.py

28 lines
914 B
Python
Raw Normal View History

"""Generic tests for frontend commands."""
import subprocess
import sys
import unittest
class TestFrontends(unittest.TestCase):
def test_help(self):
"""Test --help as a simple smoke test against catastrophic breakage."""
commands = {
"aqctl": [
2022-03-18 17:01:51 +08:00
"corelog", "moninj_proxy"
],
"artiq": [
2019-11-14 15:21:51 +08:00
"client", "compile", "coreanalyzer", "coremgmt",
2020-10-15 16:18:56 +08:00
"flash", "master", "mkfs", "route",
"rtiomon", "run", "session", "browser", "dashboard"
]
}
for module in (prefix + "_" + name
for prefix, names in commands.items()
for name in names):
subprocess.check_call(
[sys.executable, "-m", "artiq.frontend." + module, "--help"],
stdout=subprocess.DEVNULL,
stderr=subprocess.STDOUT)