def METHOD_NAME():
    opt_names = {'j': "jobname", 'c': "compiler", 'o': "jenkins_configure", 'q': "label", 'm': "netmod", 'f': "XFAIL_CONF"}
    last_opt = ''
    for a in sys.argv[1:]:
        if last_opt:
            G.opts[last_opt] = a
            last_opt = ""
        elif RE.match(r'-(\w)$', a):
            if RE.m.group(1) in opt_names:
                last_opt = opt_names[RE.m.group(1)]
            else:
                last_opt = RE.m.group(1)
        elif RE.match(r'--(\w+)=(.*)', a):
            G.opts[RE.m.group(1)] = RE.m.group(2)
        elif os.path.exists(a):
            G.opts['XFAIL_CONF'] = a
        else:
            raise Exception("Unrecognized option [%s]\n" % a)
    if 'dir' in G.opts:
        os.chdir(G.opts['dir'])
    G.states = (G.opts['jobname'], G.opts['compiler'], G.opts['jenkins_configure'], G.opts['netmod'], G.opts['label'])
    if 'XFAIL_CONF' not in G.opts:
        raise Exception("%s: missing -f XFAIL_CONF\n" % 0)
    str_states = ' | '.join(G.states)
    print("set_xfail states: %s" % str_states)