Closed anmyachev closed 3 months ago
Note that the method for collecting test names recommended by pytest-select does not show python
:
$ cd python/test/unit/
$ pytest --device xpu language/ --ignore=language/test_line_info.py --ignore=language/test_subprocess.py --collect-only --quiet
test/unit/language/test_annotations.py::test_int_annotation[False-8]
test/unit/language/test_annotations.py::test_int_annotation[False-16]
test/unit/language/test_annotations.py::test_int_annotation[False-32]
test/unit/language/test_annotations.py::test_int_annotation[False-64]
test/unit/language/test_annotations.py::test_int_annotation[True-8]
...
Cannot reproduce in my local environment (jupyterhub session) with Python 3.10. Also we run daily tests with Python 3.9 - 3.12, we should have detected this issue long time ago.
Try to run without pytest-xdist (do not specify -n ${NUM_PROCESSES}
), potentially there is another issue.
The only difference seems to be in how pytest defines rootdir
/intel-xpu-backend-for-triton/python
https://github.com/intel/intel-xpu-backend-for-triton/actions/runs/10194903852/job/28202467254#step:17:53
vs
/intel-xpu-backend-for-triton (in my env)
But I still don't understand why this is so.
The problem was that the process of determining the root directory considers the folder that is not transferred together with the option as a folder with tests and takes it into account. However, this is not correct.
Debug info from determine_setup
function:
inifile = None
args = ['./intel-xpu-backend-for-triton/reports/language-warnings.json', '--warnings-json-output-file', '--deselect-from-file=./intel-xpu-backend-for-triton/scripts/skiplist/current/language.txt', '--select-fail
-on-missing', '--device', 'xpu', 'language/']
rootdir_cmd_arg = None
invocation_dir = PosixPath('./intel-xpu-backend-for-triton/python/test/unit')
If you make such a patch, the definition of the root folder will become correct.
"--warnings-json-output-file"
"$TRITON_TEST_REPORTS_DIR/${TRITON_TEST_SUITE}-warnings.json"
vs
"--warnings-json-output-file=$TRITON_TEST_REPORTS_DIR/${TRITON_TEST_SUITE}-warnings.json"
There is still no understanding of why the problem is not reproduced in the CI.
Example of the problem:
Log:
~Please note that tests are still skipped, but this only happens due to a coincidence of the test name (but not identifiers).~ Maybe it depends on the python version. For 3.9 the problem is not reproduced (I use 3.10)
See
pytest-select
code for details: https://github.com/ulope/pytest-select/blob/31e39c5a9b08d4509520941d47fe69cbd2d34dbc/pytest_select/plugin.py#L76