From 2d19b2513ce1e1ad9ca141c4f2d67d056e8714ce Mon Sep 17 00:00:00 2001 From: Marshall Ward Date: Tue, 3 Aug 2021 16:25:57 -0400 Subject: [PATCH] Fix to codecov file path search The codecov.io upload script appears to rely on the filepath of source codes at compile time, and was unable to find the output when called from .testing or the work directories. In this patch, we now move to `.testing/build/symmetric` (the gcov-enabled build) before running the uploader script. This is possibly required after the recent security alert connected to the codecov.io uploader script. Sadly, our coverage report failures went undetected for several months. The `-Z` flag has also been added to the script, which returns a nonzero error code if it fails. It's not yet clear to me if a missing file registers as a fail, but it may help to detect future problems. --- .testing/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.testing/Makefile b/.testing/Makefile index 45d05cd23f..06b29dc690 100644 --- a/.testing/Makefile +++ b/.testing/Makefile @@ -521,9 +521,10 @@ work/%/$(1)/ocean.stats work/%/$(1)/chksum_diag: build/$(2)/MOM6 $(VENV_PATH) @echo -e "$(DONE): $$*.$(1); no runtime errors." if [ $(3) ]; then \ mkdir -p results/$$* ; \ - bash <(curl -s https://codecov.io/bash) -n $$@ \ - > work/$$*/codecov.$(1).out \ - 2> work/$$*/codecov.$(1).err \ + cd build/symmetric \ + && bash <(curl -s https://codecov.io/bash) -Z -n $$@ \ + > codecov.$$*.$(1).out \ + 2> codecov.$$*.$(1).err \ && echo -e "${MAGENTA}Report uploaded to codecov.${RESET}"; \ fi endef