def command_file_to_list(cmd_file):
    """
    Open and parse custom command line file

    @type cmd_file: String
    @param cmd_file: Command line file containing list of commands

    @rtype: Tuple
    @return: Test index in list and the command as a list of strings
    """
    cmdline = list()
    idx = 0
    test_idx = None
    with open(cmd_file, 'r') as cmd_fp:
        for line in cmd_fp:
            if '@@' in line:
                test_idx = idx
            cmdline.append(line.rstrip())
            idx += 1
    return test_idx, cmdline
