1# Copyright 2021 The Chromium OS Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5from autotest_lib.client.common_lib import error 6from autotest_lib.server import test 7 8 9class infra_CompanionDuts(test.test): 10 """ 11 Verify the companion dut flag reaches a test. 12 13 """ 14 version = 1 15 16 def run_once(self, host, companions): 17 """ 18 Starting point of this test. 19 20 Note: base class sets host as self._host. 21 22 """ 23 self.host = host 24 for c in companions: 25 dut_out = c.run('echo True').stdout.strip() 26 if dut_out != 'True': 27 raise error.TestError("Companion DUT stdout != True (got: %s)", 28 dut_out) 29