gpu: nvgpu: unit: run test in right path

This make sure we're in the assumed path for running the unit fw.
This is done for GVS/nvgpu_submit.

JIRA NVGPU-1042

Change-Id: I7dfc874fdde2d97d543c25ac139db23f723985a1
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1848120
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Philip Elcan
2018-09-26 14:40:56 -04:00
committed by Abdul Salam
parent c309f2c9d8
commit 24a678ea81

View File

@@ -8,6 +8,9 @@
# that unit tests are found and nvgpu-drv is found. # that unit tests are found and nvgpu-drv is found.
# #
this_script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )"
pushd $this_script_dir
if [ -f nvgpu_unit ]; then if [ -f nvgpu_unit ]; then
# if the executable is in the current directory, we are running on # if the executable is in the current directory, we are running on
# target, so use that dir structure # target, so use that dir structure
@@ -23,3 +26,6 @@ export LD_LIBRARY_PATH
echo "$ $NVGPU_UNIT $*" echo "$ $NVGPU_UNIT $*"
$NVGPU_UNIT $* $NVGPU_UNIT $*
rc=$?
popd
exit $rc