From ed9f9d998797146ff8283928da8120bef8cf5f2c Mon Sep 17 00:00:00 2001
From: Sergey Yakubov <sergey.yakubov@desy.de>
Date: Fri, 3 Apr 2020 12:51:57 +0200
Subject: [PATCH] update coverage

---
 CMakeModules/coverage_go.sh   | 4 +++-
 CMakeModules/testing_go.cmake | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/CMakeModules/coverage_go.sh b/CMakeModules/coverage_go.sh
index ace5908a6..13ddb7a41 100755
--- a/CMakeModules/coverage_go.sh
+++ b/CMakeModules/coverage_go.sh
@@ -8,7 +8,9 @@ export GOPATH=$GOPATH:$4
 
 echo $OUT_DIR
 
-mapfile -t PACKAGES < <( find $SOURCE_DIR -type d -not -path '*/\.*' )
+touch $OUT_DIR/coverage.out
+
+mapfile -t PACKAGES < <( find $SOURCE_DIR/src -type d -not -path '*/\.*' )
 
 echo "mode: count" > $OUT_DIR/coverage-all.out
 for pkg in ${PACKAGES[@]}
diff --git a/CMakeModules/testing_go.cmake b/CMakeModules/testing_go.cmake
index bab217b8f..dbba4bfe2 100644
--- a/CMakeModules/testing_go.cmake
+++ b/CMakeModules/testing_go.cmake
@@ -21,8 +21,8 @@ function(gotest target source_dir test_source_files)
         message(STATUS "Added test 'test-${target}'")
         if (CMAKE_COMPILER_IS_GNUCXX)
         add_test(NAME coveragetest-${target}
-                        COMMAND ${CMAKE_MODULE_PATH}/coverage_go.sh ${CMAKE_CURRENT_SOURCE_DIR}
-                        ${CMAKE_CURRENT_BINARY_DIR} ${ASAPO_MINIMUM_COVERAGE} ${gopath}
+                        COMMAND ${CMAKE_MODULE_PATH}/coverage_go.sh
+                        ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${ASAPO_MINIMUM_COVERAGE} ${gopath}
                         WORKING_DIRECTORY ${source_dir})
         set_tests_properties(coveragetest-${target} PROPERTIES LABELS "coverage;all")
         endif()
-- 
GitLab