robotframework-pabot 3.1.0__py3-none-any.whl → 4.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pabot/__init__.py +1 -1
- pabot/arguments.py +87 -95
- pabot/pabot.py +4 -4
- {robotframework_pabot-3.1.0.dist-info → robotframework_pabot-4.0.0.dist-info}/METADATA +1 -1
- {robotframework_pabot-3.1.0.dist-info → robotframework_pabot-4.0.0.dist-info}/RECORD +9 -9
- {robotframework_pabot-3.1.0.dist-info → robotframework_pabot-4.0.0.dist-info}/LICENSE.txt +0 -0
- {robotframework_pabot-3.1.0.dist-info → robotframework_pabot-4.0.0.dist-info}/WHEEL +0 -0
- {robotframework_pabot-3.1.0.dist-info → robotframework_pabot-4.0.0.dist-info}/entry_points.txt +0 -0
- {robotframework_pabot-3.1.0.dist-info → robotframework_pabot-4.0.0.dist-info}/top_level.txt +0 -0
pabot/__init__.py
CHANGED
pabot/arguments.py
CHANGED
|
@@ -80,7 +80,7 @@ def _parse_pabot_args(args): # type: (List[str]) -> Tuple[List[str], Dict[str,
|
|
|
80
80
|
"verbose": False,
|
|
81
81
|
"help": False,
|
|
82
82
|
"testlevelsplit": False,
|
|
83
|
-
"pabotlib":
|
|
83
|
+
"pabotlib": True,
|
|
84
84
|
"pabotlibhost": "127.0.0.1",
|
|
85
85
|
"pabotlibport": 8270,
|
|
86
86
|
"processes": _processes_count(),
|
|
@@ -91,108 +91,100 @@ def _parse_pabot_args(args): # type: (List[str]) -> Tuple[List[str], Dict[str,
|
|
|
91
91
|
"shardcount": 1,
|
|
92
92
|
"chunk": False,
|
|
93
93
|
}
|
|
94
|
+
# Explicitly define argument types for validation
|
|
95
|
+
flag_args = {
|
|
96
|
+
"verbose", "help", "testlevelsplit", "pabotlib",
|
|
97
|
+
"artifactsinsubfolders", "chunk"
|
|
98
|
+
}
|
|
99
|
+
value_args = {
|
|
100
|
+
"hive": str,
|
|
101
|
+
"processes": lambda x: int(x) if x != 'all' else None,
|
|
102
|
+
"resourcefile": str,
|
|
103
|
+
"pabotlibhost": str,
|
|
104
|
+
"pabotlibport": int,
|
|
105
|
+
"processtimeout": int,
|
|
106
|
+
"ordering": _parse_ordering,
|
|
107
|
+
"suitesfrom": str,
|
|
108
|
+
"artifacts": lambda x: x.split(","),
|
|
109
|
+
"shard": _parse_shard
|
|
110
|
+
}
|
|
111
|
+
|
|
94
112
|
argumentfiles = []
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
"pabotlibhost",
|
|
108
|
-
"pabotlibport",
|
|
109
|
-
"processtimeout",
|
|
110
|
-
"ordering",
|
|
111
|
-
"suitesfrom",
|
|
112
|
-
"artifacts",
|
|
113
|
-
"artifactsinsubfolders",
|
|
114
|
-
"help",
|
|
115
|
-
"shard",
|
|
116
|
-
"chunk",
|
|
117
|
-
]
|
|
118
|
-
]
|
|
119
|
-
or ARGSMATCHER.match(args[0])
|
|
120
|
-
):
|
|
121
|
-
if args[0] == "--hive":
|
|
122
|
-
pabot_args["hive"] = args[1]
|
|
123
|
-
args = args[2:]
|
|
124
|
-
continue
|
|
125
|
-
if args[0] == "--command":
|
|
126
|
-
end_index = args.index("--end-command")
|
|
127
|
-
pabot_args["command"] = args[1:end_index]
|
|
128
|
-
args = args[end_index + 1 :]
|
|
129
|
-
continue
|
|
130
|
-
if args[0] == "--processes":
|
|
131
|
-
pabot_args["processes"] = int(args[1]) if args[1] != 'all' else None
|
|
132
|
-
args = args[2:]
|
|
133
|
-
continue
|
|
134
|
-
if args[0] == "--verbose":
|
|
135
|
-
pabot_args["verbose"] = True
|
|
136
|
-
args = args[1:]
|
|
137
|
-
continue
|
|
138
|
-
if args[0] == "--chunk":
|
|
139
|
-
pabot_args["chunk"] = True
|
|
140
|
-
args = args[1:]
|
|
141
|
-
continue
|
|
142
|
-
if args[0] == "--resourcefile":
|
|
143
|
-
pabot_args["resourcefile"] = args[1]
|
|
144
|
-
args = args[2:]
|
|
145
|
-
continue
|
|
146
|
-
if args[0] == "--pabotlib":
|
|
147
|
-
pabot_args["pabotlib"] = True
|
|
148
|
-
args = args[1:]
|
|
149
|
-
continue
|
|
150
|
-
if args[0] == "--ordering":
|
|
151
|
-
pabot_args["ordering"] = _parse_ordering(args[1])
|
|
152
|
-
args = args[2:]
|
|
113
|
+
remaining_args = []
|
|
114
|
+
i = 0
|
|
115
|
+
|
|
116
|
+
# Track conflicting options during parsing
|
|
117
|
+
saw_pabotlib_flag = False
|
|
118
|
+
saw_no_pabotlib = False
|
|
119
|
+
|
|
120
|
+
while i < len(args):
|
|
121
|
+
arg = args[i]
|
|
122
|
+
if not arg.startswith('--'):
|
|
123
|
+
remaining_args.append(arg)
|
|
124
|
+
i += 1
|
|
153
125
|
continue
|
|
154
|
-
|
|
155
|
-
|
|
126
|
+
|
|
127
|
+
arg_name = arg[2:] # Strip '--'
|
|
128
|
+
|
|
129
|
+
if arg_name == "no-pabotlib":
|
|
130
|
+
saw_no_pabotlib = True
|
|
131
|
+
pabot_args["pabotlib"] = False # Just set the main flag
|
|
156
132
|
args = args[1:]
|
|
157
133
|
continue
|
|
158
|
-
if
|
|
159
|
-
|
|
160
|
-
args = args[2:]
|
|
161
|
-
continue
|
|
162
|
-
if args[0] == "--pabotlibport":
|
|
163
|
-
pabot_args["pabotlibport"] = int(args[1])
|
|
164
|
-
args = args[2:]
|
|
165
|
-
continue
|
|
166
|
-
if args[0] == "--processtimeout":
|
|
167
|
-
pabot_args["processtimeout"] = int(args[1])
|
|
168
|
-
args = args[2:]
|
|
169
|
-
continue
|
|
170
|
-
if args[0] == "--suitesfrom":
|
|
171
|
-
pabot_args["suitesfrom"] = args[1]
|
|
172
|
-
args = args[2:]
|
|
173
|
-
continue
|
|
174
|
-
if args[0] == "--artifacts":
|
|
175
|
-
pabot_args["artifacts"] = args[1].split(",")
|
|
176
|
-
args = args[2:]
|
|
177
|
-
continue
|
|
178
|
-
if args[0] == "--artifactsinsubfolders":
|
|
179
|
-
pabot_args["artifactsinsubfolders"] = True
|
|
134
|
+
if arg_name == "pabotlib":
|
|
135
|
+
saw_pabotlib_flag = True
|
|
180
136
|
args = args[1:]
|
|
181
137
|
continue
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
138
|
+
|
|
139
|
+
# Special case for command
|
|
140
|
+
if arg_name == "command":
|
|
141
|
+
try:
|
|
142
|
+
end_index = args.index("--end-command", i)
|
|
143
|
+
pabot_args["command"] = args[i+1:end_index]
|
|
144
|
+
i = end_index + 1
|
|
145
|
+
continue
|
|
146
|
+
except ValueError:
|
|
147
|
+
raise DataError("--command requires matching --end-command")
|
|
148
|
+
|
|
149
|
+
# Handle flag arguments
|
|
150
|
+
if arg_name in flag_args:
|
|
151
|
+
pabot_args[arg_name] = True
|
|
152
|
+
i += 1
|
|
153
|
+
continue
|
|
154
|
+
|
|
155
|
+
# Handle value arguments
|
|
156
|
+
if arg_name in value_args:
|
|
157
|
+
if i + 1 >= len(args):
|
|
158
|
+
raise DataError(f"--{arg_name} requires a value")
|
|
159
|
+
try:
|
|
160
|
+
value = value_args[arg_name](args[i + 1])
|
|
161
|
+
if arg_name == "shard":
|
|
162
|
+
pabot_args["shardindex"], pabot_args["shardcount"] = value
|
|
163
|
+
else:
|
|
164
|
+
pabot_args[arg_name] = value
|
|
165
|
+
i += 2
|
|
166
|
+
continue
|
|
167
|
+
except (ValueError, TypeError) as e:
|
|
168
|
+
raise DataError(f"Invalid value for --{arg_name}: {args[i + 1]}")
|
|
169
|
+
|
|
170
|
+
# Handle argument files
|
|
171
|
+
match = ARGSMATCHER.match(arg)
|
|
187
172
|
if match:
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
173
|
+
if i + 1 >= len(args):
|
|
174
|
+
raise DataError(f"{arg} requires a value")
|
|
175
|
+
argumentfiles.append((match.group(1), args[i + 1]))
|
|
176
|
+
i += 2
|
|
177
|
+
continue
|
|
178
|
+
|
|
179
|
+
# If we get here, it's a non-pabot argument
|
|
180
|
+
remaining_args.append(arg)
|
|
181
|
+
i += 1
|
|
182
|
+
|
|
183
|
+
if saw_pabotlib_flag and saw_no_pabotlib:
|
|
184
|
+
raise DataError("Cannot use both --pabotlib and --no-pabotlib options together")
|
|
185
|
+
|
|
194
186
|
pabot_args["argumentfiles"] = argumentfiles
|
|
195
|
-
return
|
|
187
|
+
return remaining_args, pabot_args
|
|
196
188
|
|
|
197
189
|
|
|
198
190
|
def _parse_ordering(filename): # type: (str) -> List[ExecutionItem]
|
pabot/pabot.py
CHANGED
|
@@ -2019,17 +2019,17 @@ def _verify_depends(suite_names):
|
|
|
2019
2019
|
)
|
|
2020
2020
|
)
|
|
2021
2021
|
if suites_with_depends != suites_with_found_dependencies:
|
|
2022
|
-
raise
|
|
2022
|
+
raise DataError("Invalid test configuration: Some test suites have dependencies (#DEPENDS) that cannot be found.")
|
|
2023
2023
|
suites_with_circular_dependencies = list(
|
|
2024
2024
|
filter(lambda suite: suite.depends == suite.name, suites_with_depends)
|
|
2025
2025
|
)
|
|
2026
2026
|
if suites_with_circular_dependencies:
|
|
2027
|
-
raise
|
|
2027
|
+
raise DataError("Invalid test configuration: Test suites cannot depend on themselves.")
|
|
2028
2028
|
grouped_suites = list(
|
|
2029
2029
|
filter(lambda suite: isinstance(suite, GroupItem), suite_names)
|
|
2030
2030
|
)
|
|
2031
2031
|
if grouped_suites and suites_with_depends:
|
|
2032
|
-
raise
|
|
2032
|
+
raise DataError("Invalid test configuration: Cannot use both #DEPENDS and grouped suites.")
|
|
2033
2033
|
|
|
2034
2034
|
|
|
2035
2035
|
def _group_by_depend(suite_names):
|
|
@@ -2057,7 +2057,7 @@ def _group_by_depend(suite_names):
|
|
|
2057
2057
|
dependency_tree += [dependent_on_last_stage]
|
|
2058
2058
|
flattened_dependency_tree = sum(dependency_tree, [])
|
|
2059
2059
|
if len(flattened_dependency_tree) != len(runnable_suites):
|
|
2060
|
-
raise
|
|
2060
|
+
raise DataError("Invalid test configuration: Circular or unmet dependencies detected between test suites. Please check your #DEPENDS definitions.")
|
|
2061
2061
|
return dependency_tree
|
|
2062
2062
|
|
|
2063
2063
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
pabot/SharedLibrary.py,sha256=lVYRIajUlMzlNT7bSylLYL248Rumh4dlg4OMl3M988E,2479
|
|
2
|
-
pabot/__init__.py,sha256=
|
|
3
|
-
pabot/arguments.py,sha256=
|
|
2
|
+
pabot/__init__.py,sha256=rcrYtEQEaO-Ne2-f9csXGogs2eiVd4yRdxkBGmnItxw,93
|
|
3
|
+
pabot/arguments.py,sha256=hgENptU63ftYktbQTNahDYC-50kJQYTRUM-yZ-6wln8,7046
|
|
4
4
|
pabot/clientwrapper.py,sha256=yz7battGs0exysnDeLDWJuzpb2Q-qSjitwxZMO2TlJw,231
|
|
5
5
|
pabot/coordinatorwrapper.py,sha256=nQQ7IowD6c246y8y9nsx0HZbt8vS2XODhPVDjm-lyi0,195
|
|
6
6
|
pabot/execution_items.py,sha256=e7mjwAdgd-qGHjk9fR5QmIxqf6_c73rVbMGHVfU924I,8327
|
|
7
|
-
pabot/pabot.py,sha256=
|
|
7
|
+
pabot/pabot.py,sha256=XqWTq7SlXbcWjV_m3bk3Yq3D-xqTVZTGwkllIWKIjgg,67826
|
|
8
8
|
pabot/pabotlib.py,sha256=XgiEtDJ8ZkoOcBAWokgzY5TlfYIL4hZN9Q3-Kj-5HhQ,22312
|
|
9
9
|
pabot/result_merger.py,sha256=0LJN5AhgbaXW0OSCvygYvhxY3eOwYp5GntTjLASqsu8,8864
|
|
10
10
|
pabot/robotremoteserver.py,sha256=L3O2QRKSGSE4ux5M1ip5XJMaelqaxQWJxd9wLLdtpzM,22272
|
|
@@ -14,9 +14,9 @@ pabot/py3/client.py,sha256=Od9L4vZ0sozMHq_W_ITQHBBt8kAej40DG58wnxmbHGM,1434
|
|
|
14
14
|
pabot/py3/coordinator.py,sha256=kBshCzA_1QX_f0WNk42QBJyDYSwSlNM-UEBxOReOj6E,2313
|
|
15
15
|
pabot/py3/messages.py,sha256=7earx6jFDSaK7LofHHv1fWuPEw7uxYN48JT6NZMWEdk,2558
|
|
16
16
|
pabot/py3/worker.py,sha256=5rfp4ZiW6gf8GRz6eC0-KUkfx847A91lVtRYpLAv2sg,1612
|
|
17
|
-
robotframework_pabot-
|
|
18
|
-
robotframework_pabot-
|
|
19
|
-
robotframework_pabot-
|
|
20
|
-
robotframework_pabot-
|
|
21
|
-
robotframework_pabot-
|
|
22
|
-
robotframework_pabot-
|
|
17
|
+
robotframework_pabot-4.0.0.dist-info/LICENSE.txt,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
|
18
|
+
robotframework_pabot-4.0.0.dist-info/METADATA,sha256=gmCpH_OKFwnSgV9hZU8TO_8CfUfJ92g7kWmlAEJfkxE,997
|
|
19
|
+
robotframework_pabot-4.0.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
20
|
+
robotframework_pabot-4.0.0.dist-info/entry_points.txt,sha256=JpAIFADTeFOQWdwmn56KpAil8V3-41ZC5ICXCYm3Ng0,43
|
|
21
|
+
robotframework_pabot-4.0.0.dist-info/top_level.txt,sha256=t3OwfEAsSxyxrhjy_GCJYHKbV_X6AIsgeLhYeHvObG4,6
|
|
22
|
+
robotframework_pabot-4.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{robotframework_pabot-3.1.0.dist-info → robotframework_pabot-4.0.0.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|