From 30f57eee9f4a691cd666f03e557022214f855931 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Wed, 19 Aug 2020 02:47:02 +0100 Subject: [PATCH] clean up coverage.py --- tools/coverage.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/coverage.py b/tools/coverage.py index f60730ed6a..6a45bec0e1 100755 --- a/tools/coverage.py +++ b/tools/coverage.py @@ -64,12 +64,10 @@ if __name__ == "__main__": print(f"The following functions have been matched but still exist in asm/nonmatchings/: {' '.join(matched_but_undeleted_asm)}") if "--fail-matched-undeleted" in argv: - print(f"The following functions have been matched but still exist in asm/nonmatchings/: {' '.join(matched_but_undeleted_asm)}") exit(1) - else: - if "--delete-matched" in argv or input("Delete them [y/N]? ").upper() == "Y": - for func in matched_but_undeleted_asm: - file = glob(path.join(DIR, f"../asm/nonmatchings/*/{func}.s"))[0] - remove(file) + elif "--delete-matched" in argv or input("Delete them [y/N]? ").upper() == "Y": + for func in matched_but_undeleted_asm: + file = glob(path.join(DIR, f"../asm/nonmatchings/*/{func}.s"))[0] + remove(file) elif len(asm) != len(non_matched): print(f"warning: number of INCLUDE_ASM macros ({len(asm)}) != number of asm files ({len(non_matched)})")