From db35cb0384cfdb82473fb1ec0fe5cf2cfae1eb29 Mon Sep 17 00:00:00 2001 From: Sakeeb Sabakka Date: Wed, 25 Sep 2024 00:40:09 -0400 Subject: [PATCH] recc 1.2.20 tests Added tests to start recc-server and run recc-cc command twice. The second run should result in a cache hit. --- Formula/r/recc.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Formula/r/recc.rb b/Formula/r/recc.rb index 8ddf6d512b00b..1c7df4b5fdcd1 100644 --- a/Formula/r/recc.rb +++ b/Formula/r/recc.rb @@ -87,7 +87,7 @@ def generate_recc_server(bin_directory) #{bin}/buildbox-casd \ --local-server-instance=recc-server \ --protect-session-blobs \ - #{var}/recc/casd + ${1:-#{var}/recc/casd} EOS end @@ -174,10 +174,13 @@ def caveats test do system bin/"recc", "--version" - system bin/"recc-server &" + recc_cache_data_path="recc_cache_data_path" + recc_cache_data_path.mkpath + system bin/"recc-server #{recc_cache_data_path} &" "test.c".write <<~EOS int main() {} EOS + ENV["RECC_SERVER"]=recc_cache_data_path/"casd.sock" ENV["RECC_LOG_LEVEL"]="info" system bin/"recc-cc", "-c", "test.c" output = shell_output(bin/"recc-cc -c test.c 2>&1")