diff --git a/.gitignore b/.gitignore index 82d9aed..b047674 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,7 @@ *.o *.exe + +stacktestbench +cputestbench +alutestbench \ No newline at end of file diff --git a/clean.py b/clean.py index a0d6806..90c10d7 100644 --- a/clean.py +++ b/clean.py @@ -1,20 +1,22 @@ -# remove *.txt, *.cf, *.vcd in the current directory and all subdirectories of "test" - import os import glob -# remove all .txt, .cf, and .vcd files in the current directory -for file in glob.glob("*.txt"): - os.remove(file) -for file in glob.glob("*.cf"): - os.remove(file) -for file in glob.glob("*.vcd"): +# File extensions to remove +extensions = (".txt", ".cf", ".vcd", ".o") + +# Remove files in the current directory +for ext in extensions: + for file in glob.glob(f"*{ext}"): + os.remove(file) + +# Remove files ending with "testbench" in the current directory +for file in glob.glob("*testbench"): os.remove(file) -# remove all .txt, .cf, and .vcd files in the test directory +# Remove files in "test" and its subdirectories for root, dirs, files in os.walk("test"): for file in files: - if file.endswith(".txt") or file.endswith(".cf") or file.endswith(".vcd"): + if file.endswith(extensions) or file.endswith("testbench"): os.remove(os.path.join(root, file)) -print("🧼 Cleaned up files!") \ No newline at end of file +print("🧼 Cleaned up files!")