blob: 7cd2c9247b66acea40050642660725b620e7dabe [file] [log] [blame]
rameshiyer2707004862023-01-23 11:50:01 +00001#!/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
22ROBOT_FILE=$1
23echo "Invoking the robot tests from: $1"
24
25export DATA=/opt/robotworkspace/models/models-examples/src/main/resources/policies
26export NODETEMPLATES=/opt/robotworkspace/models/models-examples/src/main/resources/nodetemplates
27export POLICY_RUNTIME_ACM_IP=policy-clamp-runtime-acm
28export POLICY_API_IP=policy-api
29export POLICY_PAP_IP=policy-pap
30export POLICY_APEX_PDP_IP=policy-apex-pdp
31
32
33export ROBOT_VARIABLES=
34ROBOT_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
37echo "Run Robot test"
38echo ROBOT_VARIABLES="${ROBOT_VARIABLES}"
39echo "Starting Robot test suites ..."
40python3 -m robot.run $ROBOT_VARIABLES $1
41RESULT=$?
42echo "RESULT: ${RESULT}"