blob: d40bb5853ab79c452a91183a0c26c79a1d8e4936 [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
rameshiyer2762ccbbb2023-02-01 15:06:45 +000030export APEX_IP=policy-apex-pdp
31export DMAAP_IP=message-router
rameshiyer27be226252023-02-09 14:46:18 +000032export SIM_IP=message-router
rameshiyer2707004862023-01-23 11:50:01 +000033
34export ROBOT_VARIABLES=
35ROBOT_VARIABLES="-v DATA:$DATA -v NODETEMPLATES:$NODETEMPLATES -v POLICY_RUNTIME_ACM_IP:$POLICY_RUNTIME_ACM_IP -v POLICY_API_IP:$POLICY_API_IP
rameshiyer27be226252023-02-09 14:46:18 +000036-v POLICY_PAP_IP:$POLICY_PAP_IP -v APEX_IP:$APEX_IP -v DMAAP_IP:$DMAAP_IP -v SIM_IP:$SIM_IP"
rameshiyer2707004862023-01-23 11:50:01 +000037
38echo "Run Robot test"
39echo ROBOT_VARIABLES="${ROBOT_VARIABLES}"
40echo "Starting Robot test suites ..."
rameshiyer276ebe5b62023-02-14 17:52:49 +000041python3 -m robot.run -d /tmp/ $ROBOT_VARIABLES $1
rameshiyer2707004862023-01-23 11:50:01 +000042RESULT=$?
43echo "RESULT: ${RESULT}"