2 # vim: ts=4 sw=4 noet :
3 #==================================================================================
4 # Copyright (c) 2020 Nokia
5 # Copyright (c) 2020 AT&T Intellectual Property.
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 #==================================================================================
21 # this is a simple wrapper until we figure out why CMake seems unable to start
22 # the run_all script in the app test directory. Even after that it will likely
23 # be needed because it seems impossible to set environment vars from CMake for
24 # the test script which makes testing alternate install locations impossible.
25 # So, we must jump some hoops to allow for that...
28 # It seems that we cannot supply env vars on the CMake generated command :(
29 # To deal with this, all leading positional parms of the form foo=bar are
30 # looked at and if we like it we'll export it before starting the test.
32 # It is also impossible for us to know what the build directory the user
33 # created for their build and test. We will auto discover if they used
34 # .build or build in the parent to this directory (in that order). If a
35 # different directory is desired, then the build directory must be supplied
36 # as an environment variable to the make:
38 # BUILD_PATH=$PWD make test ARGS=-v
40 while [[ $1 == *"="* ]]
43 CMBUILD) # should be cmake build dir
44 if [[ -z $BUILD_PATH ]] # still allow user to override
46 export BUILD_PATH=${1##*=}
51 export LD_LIBRARY_PATH=${1##*=}
55 export C_INCLUDE_PATH=${1##*=}
59 export LIBRARY_PATH=${1##*=}
69 bash ./run_all.sh -S # build CI likely doesn't have ksh; Run SI tests