Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[lit] Use dbg instead of note for tool detection#193662

Open
vitalybuka wants to merge 9 commits intomainfrom
users/vitalybuka/spr/lit-use-dbg-instead-of-note-for-tool-detection
Open

[lit] Use dbg instead of note for tool detection#193662
vitalybuka wants to merge 9 commits intomainfrom
users/vitalybuka/spr/lit-use-dbg-instead-of-note-for-tool-detection

Conversation

@vitalybuka
Copy link
Copy Markdown
Collaborator

Also remove unused parameter quiet.

Don't output lines like these by default:

llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using split-file: out/z/bin/split-file
llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using yaml2obj: out/z/bin/yaml2obj
llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using llvm-objcopy: out/z/bin/llvm-objcopy
llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using ld.lld: out/z/bin/ld.lld
llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using lld-link: out/z/bin/lld-link
llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using ld64.lld: out/z/bin/ld64.lld
llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using wasm-ld: out/z/bin/wasm-ld
llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using clang: out/z/bin/clang
llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using clang: out/z/bin/clang

I don't believe this information is usefull for a typical test run.

Now they can be retrived with 'LIT_OPTS=--debug ninja check-llvm'

Created using spr 1.3.7
@llvmbot
Copy link
Copy Markdown
Member

llvmbot commented Apr 23, 2026

@llvm/pr-subscribers-libcxx

@llvm/pr-subscribers-testing-tools

Author: Vitaly Buka (vitalybuka)

Changes

Also remove unused parameter quiet.

Don't output lines like these by default:

llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using split-file: out/z/bin/split-file
llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using yaml2obj: out/z/bin/yaml2obj
llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using llvm-objcopy: out/z/bin/llvm-objcopy
llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using ld.lld: out/z/bin/ld.lld
llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using lld-link: out/z/bin/lld-link
llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using ld64.lld: out/z/bin/ld64.lld
llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using wasm-ld: out/z/bin/wasm-ld
llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using clang: out/z/bin/clang
llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using clang: out/z/bin/clang

I don't believe this information is usefull for a typical test run.

Now they can be retrived with 'LIT_OPTS=--debug ninja check-llvm'


Full diff: https://github.com/llvm/llvm-project/pull/193662.diff

1 Files Affected:

  • (modified) llvm/utils/lit/lit/llvm/config.py (+1-3)
diff --git a/llvm/utils/lit/lit/llvm/config.py b/llvm/utils/lit/lit/llvm/config.py
index 9713f4333d99a..2a6c60fab6125 100644
--- a/llvm/utils/lit/lit/llvm/config.py
+++ b/llvm/utils/lit/lit/llvm/config.py
@@ -527,7 +527,6 @@ def use_llvm_tool(
         name,
         search_env=None,
         required=False,
-        quiet=False,
         search_paths=None,
         use_installed=False,
     ):
@@ -565,8 +564,7 @@ def use_llvm_tool(
                 self.lit_config.params.get("use_normalized_slashes")
             ):
                 tool = tool.replace("\\", "/")
-            if not quiet:
-                self.lit_config.note("using {}: {}".format(name, tool))
+            self.lit_config.dbg("using {}: {}".format(name, tool))
         return tool
 
     def _get_clang_paths(self, additional_tool_dirs):

Copy link
Copy Markdown
Contributor

@boomanaiden154 boomanaiden154 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree this information probably isn't helpful on a development machine, but I feel like it can be useful in some circumstances in CI setups when things go wrong.

It's not very much log output.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 23, 2026

🪟 Windows x64 Test Results

  • 133944 tests passed
  • 3157 tests skipped
  • 1 test failed

Failed Tests

(click on a test name to see its output)

lit

lit.lit/use-llvm-tool.py
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 7
env -u FILECHECK_OPTS "C:\Python312\python.exe" C:\_work\llvm-project\llvm-project\llvm\utils\lit\lit.py -j1 -D use_normalized_slashes=0 --order=lexical Inputs/use-llvm-tool 2>&1 |    FileCheck C:\_work\llvm-project\llvm-project\build\utils\lit\tests\use-llvm-tool.py -DDIR=C:\_work\llvm-project\llvm-project\build\utils\lit\tests
# executed command: env -u FILECHECK_OPTS 'C:\Python312\python.exe' 'C:\_work\llvm-project\llvm-project\llvm\utils\lit\lit.py' -j1 -D use_normalized_slashes=0 --order=lexical Inputs/use-llvm-tool
# note: command had no output on stdout or stderr
# executed command: FileCheck 'C:\_work\llvm-project\llvm-project\build\utils\lit\tests\use-llvm-tool.py' '-DDIR=C:\_work\llvm-project\llvm-project\build\utils\lit\tests'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\build\utils\lit\tests\use-llvm-tool.py:25:10: error: CHECK: expected string not found in input
# | # CHECK: note: using case1: [[DIR]]{{[\\/]}}Inputs{{[\\/]}}use-llvm-tool{{[\\/]}}env-case1
# |          ^
# | <stdin>:1:1: note: scanning from here
# | lit.py: C:\_work\llvm-project\llvm-project\llvm\utils\lit\lit\llvm\config.py:64: note: using lit tools: c:\program files\git\usr\bin
# | ^
# | <stdin>:1:1: note: with "DIR" equal to "C:\_work\llvm-project\llvm-project\build\utils\lit\tests"
# | lit.py: C:\_work\llvm-project\llvm-project\llvm\utils\lit\lit\llvm\config.py:64: note: using lit tools: c:\program files\git\usr\bin
# | ^
# | <stdin>:1:82: note: possible intended match here
# | lit.py: C:\_work\llvm-project\llvm-project\llvm\utils\lit\lit\llvm\config.py:64: note: using lit tools: c:\program files\git\usr\bin
# |                                                                                  ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\build\utils\lit\tests\use-llvm-tool.py
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: lit.py: C:\_work\llvm-project\llvm-project\llvm\utils\lit\lit\llvm\config.py:64: note: using lit tools: c:\program files\git\usr\bin 
# | check:25'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | check:25'1                                                                                                                                           with "DIR" equal to "C:\_work\llvm-project\llvm-project\build\utils\lit\tests"
# | check:25'2                                                                                      ?                                                    possible intended match
# |             2: -- Testing: 1 tests, 1 workers -- 
# | check:25'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             3: PASS: use-llvm-tool :: true.txt (1 of 1) 
# | check:25'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             4:  
# | check:25'0     ~
# |             5: Testing Time: 0.77s 
# | check:25'0     ~~~~~~~~~~~~~~~~~~~~
# |             6:  
# | check:25'0     ~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the infrastructure label.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 23, 2026

🐧 Linux x64 Test Results

  • 173283 tests passed
  • 3234 tests skipped
  • 1 test failed

Failed Tests

(click on a test name to see its output)

lit

lit.lit/use-llvm-tool.py
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 7
env -u FILECHECK_OPTS "/usr/bin/python3" /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/utils/lit/lit.py -j1 -D use_normalized_slashes=0 --order=lexical Inputs/use-llvm-tool 2>&1 |    FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/build/utils/lit/tests/use-llvm-tool.py -DDIR=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/utils/lit/tests
# executed command: env -u FILECHECK_OPTS /usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/utils/lit/lit.py -j1 -D use_normalized_slashes=0 --order=lexical Inputs/use-llvm-tool
# note: command had no output on stdout or stderr
# executed command: FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/build/utils/lit/tests/use-llvm-tool.py -DDIR=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/utils/lit/tests
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/utils/lit/tests/use-llvm-tool.py:25:10: error: CHECK: expected string not found in input
# | # CHECK: note: using case1: [[DIR]]{{[\\/]}}Inputs{{[\\/]}}use-llvm-tool{{[\\/]}}env-case1
# |          ^
# | <stdin>:1:1: note: scanning from here
# | -- Testing: 1 tests, 1 workers --
# | ^
# | <stdin>:1:1: note: with "DIR" equal to "/home/gha/actions-runner/_work/llvm-project/llvm-project/build/utils/lit/tests"
# | -- Testing: 1 tests, 1 workers --
# | ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/utils/lit/tests/use-llvm-tool.py
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: -- Testing: 1 tests, 1 workers -- 
# | check:25'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | check:25'1                                        with "DIR" equal to "/home/gha/actions-runner/_work/llvm-project/llvm-project/build/utils/lit/tests"
# |             2: PASS: use-llvm-tool :: true.txt (1 of 1) 
# | check:25'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             3:  
# | check:25'0     ~
# |             4: Testing Time: 0.02s 
# | check:25'0     ~~~~~~~~~~~~~~~~~~~~
# |             5:  
# | check:25'0     ~
# |             6: Total Discovered Tests: 1 
# | check:25'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             7:  Passed: 1 (100.00%) 
# | check:25'0     ~~~~~~~~~~~~~~~~~~~~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the infrastructure label.

@vitalybuka
Copy link
Copy Markdown
Collaborator Author

vitalybuka commented Apr 23, 2026

I agree this information probably isn't helpful on a development machine, but I feel like it can be useful in some circumstances in CI setups when things go wrong.

It's not very much log output.

Then CI should run LIT_OPTS=-debug

LLVM is quite big now, if we keep all debug logging it's hard to notice relevant issues

It's easy to undo if it's someone will miss it

Created using spr 1.3.7
Created using spr 1.3.7
Created using spr 1.3.7
@vitalybuka vitalybuka requested a review from nikic April 23, 2026 17:31
Created using spr 1.3.7

[skip ci]
Created using spr 1.3.7
@vitalybuka vitalybuka changed the base branch from main to users/vitalybuka/spr/main.lit-use-dbg-instead-of-note-for-tool-detection April 23, 2026 19:47
@vitalybuka vitalybuka requested a review from a team as a code owner April 23, 2026 19:47
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Apr 23, 2026
preames and others added 2 commits April 23, 2026 12:49
Created using spr 1.3.7

[skip ci]
Created using spr 1.3.7
@vitalybuka vitalybuka changed the base branch from users/vitalybuka/spr/main.lit-use-dbg-instead-of-note-for-tool-detection to main April 23, 2026 19:50
@vitalybuka vitalybuka removed the request for review from a team April 23, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. llvm-lit testing-tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants