Skip to content

Commit f4681eb

Browse files
committed
feat(debugger): add include and exclude properties to launch configurations
see --include and --exclude arguments from robot
1 parent 4b7e7d5 commit f4681eb

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

package.json

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,10 @@
829829
"launch": {
830830
"properties": {
831831
"target": {
832-
"type": ["string", "null"],
832+
"type": [
833+
"string",
834+
"null"
835+
],
833836
"description": "The .robot file or a folder containing .robot files to be launched.",
834837
"default": "${file}"
835838
},
@@ -929,6 +932,22 @@
929932
},
930933
"description": "Specifies the variable files for robotframework. Corresponds to the '--variablefile' option of robot."
931934
},
935+
"include": {
936+
"type": "array",
937+
"default": [],
938+
"items": {
939+
"type": "string"
940+
},
941+
"description": "Specifies the tags that should be included in test run. Corresponds to the '--include' option of robot."
942+
},
943+
"exclude": {
944+
"type": "array",
945+
"default": [],
946+
"items": {
947+
"type": "string"
948+
},
949+
"description": "Specifies the tags that should be excluded in test run. Corresponds to the '--excluded' option of robot."
950+
},
932951
"launcherArgs": {
933952
"type": "array",
934953
"description": "Extra command line arguments passed to launcher.",
@@ -1201,4 +1220,4 @@
12011220
"webpack": "^5.75.0",
12021221
"webpack-cli": "^5.0.1"
12031222
}
1204-
}
1223+
}

robotcode/debugger/launcher/server.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ async def _launch(
156156
variableFiles: Optional[List[str]] = None,
157157
languages: Optional[List[str]] = None,
158158
arguments: Optional[LaunchRequestArguments] = None,
159+
include: Optional[List[str]] = None,
160+
exclude: Optional[List[str]] = None,
159161
*_args: Any,
160162
**_kwargs: Any,
161163
) -> None:
@@ -226,6 +228,14 @@ async def _launch(
226228
for k, v in variables.items():
227229
run_args += ["-v", f"{k}:{v}"]
228230

231+
if include:
232+
for v in include:
233+
run_args += ["-i", f"{v}"]
234+
235+
if exclude:
236+
for v in exclude:
237+
run_args += ["-e", f"{v}"]
238+
229239
run_args += args or []
230240

231241
if paths:

0 commit comments

Comments
 (0)