mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:00:52 +01:00
[PR #1375] [MERGED] tests: the pytest helper takes a text-only sample's lines as its listing, as run_gpu_tests.py does (TEST-TRANSLATE-TEXT-ONLY) #1405
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#1405
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/1375
Author: @milk4sale
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/26/2026
Merged by: @aslan2142
Base:
main← Head:test/translate-text-only-sample📝 Commits (1)
8d29ffdtests: the pytest helper takes a text-only sample's lines as its listing, as run_gpu_tests.py does (TEST-TRANSLATE-TEXT-ONLY)📊 Changes
2 files changed (+33 additions, -4 deletions)
View changed files
📝
tests/conftest.py(+13 -2)📝
tests/test_translate.py(+20 -2)📄 Description
Claimed in the coordination issue as: TEST-TRANSLATE-TEXT-ONLY (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7146574385)
What and why
translator-testsis red onmainsince6261ca916, the merge of #957 at 21:04 UTC on 24 November, so it fails on every pull request whose run starts on amainfrom then on. Two tests fail, both on the fixture #957 added:tests/test_translate.py::test_gpu_samples_translate_and_validate[cs_dpp_cmp.asm]tests/test_translate.py::test_wave64_emulate_uses_no_subgroup_ops[cs_dpp_cmp.asm]Both stop at the llvm-mc assertion of
conftest.Shaderwitherror: dpp variant of this instruction is not supported, before they reach the translator.llvm-mc has no gfx1013 encoding for a VOPC compare in DPP form. #957 dealt with that for the GPU suite:
cs_dpp_cmp.asmcarries the comment line; run_gpu_tests: text only, llvm-mc has no gfx1013 encoding for an instruction here, andassemble_to_sinscripts/run_gpu_tests.pythen writes the listing from the file's text. The pytest helper assembles every sample with llvm-mc and did not know that line.conftest.Shadernow does what the GPU runner does for a sample that carries the line: its instruction lines are the listing, in the same form. Both tests then translate and validate the fixture. A sample without the line is assembled as before, and fails as before when llvm-mc rejects it. The fixture, the translator and the GPU runner are unchanged.This is independent of #1365, which fixes the other test that is red on
main(tests/test_ci_registration.py, in the standard-library loop). The two touch different files.Tested
test_text_only_mark_is_spelled_as_in_the_gpu_runnerreads the line out ofscripts/run_gpu_tests.py, so the two copies cannot drift apart unnoticed;test_only_a_marked_sample_skips_llvm_mcgivesShaderlines llvm-mc rejects, once with the line (the listing is the text, comment lines dropped) and once without (the llvm-mc assertion still fires).conftest.py, the spelling test and bothcs_dpp_cmptests fail; with every sample taking the text path, the second new test fails.main89d7dfcf5, 2 failed, 1618 passed; on this branch, 1622 passed. Run with pytest 9.2.0 on Python 3.14.10, llvm-mc 23.1.4 and SPIRV-Tools v2026.4, in an environment without numpy and Pillow, so 134 tests that need them were skipped in both runs.main4a50cafc7and of #1365's branch (main89d7dfcf5plus its one commit, which touches neither file): 2 failed, 1879 passed, 14 skipped.tests/withpython -I(491 files): 490 pass. The one failure istests/test_ci_registration.py, red onmainsince #930 and fixed by #1365, not by this.python -I scripts/check_no_game_data.py tests/conftest.py tests/test_translate.py,python -m compileallandgit diff --check.Not run locally: Python 3.12 and llvm-mc 21 (the versions the job installs), and the tests that need numpy or Pillow.
GPUs tested: n/a (two Python test files; no shader, fixture or runtime code)
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (No translator change.)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.