summaryrefslogtreecommitdiffstats
path: root/userspace
diff options
context:
space:
mode:
authorPhilip Elcan <pelcan@nvidia.com>2018-09-21 10:59:49 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-09-24 18:54:55 -0400
commitbf99dfdaf2dd974723dfce23d815b2f5ee83673d (patch)
treebdb0fb9d19b161d1c430ca535b21c2e1982caec5 /userspace
parent7970c80152725e1dfc9268ec8c40433cffe04b1a (diff)
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>
Diffstat (limited to 'userspace')
-rwxr-xr-xuserspace/unit.sh15
1 files changed, 12 insertions, 3 deletions
diff --git a/userspace/unit.sh b/userspace/unit.sh
index 078512f8..dd74322c 100755
--- a/userspace/unit.sh
+++ b/userspace/unit.sh
@@ -1,14 +1,23 @@
1#!/bin/bash 1#!/bin/bash
2 2
3# Copyright (c) 2018, NVIDIA CORPORATION. All Rights Reserved.
4
3# 5#
4# Execute the unit test. Args to this script are passed on to the unit test 6# Execute the unit test. Args to this script are passed on to the unit test
5# core. This just serves to set the LD_LIBRARY_PATH environment variable such 7# core. This just serves to set the LD_LIBRARY_PATH environment variable such
6# that unit tests are found and nvgpu-drv is found. 8# that unit tests are found and nvgpu-drv is found.
7# 9#
8 10
9LD_LIBRARY_PATH="build:build/units" 11if [ -f nvgpu_unit ]; then
10NVGPU_UNIT=build/nvgpu_unit 12 # if the executable is in the current directory, we are running on
11 13 # target, so use that dir structure
14 LD_LIBRARY_PATH=".:units"
15 NVGPU_UNIT="./nvgpu_unit -L units/"
16else
17 # running on host
18 LD_LIBRARY_PATH="build:build/units"
19 NVGPU_UNIT=build/nvgpu_unit
20fi
12export LD_LIBRARY_PATH 21export LD_LIBRARY_PATH
13 22
14echo "$ $NVGPU_UNIT $*" 23echo "$ $NVGPU_UNIT $*"