From 729354b038b36b784416373a2999ab99387057ce Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 3 Jan 2025 14:19:06 -0500 Subject: [PATCH] chore: Add cleanup for node_modules directories in benchmark tests --- benchmark/benchmark.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/benchmark/benchmark.py b/benchmark/benchmark.py index c0b6f6b4c..1a425ed47 100755 --- a/benchmark/benchmark.py +++ b/benchmark/benchmark.py @@ -872,6 +872,15 @@ def run_test_real( except Exception as e: print(f"Failed to clean up Java build directory: {e}") + # Node.js node_modules directories + node_modules_dir = testdir / "node_modules" + if node_modules_dir.exists(): + try: + shutil.rmtree(node_modules_dir) + print(f"Cleaned up Node.js node_modules directory: {node_modules_dir}") + except Exception as e: + print(f"Failed to clean up Node.js node_modules directory: {e}") + results = dict( testdir=str(testdir), testcase=testdir.name,