Files
linux-nvgpu/userspace/unit.sh
Philip Elcan bf99dfdaf2 gpu: nvgpu: unit: update unit.h for target
The directory structure is every so slightly different on target, so
this handles the differences.

JIRA NVGPU-1042

Change-Id: I5a0566c7d371fcb5cd541c71841e8acedfaac6e2
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1837443
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
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>
2018-09-24 15:54:55 -07:00

26 lines
691 B
Bash
Executable File

#!/bin/bash
# Copyright (c) 2018, NVIDIA CORPORATION. All Rights Reserved.
#
# Execute the unit test. Args to this script are passed on to the unit test
# core. This just serves to set the LD_LIBRARY_PATH environment variable such
# that unit tests are found and nvgpu-drv is found.
#
if [ -f nvgpu_unit ]; then
# if the executable is in the current directory, we are running on
# target, so use that dir structure
LD_LIBRARY_PATH=".:units"
NVGPU_UNIT="./nvgpu_unit -L units/"
else
# running on host
LD_LIBRARY_PATH="build:build/units"
NVGPU_UNIT=build/nvgpu_unit
fi
export LD_LIBRARY_PATH
echo "$ $NVGPU_UNIT $*"
$NVGPU_UNIT $*