1# Copyright 2017 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. 4from autotest_lib.server.cros.cfm.configurable_test.dsl import * 5from autotest_lib.server import utils 6 7AUTHOR = "kerl@google.com, chromeos-meetings@google.com" 8NAME = "enterprise_CFM_ConfigurableCfmTestSanity.verifications" 9PURPOSE = "Verifies the configurable CfM test infra with a simple scenario" 10CRITERIA = "No errors occur" 11ATTRIBUTES = "suite:hotrod, suite:bluestreak-pre-cq" 12TIME = "SHORT" 13TEST_CATEGORY = "Functional" 14TEST_TYPE = "server" 15DEPENDENCIES="meet_app" 16 17DOC = """ 18Verifies that we can specify and run verification and assertion steps in a 19configurable CFM test. 20""" 21 22cfm_test = CfmTest( 23 scenario=Scenario( 24 AssertUsbDevices([ATRUS], lambda devices: True), 25 RetryAssertAction( 26 AssertFileDoesNotContain('/var/log/messages', ['FOOERRORBAR']), 27 5, 28 0.1), 29 Sleep(0.1), 30 AssertFileDoesNotContain('/var/log/eventlog.txt', ['FOOERRORBAR']), 31 # Create some silly scenarios to be selected at random. The purpose 32 # of this is only to test the SelectScenarioAtRandom action. 33 # Since the predicate always return true for the assert actions 34 # we do not actually verify the devices exist. 35 SelectScenarioAtRandom(scenarios=[ 36 Scenario(AssertUsbDevices([ATRUS], lambda devices: True), 37 AssertFileDoesNotContain('/var/log/messages', 38 ['FOOERRORBAR'])), 39 Scenario(AssertUsbDevices([HUDDLY_GO], lambda devices: True)), 40 Scenario(AssertUsbDevices([ATRUS], lambda devices: True))], 41 run_times=3), 42 AssertNoNewCrashes() 43 ), 44 45 configuration=Configuration( 46 run_test_only = True 47 ) 48) 49 50def run_test(machine): 51 job.run_test("enterprise_CFM_ConfigurableCfmTestSanity", 52 cfm_test = cfm_test, 53 tag = 'verifications', 54 host = hosts.create_host(machine)) 55 56 57parallel_simple(run_test, machines) 58