ensure xml report path are relative to */pytorch/test (#60380)
Summary:
Changes the approach.
Root cause of this is for some reason: `inspect.getfile` returns absolute path instead of relative path to `os.getcwd` in newer python version. we sanitize this by removing the CI_PREFIX if applies
See:
https://app.circleci.com/pipelines/github/pytorch/pytorch/339568/workflows/43cac71c-759e-471f-83c2-d59c152dcd8a/jobs/14278585 vs. https://app.circleci.com/pipelines/github/pytorch/pytorch/339568/workflows/43cac71c-759e-471f-83c2-d59c152dcd8a/jobs/14278285
Pull Request resolved: https://github.com/pytorch/pytorch/pull/60380
Test Plan:
CI
Plot twist:
windows tests are actually launched via
```
pushd test
python run_test.py
```
while linux/macos tests are
```
python test/run_test.py
```
This might cause problem when using `os.getcwd()` we will see from PR CI results.
Reviewed By: malfet
Differential Revision: D29276969
Pulled By: walterddr
fbshipit-source-id: 336c2805d0c92733e0ff4c309ff2044dc2ed4e21
Author
Rong Rong (AI Infra)