Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL][E2E] Fix multiple test suite discovery (#14534)
Since #9078 (itself a fix for #8854), the SYCL E2E lit config would change the working directory and never set it back. This impeded LIT's ability to discover tests and test suites, when tasked with sourcing multiple. For example: llvm-lit sycl/test/A sycl/test/B LIT would discover test 'A' by appending its relative path to the CWD (e.g., `root/sycl/test/A`) and load up the SYCL E2E lit.cfg. This would change directory into the SYCL build directory. When discovering test 'B' it would append its relative path to the SYCL binary dir and fail to find it (e.g., `root/build/tools/sycl/test-e2e/sycl/test/B`). This would also have the effect of loading the SYCL E2E LIT config a second time, even though it was already loaded. With this change, we maintain the CWD but open the temp files using absolute paths. This allows us to run multiple tests from multiple different paths at the same time, even ones from different suites: llvm-lit sycl/test/A clang/test/B llvm/test/C Running multiple individual SYCL tests on the same command line will also only load the SYCL config the once.
- Loading branch information