Skip to content

Commit 3b6682c

Browse files
committed
Add some flags for debugging pytest
1 parent 7a997e1 commit 3b6682c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

sdks/python/scripts/run_pytest.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,19 @@ if [[ -n "$test_paths" ]]; then
129129
fi
130130
pytest_command_args="$options $pyargs_section"
131131

132+
export TRITON_CPU_ONLY=1
133+
export TORCH_COMPILE_DISABLE=1
134+
export PYTHONFAULTHANDLER=1
135+
132136
# Run tests in parallel.
133137
echo "Running parallel tests with: pytest -m \"$marker_for_parallel_tests\" $pytest_command_args"
134-
pytest -v -rs -o junit_suite_name=${envname} \
138+
pytest -v -rs -n 1 -o junit_suite_name=${envname} \
135139
--junitxml=pytest_${envname}.xml -m "$marker_for_parallel_tests" -n 6 --import-mode=importlib ${pytest_args} ${pytest_command_args}
136140
status1=$?
137141

138142
# Run tests sequentially.
139143
echo "Running sequential tests with: pytest -m \"$marker_for_sequential_tests\" $pytest_command_args"
140-
pytest -v -rs -o junit_suite_name=${envname}_no_xdist \
144+
pytest -v -rs -n 1 -o junit_suite_name=${envname}_no_xdist \
141145
--junitxml=pytest_${envname}_no_xdist.xml -m "$marker_for_sequential_tests" --import-mode=importlib ${pytest_args} ${pytest_command_args}
142146
status2=$?
143147

0 commit comments

Comments
 (0)