Esempio n. 1
0
def cmd_brandstring(args):
    uniques = {}
    for cpu in bits.cpus():
        uniques.setdefault(bits.brandstring(cpu), []).append(cpu)
    for value in sorted(uniques.iterkeys()):
        cpus = uniques[value]
        print 'Brandstring: "{0}"'.format(value)
        print "On {0} CPUs: {1}".format(len(cpus), testutil.apicid_list(cpus))
Esempio n. 2
0
def callback():
    with ttypager.page():
        print(bits.brandstring())
        if cpulib.__name__ == "cpu_gen":
            print("No processor-specific test exists!")
            print("Menu entries will only include generic tests that apply to all processors.")
        else:
            print("Detected as CPU codename: {}".format(cpulib.name))
            print("Menu entries have been tailored to target this specific processor")
Esempio n. 3
0
def generate_cpu_menu():
    global created_cpu_menu
    if created_cpu_menu:
        return

    cfg = ""
    cfg += 'menuentry "{}: {}" {{\n'.format(cpulib.name, bits.brandstring())
    cfg += """    py 'import cpumenu; cpumenu.callback()'\n"""
    cfg += "}\n"

    bits.pyfs.add_static("cpumenu.cfg", cfg)
    created_cpu_menu = True
Esempio n. 4
0
def generate_cpu_menu():
    global created_cpu_menu
    if created_cpu_menu:
        return

    cfg = ""
    cfg += 'menuentry "{}: {}" {{\n'.format(cpulib.name, bits.brandstring())
    cfg += """    py 'import cpumenu; cpumenu.callback()'\n"""
    cfg += '}\n'

    bits.pyfs.add_static("cpumenu.cfg", cfg)
    created_cpu_menu = True
Esempio n. 5
0
def callback():
    with ttypager.page():
        print(bits.brandstring())
        if cpulib.__name__ == "cpu_gen":
            print("No processor-specific test exists!")
            print(
                "Menu entries will only include generic tests that apply to all processors."
            )
        else:
            print("Detected as CPU codename: {}".format(cpulib.name))
            print(
                "Menu entries have been tailored to target this specific processor"
            )