[UR] Allow ShTest external execution in unified-runtime test config - #22815
Open
ldorau wants to merge 1 commit into
Open
[UR] Allow ShTest external execution in unified-runtime test config#22815ldorau wants to merge 1 commit into
ldorau wants to merge 1 commit into
Conversation
ldorau
force-pushed
the
UR_Allow_ShTest_external_execution_in_unified-runtime_test_config
branch
from
July 30, 2026 13:56
24fef13 to
46a4f42
Compare
lit.formats.ShTest(execute_external=True) alone is deprecated in newer lit versions and now raises a ValueError instead of just warning, causing llvm-lit to fail parsing unified-runtime/test/lit.cfg.py (used by the test/adapters/ suite) with: fatal: unable to parse config file '.../unified-runtime/test/lit.cfg.py' ValueError: execute_external=True is deprected as of LLVM-23 ... Pass force_execute_external=True to keep using external shell execution (required by these tests, e.g. LD_LIBRARY_PATH manipulation and %maybe-v1/ %maybe-v2 RUN-line prefixes) while acknowledging the deprecation, per the migration guidance in lit's own error message. However, some CI jobs use the pip-installed lit==18.1.8 package instead of the repo's own bundled llvm/utils/lit, and that older lit release doesn't have the force_execute_external parameter at all, so passing it unconditionally raised: TypeError: ShTest.__init__() got an unexpected keyword argument 'force_execute_external' Wrap the call in a try/except TypeError so it falls back to the plain ShTest(True) call on lit versions that don't support (or need) force_execute_external, while still using it on newer lit versions (LLVM-23+) where it's required to avoid the deprecation ValueError. Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lit.formats.ShTest(execute_external=True) alone is deprecated in newer
lit versions and now raises a ValueError instead of just warning,
causing llvm-lit to fail parsing unified-runtime/test/lit.cfg.py (used
by the test/adapters/ suite) with:
fatal: unable to parse config file '.../unified-runtime/test/lit.cfg.py'
ValueError: execute_external=True is deprected as of LLVM-23 ...
Pass force_execute_external=True to keep using external shell execution
(required by these tests, e.g. LD_LIBRARY_PATH manipulation and %maybe-v1/
%maybe-v2 RUN-line prefixes) while acknowledging the deprecation, per the
migration guidance in lit's own error message.
However, some CI jobs use the pip-installed lit==18.1.8 package instead
of the repo's own bundled llvm/utils/lit, and that older lit release
doesn't have the force_execute_external parameter at all, so passing it
unconditionally raised:
TypeError: ShTest.init() got an unexpected keyword argument
'force_execute_external'
Wrap the call in a try/except TypeError so it falls back to the plain
ShTest(True) call on lit versions that don't support (or need)
force_execute_external, while still using it on newer lit versions
(LLVM-23+) where it's required to avoid the deprecation ValueError.