# Copyright 2017 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. AUTHOR = "ChromeOS Team" NAME = "moblab_DummyServerNoSspSuite" PURPOSE = "Test that Moblab can run the Dummy Server suite without SSP." TIME = "MEDIUM" TEST_CATEGORY = "Functional" TEST_CLASS = "moblab" TEST_TYPE = "server" DOC = """ Kicks off the Dummy Server NoSSp suite on a Moblab host against the DUTs on its subnet and ensures the suite completes successfully. To invole this test locally: test_that -b stumpy_moblab moblab_DummyServerSuiteNoSsp --args="" where ARGLIST is a whitespace separated list of the following key=value pairs. Values pertaining to the test case include: boto_path= path to the boto file to be installed on the Moblab DUT. If not specified, the boto file in the current home directory will be installed if it exists. image_storage_server= Google Storage Bucket from which to fetch test images from. If not specified, the value will be fetched from global_config. service_init_timeout_m= Timeout (in minutes) to wait for upstart services to start on the moblab host. This can take ~5 minutes on a physical devices and ~10 minutes on a VM. test_timeout_hint_m= The overall timeout to expect for the test run. For this test, it is very important to collect post failure data from the moblab device. If the overall timeout is provided, the test will try to fail early to save some time for log collection from the DUT. clear_devserver_cache= If True, image cache of the devserver running on moblab is cleared before running the test to validate devserver imaging staging flow. """ from autotest_lib.client.bin import sysinfo from autotest_lib.client.common_lib import utils MOBLAB_AUTOTEST_FOLDERS = ['/usr/local/autotest/results', '/usr/local/autotest/logs'] def run(machine): host = hosts.create_host(machine) args_dict = utils.args_to_dict(args) logging.info('Logs from moblab\'s instance of autotest will be collected ' 'under the sysinfo/ folder in results.') for folder in MOBLAB_AUTOTEST_FOLDERS: logging.info(' Will collect %s', folder) job.sysinfo.add_logdir(sysinfo.logdir(folder, excludes=())) job.run_test('moblab_RunSuite', host=host, suite_name='dummy_server_nossp', moblab_suite_max_retries=1, **args_dict) parallel_simple(run, machines)