From fed101920b6fbc7700aaa1175b6dbf88abbf920f Mon Sep 17 00:00:00 2001 From: Steve Beattie Date: Thu, 12 Jul 2018 16:28:52 -0700 Subject: [PATCH] coverity build: capture separate log files for each coverity invocation Each coverity command writes its debugging output to cov-int/build-log.txt, which means that multiple runs of cov-build overwrite previous logs, resulting in only the last invocation's output remaining at the end of the build, making debugging why failures to capture coverity output difficult. Fix this by renaming the build-log to per-directory log files. (This would still be an issue even if we had a single build command for the entire tree, as capturing python and other interpreted files requires a second invocation of cov-build to scan for those file types.) Signed-off-by: Steve Beattie PR: https://gitlab.com/apparmor/apparmor/merge_requests/145 --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 30d1a1dbd..e58004882 100644 --- a/Makefile +++ b/Makefile @@ -55,9 +55,11 @@ snapshot: clean coverity: snapshot cd $(SNAPSHOT_NAME)/libraries/libapparmor && ./configure --with-python $(foreach dir, $(filter-out utils profiles tests, $(DIRS)), \ - cov-build --dir $(COVERITY_DIR) -- $(MAKE) -C $(SNAPSHOT_NAME)/$(dir);) + cov-build --dir $(COVERITY_DIR) -- $(MAKE) -C $(SNAPSHOT_NAME)/$(dir); \ + mv $(COVERITY_DIR)/build-log.txt $(COVERITY_DIR)/build-log-$(subst /,.,$(dir)).txt ;) $(foreach dir, libraries/libapparmor utils, \ - cov-build --dir $(COVERITY_DIR) --no-command --fs-capture-search $(SNAPSHOT_NAME)/$(dir);) + cov-build --dir $(COVERITY_DIR) --no-command --fs-capture-search $(SNAPSHOT_NAME)/$(dir); \ + mv $(COVERITY_DIR)/build-log.txt $(COVERITY_DIR)/build-log-python-$(subst /,.,$(dir)).txt ;) tar -cvzf $(SNAPSHOT_NAME)-$(COVERITY_DIR).tar.gz $(COVERITY_DIR) .PHONY: export_dir