rameshiyer27 | 0700486 | 2023-01-23 11:50:01 +0000 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # ============LICENSE_START==================================================== |
| 4 | # Copyright (C) 2023 Nordix Foundation. |
| 5 | # ============================================================================= |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
| 17 | # |
| 18 | # SPDX-License-Identifier: Apache-2.0 |
| 19 | # ============LICENSE_END====================================================== |
| 20 | |
| 21 | |
| 22 | ROBOT_FILE=$1 |
| 23 | echo "Invoking the robot tests from: $1" |
| 24 | |
| 25 | export DATA=/opt/robotworkspace/models/models-examples/src/main/resources/policies |
| 26 | export NODETEMPLATES=/opt/robotworkspace/models/models-examples/src/main/resources/nodetemplates |
| 27 | export POLICY_RUNTIME_ACM_IP=policy-clamp-runtime-acm |
| 28 | export POLICY_API_IP=policy-api |
| 29 | export POLICY_PAP_IP=policy-pap |
| 30 | export POLICY_APEX_PDP_IP=policy-apex-pdp |
| 31 | |
| 32 | |
| 33 | export ROBOT_VARIABLES= |
| 34 | ROBOT_VARIABLES="-v DATA:$DATA -v NODETEMPLATES:$NODETEMPLATES -v POLICY_RUNTIME_ACM_IP:$POLICY_RUNTIME_ACM_IP -v POLICY_API_IP:$POLICY_API_IP |
| 35 | -v POLICY_PAP_IP:$POLICY_PAP_IP -v POLICY_APEX_PDP_IP:$POLICY_APEX_PDP_IP" |
| 36 | |
| 37 | echo "Run Robot test" |
| 38 | echo ROBOT_VARIABLES="${ROBOT_VARIABLES}" |
| 39 | echo "Starting Robot test suites ..." |
| 40 | python3 -m robot.run $ROBOT_VARIABLES $1 |
| 41 | RESULT=$? |
| 42 | echo "RESULT: ${RESULT}" |