mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
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 <nbenech@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1935613 GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
3e6a445310
commit
ae9fe7c438
@@ -34,10 +34,10 @@ all: lib$(MODULE).so
|
|||||||
# Inherits from the top level makefile. As such the unit test make files cannot
|
# Inherits from the top level makefile. As such the unit test make files cannot
|
||||||
# be invoked by themselves.
|
# be invoked by themselves.
|
||||||
%.o : %.c # $(LOCAL_HEADERS)
|
%.o : %.c # $(LOCAL_HEADERS)
|
||||||
$(CC) $(CFLAGS) -c -o $@ $<
|
$(CC) --coverage $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
lib$(MODULE).so: $(OBJS)
|
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)/
|
@mkdir -p $(UNIT_OUT)/
|
||||||
@cp $@ $(UNIT_OUT)/
|
@cp $@ $(UNIT_OUT)/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user