mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:40:52 +01:00
[PR #419] [CLOSED] TEST-CUBE-WINPATH: the cube semantic test cannot start llvm-mc when LLVM_MC is a Windows path #470
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#470
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/419
Author: @fiestorra
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:carry/cube-winpath📝 Commits (1)
060c3c6semantic test: split LLVM_MC with the repository's own helper, not shlex📊 Changes
1 file changed (+5 additions, -2 deletions)
View changed files
📝
tests/semantic/test_image_cube_store_glc.py(+5 -2)📄 Description
Claimed in the coordination issue as:
TEST-CUBE-WINPATH(claim comment).What this changes
tests/semantic/test_image_cube_store_glc.py:52-57 has its ownllvm_mc_cmd(), and it turnsLLVM_MCinto an argv withshlex.split().shlexis POSIX word splitting: it treats a backslash as an escape, so a Windows path loses its separators. Set the variable the waydocs/testing.md:16-21 tells Windows users to set it (scripts\build_llvm_mc.ps1builds a nativellvm-mc.exeand setsLLVM_MCfor you) and the helper returns something likeC:UsersIsegurav.leonida…llvm-mc.exe,subprocess.runraisesFileNotFoundErrorinsideLlvmMcRoundTrip, and the test errors instead of running. The@unittest.skipUnless(llvm_mc_cmd() is not None, …)guard cannot help: it only checks whether a value came back, not whether it names a program.tools/mc_command.pyis the helper every other tool in this tree already uses, and itssplit_command()docstring is "Split a command line without eating the backslashes of a Windows path (POSIX shlex would)". This file is the only one in the repository carrying a private copy. The change is to callmc_command.mc_command(env)there and keep the same rule for the skip case (llvm-mconPATH, or skip when nothing is available).import supportat :21 already putstools/onsys.path, which is howrdna2spirvis imported in the same file.Evidence on
ece4ba5b3Head
060c3c6cf, one commit,tests/semantic/test_image_cube_store_glc.pyonly (+7 / −2). The tool used is the localllvm-mc.exefromscripts/build_llvm_mc.ps1(LLVM 21.1.8),spirv-as/spirv-valfrom Vulkan SDK 1.4.363.0, CPython 3.13.14, Windows build 26300. No GPU is involved.LLVM_MC=C:\Users\Isegurav\.leonida\llvm-mc\llvm-mc.exe,llvm-mcnot onPATH— cleanece4ba5b3:Ran 9 tests in 0.550s/FAILED (errors=1). This branch:Ran 9 tests in 0.789s/OK.llvm-mconPATH,LLVM_MCunset —ece4ba5b3OK(measured in the same session), this branch:Ran 9 tests in 0.774s/OK. Unchanged.ece4ba5b3:Ran 9 tests in 0.554s/OK (skipped=1). This branch:Ran 9 tests in 0.552s/OK (skipped=1). The skip behaviour is what it was.py -3.13 -I -m unittest discover -s tests -p "test_docs_*.py":Ran 47 tests in 23.944s / OKon this branch (and 47 / OK on cleanece4ba5b3measured earlier in the same session).This is the test my own old #9778 added, so the broken helper is mine and this is the follow-up, not a criticism of anyone else's work. Written with an AI assistant.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.