Commit 367f355
authored
[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.1 parent 4f829bd commit 367f355
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
0 commit comments