-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstart_robot_remote_cli.magik
84 lines (79 loc) · 3.05 KB
/
start_robot_remote_cli.magik
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#% text_encoding = iso8859_1
#----------------------------------------------------------------------
# Copyright 2012-2023 Luiko Czub, Smallcases Software GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#----------------------------------------------------------------------
#
# Project : Automated testing Magik Images with Robot Framework
# http://github.com/lczub/robotframework-magik
#
# Scope: Procedure to start a remote_cli with port and auth settings
# configured via environment variables
#
# Could be used as startup procedure in an image under test.
#
#----------------------------------------------------------------------
#
# Project : Automated testing Magik Images with Robot Framework
# http://github.com/lczub/robotframework-magik
#
# Scope: Magik Script to load robot_remote_cli.magik via the
# environment variable SW_MSF_STARTUP_MAGIK and start
# the remote_cli.
#
# Could be used for all types of images.
# If SW_MSF_STARTUP_MAGIK could not be used, an alternative
# for images with startup actions is the defintion of
# an startup procedure (see start_robot_remote_cli.script)
#
# Example 1) start swaf image with remote cli listen to 14001
#
# set SMALLWORLD_GIS=....\CST420\product
# set ROBOT_MAGIK_DIR=....\robotframework-magik
# set SW_MSF_STARTUP_MAGIK=%ROBOT_MAGIK_DIR%\resources\scripts\start_robot_remote_cli.magik
# set ROBOT_CLI_PORT=14001
# %SMALLWORLD_GIS%\bin\x86\gis.exe swaf
#
# Example 2) start cambridge swaf open image with remote cli
# listen to 14002 and accept connections from 111.222.333.*
#
# set SMALLWORLD_GIS=....\CST420\product
# set CBG_ALIAS_FILE=....\gis_aliases
# set ROBOT_MAGIK_DIR=....\robotframework-magik
# set SW_MSF_STARTUP_MAGIK=%ROBOT_MAGIK_DIR%\resources\scripts\start_robot_remote_cli.magik
# set ROBOT_CLI_PORT=14002
# set ROBOT_HOSTADDR=111.222.333.*
# %SMALLWORLD_GIS%\bin\x86\gis.exe -a %CBG_ALIAS_FILE% cam_db_open_swaf -login root/
#
#----------------------------------------------------------------------
_package sw
$
_block
_local a_dir <<
system.pathname_from_components(
"resources",
system.getenv("ROBOT_MAGIK_DIR"))
a_dir <<
system.pathname_from_components(
"scripts", a_dir)
_local a_file <<
system.pathname_from_components(
"robot_remote_cli.magik", a_dir)
load_file(a_file)
_endblock
$
_block
robot_start_remote_cli()
_endblock
$