Created
August 16, 2022 09:26
-
-
Save TheNetAdmin/92620c545d2f6b01d836986aef805a05 to your computer and use it in GitHub Desktop.
Mark kvm-unit-tests EFI test cases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build efi test cases and then `ls *.efi` to get this efi_tests list | |
efi_tests = [ | |
"amd_sev", | |
"apic", | |
"asyncpf", | |
"cet", | |
"debug", | |
"dummy", | |
"emulator", | |
"eventinj", | |
"hypercall", | |
"hyperv_clock", | |
"hyperv_connections", | |
"hyperv_stimer", | |
"hyperv_synic", | |
"idt_test", | |
"init", | |
"intel-iommu", | |
"ioapic", | |
"kvmclock_test", | |
"memory", | |
"msr", | |
"pcid", | |
"pks", | |
"pku", | |
"pmu", | |
"pmu_lbr", | |
"rdpru", | |
"rmap_chain", | |
"s3", | |
"setjmp", | |
"sieve", | |
"smap", | |
"smptest", | |
"syscall", | |
"tsc_adjust", | |
"tscdeadline_latency", | |
"tsc", | |
"tsx-ctrl", | |
"umip", | |
"vmexit", | |
"vmware_backdoors", | |
"xsave", | |
] | |
out_file_lines = [] | |
with open('unittests.cfg', 'r') as f: | |
set_efi = False | |
for line in f: | |
if line.startswith("file"): | |
test_name = line.split("=")[1].strip().split(".")[0] | |
if test_name in efi_tests: | |
print("Found efi test: {}".format(test_name)) | |
set_efi = True | |
if len(line.strip()) == 0 and set_efi: | |
out_file_lines.append("efi = yes\n") | |
set_efi = False | |
out_file_lines.append(line) | |
with open('unittests.cfg.out', 'w') as f: | |
f.write(''.join(out_file_lines)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment