'Given a test name, fetch the appropriate control file from the server
and submit it.
:param kernel: A comma separated list of kernel versions to boot.
:param kernel_cmdline: The command line used to boot all kernels listed
in the kernel parameter.
Returns a list of job objects'

def create_job_by_test(self, tests, kernel=None, use_container=False, kernel_cmdline=None, **dargs):

    assert (('hosts' in dargs) or (('atomic_group_name' in dargs) and ('synch_count' in dargs)))
    if kernel:
        kernel_list = re.split('[\\s,]+', kernel.strip())
        kernel_info = []
        for version in kernel_list:
            kernel_dict = {'version': version}
            if (kernel_cmdline is not None):
                kernel_dict['cmdline'] = kernel_cmdline
            kernel_info.append(kernel_dict)
    else:
        kernel_info = None
    control_file = self.generate_control_file(tests=tests, kernel=kernel_info, use_container=use_container)
    if control_file.is_server:
        dargs['control_type'] = 'Server'
    else:
        dargs['control_type'] = 'Client'
    dargs['dependencies'] = (dargs.get('dependencies', []) + control_file.dependencies)
    dargs['control_file'] = control_file.control_file
    if (not dargs.get('synch_count', None)):
        dargs['synch_count'] = control_file.synch_count
    if (('hosts' in dargs) and (len(dargs['hosts']) < dargs['synch_count'])):
        return None
    return self.create_job(**dargs)
