1# Copyright 2017 The Chromium 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 5import logging 6 7from autotest_lib.site_utils.sponge_lib import acts_job_info 8from autotest_lib.site_utils.sponge_lib import autotest_job_info 9 10 11class DynamicJobInfo(autotest_job_info.AutotestJobInfo): 12 """A job that will create tasks based on the info they contain.""" 13 14 def create_task_info(self, test): 15 """Dynamically creates tasks based on the type of test run.""" 16 if test.subdir and 'android_ACTS' in test.subdir: 17 logging.info('Using ACTS task info for %s.', test.testname) 18 return acts_job_info.ACTSTaskInfo(test, self) 19 20 return super(DynamicJobInfo, self).create_task_info(test) 21