While testing Bear [1] tests it appears devel/llvm11 (and maybe other llvmXY ports) lit python scripts are not being updated to use the proper lit module name (lit11, etc.) .... 1: {'preload', 'make', 'dynamic-shell', 'shell', 'dynamic-make'} 1: Traceback (most recent call last): 1: File "/usr/local/bin/lit11", line 6, in <module> 1: main() 1: File "/usr/local/lib/python3.8/site-packages/lit11/main.py", line 93, in main 1: mark_excluded(discovered_tests, selected_tests) 1: File "/usr/local/lib/python3.8/site-packages/lit11/main.py", line 191, in mark_excluded 1: result = lit11.Test.Result(lit.Test.EXCLUDED) 1: NameError: name 'lit' is not defined 1/1 Test #1: bear::func_test ..................***Failed 0.25 sec /usr/local/lib/python3.8/site-packages/lit11/main.py: result = lit11.Test.Result(lit.Test.EXCLUDED) /usr/local/lib/python3.8/site-packages/lit11/run.py: skipped = lit11.Test.Result(lit.Test.SKIPPED) /usr/local/lib/python3.8/site-packages/lit11/worker.py: return lit11.Test.Result(lit.Test.UNRESOLVED, output) These should be "lit11." I see the Makefile post-patch will replace lit. usage to lit${LLVM_SUFFIX} however it's not updating the above files however most of the "lit." usage from two above are using lit${LLVM_SUFFIX}. So I'm guessing the Makefile updates what's needed for the build to generate/update the rest of the python files. Which maybe makes me think it's an upstream issue? If not can this be updated to fix these three files? [1] https://github.com/rizsotto/Bear/blob/master/INSTALL.md
I've found the problem and will fix soon. The issue was that the substitution of "lit11." for "lit." was only being performed one-per-line so patterns like "lit.Test.Result(lit.Test.EXCLUDED)" were mishandled.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=4512e7747f3024cec4549b9d16374ed05f6759a2 commit 4512e7747f3024cec4549b9d16374ed05f6759a2 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2021-07-16 18:00:31 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2021-07-16 18:00:31 +0000 devel/llvm1[01]: Fix lit Correct missing renames of lit modules. [0] Remove no-op LLD_LINK option. PR: 257123 [0] Reported by: Derek Schrock <dereks@lifeofadishwasher.com> devel/llvm10/Makefile | 10 ++++------ devel/llvm11/Makefile | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=1d5b2f98a4186c8ed4ba8e5524651412cd16868d commit 1d5b2f98a4186c8ed4ba8e5524651412cd16868d Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2021-07-16 18:00:30 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2021-07-16 18:00:30 +0000 devel/llvm12: Update to 12.0.1 release This release restores Reporter.py required for scan-build. [0] Correct missing renames of lit modules. [1] Remove no-op LLD_LINK option. PR: 256297 [0], 257123 [1] Reported by: phk [0], Derek Schrock <dereks@lifeofadishwasher.com> [1] devel/llvm12/Makefile | 12 +++++------- devel/llvm12/distinfo | 6 +++--- devel/llvm12/pkg-plist | 1 + 3 files changed, 9 insertions(+), 10 deletions(-)
A commit in branch 2021Q3 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=4bb3c89d4f9f88369982636fdf76dc8ae2943a27 commit 4bb3c89d4f9f88369982636fdf76dc8ae2943a27 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2021-08-11 20:01:09 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2021-08-11 20:01:09 +0000 devel/llvm12: Update to 12.0.1 release This release restores Reporter.py required for scan-build. [0] Correct missing renames of lit modules. [1] Remove no-op LLD_LINK option. PR: 256297 [0], 257123 [1] Reported by: phk [0], Derek Schrock <dereks@lifeofadishwasher.com> [1] (cherry picked from commit 1d5b2f98a4186c8ed4ba8e5524651412cd16868d) devel/llvm12/Makefile | 12 +++++------- devel/llvm12/distinfo | 6 +++--- devel/llvm12/pkg-plist | 1 + 3 files changed, 9 insertions(+), 10 deletions(-)