multitest.py: error if no hosts given

Otherwise it'll just hang waiting for a non-existent host.

Closes: #917
Approved by: cgwalters
This commit is contained in:
Jonathan Lebon 2017-08-11 11:08:05 -04:00 committed by Atomic Bot
parent 534fc30308
commit 188b45146c

View File

@ -14,6 +14,10 @@ def main():
for host in sys.argv[1:]:
hosts.append(Host(host))
if len(hosts) == 0:
print("error: no hosts provided")
sys.exit(1)
requested_tests_spec = os.environ.get('TESTS')
if requested_tests_spec is not None:
requested_tests = requested_tests_spec.split()