A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 7, 10:15 UTC
[ROCm][CI] Fix backslash-continuation in pytest marker re-quoting and treat exit code 5 as success (#35798)
Signed-off-by: Andreas Karatzas <akaratza@amd.com>
Andreas Karatzas committed
Mar 2, 2026 at 18:07 UTC
18c29c746b1f9b2c6aba327d13f4660b122c5cd7
1 file changed
+23
-2
.buildkite/scripts/hardware_ci/run-amd-test.sh
+23
-2
@@ -99,6 +99,15 @@ is_multi_node() {
99
return 1
100
}
101
102
+handle_pytest_exit() {
103
+ local exit_code=$1
104
+ if [ "$exit_code" -eq 5 ]; then
105
+ echo "Pytest exit code 5 (no tests collected) - treating as success."
106
+ exit 0
107
+ fi
108
+ exit "$exit_code"
109
+}
110
+
111
###############################################################################
112
# Pytest marker/keyword re-quoting
113
#
@@ -135,8 +144,9 @@ re_quote_pytest_markers() {
144
local collecting=false
145
local marker_buf=""
146
138
- # Flatten newlines for consistent tokenization
139
- local flat="${input//$'\n'/ }"
147
+ # Strip backslash-newline continuations, then flatten remaining newlines
148
+ local flat="${input//$'\\\n'/ }"
149
+ flat="${flat//$'\n'/ }"
150
151
# Disable globbing to prevent *.py etc. from expanding during read -ra
152
local restore_glob
@@ -164,6 +174,9 @@ re_quote_pytest_markers() {
174
175
local is_boundary=false
176
case "$word" in
177
+ # Line-continuation artifact
178
+ "\\")
179
+ is_boundary=true ;;
180
# Command separators
181
"&&"|"||"|";"|"|")
182
is_boundary=true ;;
@@ -204,6 +217,9 @@ re_quote_pytest_markers() {
217
if [[ "$word" == "-m" || "$word" == "-k" ]]; then
218
output+="${word} "
219
collecting=true
220
+ # Drop stray backslash tokens silently
221
+ elif [[ "$word" == "\\" ]]; then
222
+ :
223
else
224
output+="${word} "
225
fi
@@ -453,7 +469,9 @@ if is_multi_node "$commands"; then
469
done
470
471
/bin/bash -c "${composite_command}"
472
+ exit_code=$?
473
cleanup_network
474
+ handle_pytest_exit "$exit_code"
475
else
476
echo "Multi-node job detected but failed to parse bracket command syntax."
477
echo "Expected format: prefix ; [node0_cmd1, node0_cmd2] && [node1_cmd1, node1_cmd2]"
@@ -480,4 +498,7 @@ else
498
--name "${container_name}" \
499
"${image_name}" \
500
/bin/bash -c "${commands}"
501
+
502
+ exit_code=$?
503
+ handle_pytest_exit "$exit_code"
504
fi