[ROCm][CI/Build] Fix the pytest hook to properly print out the summary (#38585)
Signed-off-by: Gregory Shtrasberg <Gregory.Shtrasberg@amd.com>
This commit is contained in:
+14
-1
@@ -390,7 +390,20 @@ ENV MIOPEN_DEBUG_CONV_GEMM=0
|
|||||||
RUN mkdir src && mv vllm src/vllm
|
RUN mkdir src && mv vllm src/vllm
|
||||||
|
|
||||||
# This is a workaround to ensure pytest exits with the correct status code in CI tests.
|
# This is a workaround to ensure pytest exits with the correct status code in CI tests.
|
||||||
RUN echo "import os\n\ndef pytest_sessionfinish(session, exitstatus):\n os._exit(int(exitstatus))" > /vllm-workspace/conftest.py
|
RUN cat << 'EOF' > /vllm-workspace/conftest.py
|
||||||
|
import os
|
||||||
|
|
||||||
|
_exit_code = 1
|
||||||
|
|
||||||
|
def pytest_sessionfinish(session, exitstatus):
|
||||||
|
global _exit_code
|
||||||
|
_exit_code = int(exitstatus)
|
||||||
|
|
||||||
|
def pytest_unconfigure(config):
|
||||||
|
sys.stdout.flush()
|
||||||
|
sys.stderr.flush()
|
||||||
|
os._exit(_exit_code)
|
||||||
|
EOF
|
||||||
|
|
||||||
# -----------------------
|
# -----------------------
|
||||||
# Final vLLM image
|
# Final vLLM image
|
||||||
|
|||||||
Reference in New Issue
Block a user