E. Scott Daniels | fc5c77b | 2020-02-21 13:24:29 -0500 | [diff] [blame] | 1 | #!/usr/env bash |
| 2 | # vim: ts=4 sw=4 noet : |
| 3 | #================================================================================== |
| 4 | # Copyright (c) 2020 Nokia |
| 5 | # Copyright (c) 2020 AT&T Intellectual Property. |
| 6 | # |
| 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 |
| 10 | # |
| 11 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | # |
| 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 | #================================================================================== |
| 19 | # |
| 20 | |
| 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... |
| 26 | |
| 27 | # Hoop: |
| 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. |
| 31 | |
| 32 | while [[ $1 == *"="* ]] |
| 33 | do |
| 34 | case ${1%%=*} in |
| 35 | LD_LIBRARY_PATH) |
| 36 | export LD_LIBRARY_PATH=${1##*=} |
| 37 | ;; |
| 38 | |
| 39 | C_INCLUDE_PATH) |
| 40 | export C_INCLUDE_PATH=${1##*=} |
| 41 | ;; |
| 42 | |
| 43 | LIBRARY_PATH) |
| 44 | export LIBRARY_PATH=${1##*=} |
| 45 | ;; |
| 46 | esac |
| 47 | |
| 48 | shift |
| 49 | done |
| 50 | |
| 51 | |
| 52 | set -e |
| 53 | cd app_test |
| 54 | bash ./run_all.ksh -S # build CI likely doesn't have ksh; Run SI tests |