Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL][E2E][NFC] Fix NameError if directive fails to parse (#16767)
Currently if a test contains a malformed directive, the following exception is raised along with the original parsing error: ```plaintext Exception during script execution: (original error) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "llvm/llvm/utils/lit/lit/worker.py", line 76, in _execute_test_handle_errors result = test.config.test_format.execute(test, lit_config) File "llvm/sycl/test-e2e/format.py", line 232, in execute script = self.parseTestScript(test) File "llvm/sycl/test-e2e/format.py", line 105, in parseTestScript return lit.Test.Result(Test.UNRESOLVED, str(e)) NameError: name 'Test' is not defined ``` The test ends up as UNRESOLVED either way, but fixing it is easy and improves the error message greatly.
- Loading branch information