From ae9fe7c4384362fb4172b426de684e39d2cd44ca Mon Sep 17 00:00:00 2001 From: Nicolas Benech Date: Thu, 25 Oct 2018 13:38:24 -0400 Subject: [PATCH] gpu: nvgpu: unit: Add gcov for units on host The unit test source files must have gcov enabled to get coverage information for inline function included from header files. JIRA NVGPU-1316 Change-Id: I46f973c321da93ef2b374f9310e6f0214ca70b09 Signed-off-by: Nicolas Benech Reviewed-on: https://git-master.nvidia.com/r/1935613 GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- userspace/units/Makefile.units | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/userspace/units/Makefile.units b/userspace/units/Makefile.units index 9ba3111d7..663c88fab 100644 --- a/userspace/units/Makefile.units +++ b/userspace/units/Makefile.units @@ -34,10 +34,10 @@ all: lib$(MODULE).so # Inherits from the top level makefile. As such the unit test make files cannot # be invoked by themselves. %.o : %.c # $(LOCAL_HEADERS) - $(CC) $(CFLAGS) -c -o $@ $< + $(CC) --coverage $(CFLAGS) -c -o $@ $< lib$(MODULE).so: $(OBJS) - $(CC) -shared -o $@ $(OBJS) $(LIB_PATHS) -lnvgpu_unit + $(CC) -shared -o $@ $(OBJS) $(LIB_PATHS) -lnvgpu_unit -lgcov @mkdir -p $(UNIT_OUT)/ @cp $@ $(UNIT_OUT)/