This is an automated email from the ASF dual-hosted git repository.

jan pushed a commit to branch feat/cat-test-logs
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit bc3d98cd33667adbb216f54d1c1fa373ce181a9d
Author: Jan Lehnardt <[email protected]>
AuthorDate: Sat Dec 20 10:59:44 2025 +0100

    feat: concat eunit test logs and remove test tmp dirs in Makefile
    
    This allows debugging of test runs in a unified log.
    
    It also retains individual test run state dirs if
    `make eunit` fails. The next successful run will clean it up
---
 Makefile                    | 2 ++
 src/couch/src/test_util.erl | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 947371e3c..5c59f004c 100644
--- a/Makefile
+++ b/Makefile
@@ -193,6 +193,8 @@ eunit: export ERL_AFLAGS = -config 
$(CURDIR)/rel/files/eunit.config
 eunit: export COUCHDB_QUERY_SERVER_JAVASCRIPT = $(CURDIR)/bin/couchjs 
$(CURDIR)/share/server/main.js
 eunit: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
 eunit: ${SUBDIRS}
+       @cat tmp/couchdb-tests/*/log/couch.log > tmp/couch.log
+       @rm -rf tmp/couchdb-tests/*
 
 $(SUBDIRS): setup-eunit
        @COUCHDB_VERSION=$(COUCHDB_VERSION) COUCHDB_GIT_SHA=$(COUCHDB_GIT_SHA) 
$(REBAR) -r eunit $(EUNIT_OPTS) apps=$@ #|| exit 1
diff --git a/src/couch/src/test_util.erl b/src/couch/src/test_util.erl
index 4b3e63ad3..96d1b280a 100644
--- a/src/couch/src/test_util.erl
+++ b/src/couch/src/test_util.erl
@@ -131,7 +131,8 @@ stop_couch() ->
     ok = stop_applications(?DEFAULT_APPS).
 
 stop_couch(#test_context{started = Apps, dir = RandomDir}) ->
-    file:del_dir_r(RandomDir),
+    % deletion now happens in Makefile
+    % file:del_dir_r(RandomDir),
     stop_applications(Apps);
 stop_couch(_) ->
     stop_couch().

Reply via email to