summaryrefslogtreecommitdiffstats
path: root/userspace/unit.sh
diff options
context:
space:
mode:
Diffstat (limited to 'userspace/unit.sh')
-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 $*"