Skip to content

[UR] Allow ShTest external execution in unified-runtime test config - #22815

Open
ldorau wants to merge 1 commit into
intel:syclfrom
ldorau:UR_Allow_ShTest_external_execution_in_unified-runtime_test_config
Open

[UR] Allow ShTest external execution in unified-runtime test config#22815
ldorau wants to merge 1 commit into
intel:syclfrom
ldorau:UR_Allow_ShTest_external_execution_in_unified-runtime_test_config

Conversation

@ldorau

@ldorau ldorau commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

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.

@ldorau
ldorau requested a review from a team as a code owner July 30, 2026 09:37
@ldorau
ldorau force-pushed the UR_Allow_ShTest_external_execution_in_unified-runtime_test_config branch from 24fef13 to 46a4f42 Compare July 30, 2026 13:56
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant