2019-01-12 21:49:32 +08:00
|
|
|
"""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": [
|
2024-02-01 17:43:47 +08:00
|
|
|
"corelog", "moninj_proxy", "coreanalyzer_proxy"
|
2019-01-12 21:49:32 +08:00
|
|
|
],
|
|
|
|
"artiq": [
|
2019-11-14 15:21:51 +08:00
|
|
|
"client", "compile", "coreanalyzer", "coremgmt",
|
2022-12-02 16:27:03 +08:00
|
|
|
"flash", "master", "mkfs", "route", "rtiomap",
|
2019-12-12 10:34:44 +08:00
|
|
|
"rtiomon", "run", "session", "browser", "dashboard"
|
2019-01-12 21:49:32 +08:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
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)
|