35 lines
No EOL
1.1 KiB
Bash
35 lines
No EOL
1.1 KiB
Bash
#//========================================================================
|
|
#// Copyright (c) Technische Software Entwicklung Plazotta © 2021
|
|
#//
|
|
#// DESCRIPTION:
|
|
#// Shell Script to Build a cmake project under linux, running the Unittest and finally start teh install step
|
|
#//
|
|
#// HISTORY:
|
|
#// 09.04.2021 / PP
|
|
#// Module created.
|
|
#//========================================================================
|
|
#!/bin/bash
|
|
#
|
|
#=======================================================================
|
|
# Check Parameter
|
|
#=======================================================================
|
|
if [ -z "$1" ]
|
|
then
|
|
echo "usage: RunUnitTest [UnitTestExe]"
|
|
exit 2
|
|
fi
|
|
#=======================================================================
|
|
# Run Unit Test
|
|
#=======================================================================
|
|
|
|
#- Get the RUNPATH and setup the LD_LIBRARY_PATH------------------------
|
|
|
|
USED_LD_PATH=$(readelf -d $1 | grep RUNPATH | awk 'NR > 1 {print $1}' RS='[' FS=']')
|
|
export LD_LIBRARY_PATH=$USED_LD_PATH
|
|
|
|
./$1
|
|
if [ $? -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
#
|
|
exit 0 |