gpu: nvgpu: unit: script to automate gcov

A new script, gcov.sh, can check and install missing dependencies,
run unit tests, run gcov and present the results in the browser.

JIRA NVGPU-1246

Change-Id: Ic225ac5d397efd539d14a358671a3c20460c277e
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1954049
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:
Nicolas Benech
2018-11-19 14:08:22 -05:00
committed by mobile promotions
parent 0659ff2985
commit 904cd50026
2 changed files with 122 additions and 0 deletions

View File

@@ -1,4 +1,25 @@
#!/bin/bash
#
# Copyright (c) 2018, NVIDIA CORPORATION. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
# Install the unit test binaries, build by tmake, onto a jetson running
# L4T. The only argument is the IP address of the jetson.
@@ -96,6 +117,7 @@ jcp $nvgpu_bins/userspace-l4t_64/nvgpu_unit nvgpu_unit/nvgpu_unit
jcp $nvgpu_bins/userspace-l4t_64/libnvgpu_unit-lib.so nvgpu_unit/libnvgpu-unit.so
jcp $nvgpu_bins/drivers/gpu/nvgpu-l4t_64/libnvgpu-drv.so nvgpu_unit/libnvgpu-drv.so
jcp $TOP/kernel/nvgpu/userspace/unit.sh nvgpu_unit/unit.sh
jcp $TOP/kernel/nvgpu/userspace/gcov.sh nvgpu_unit/gcov.sh
find $nvgpu_bins/userspace/units -name "*.so" -not -path "*unit.so" \
-not -path "*drv.so" -exec ls {} \; | while read unit_so ; do