[Tests] Restructure integration tests to table-return shape - #8404
Open
keithharvey wants to merge 1 commit into
Open
[Tests] Restructure integration tests to table-return shape#8404keithharvey wants to merge 1 commit into
keithharvey wants to merge 1 commit into
Conversation
This was referenced Jul 22, 2026
Contributor
Integration Test Results15 tests 7 ✅ 4s ⏱️ Results for commit e3801d3. ♻️ This comment has been updated with latest results. |
keithharvey
force-pushed
the
mig-integration-tests
branch
from
July 25, 2026 03:41
2198b31 to
d78c547
Compare
keithharvey
force-pushed
the
fmt
branch
2 times, most recently
from
July 25, 2026 05:08
a13b73a to
5ece360
Compare
keithharvey
force-pushed
the
mig-integration-tests
branch
2 times, most recently
from
July 25, 2026 06:03
5072d8c to
7b407da
Compare
keithharvey
force-pushed
the
mig-integration-tests
branch
from
July 29, 2026 15:08
7b407da to
a0e4435
Compare
keithharvey
force-pushed
the
mig-integration-tests
branch
from
July 29, 2026 15:47
a0e4435 to
790301a
Compare
keithharvey
force-pushed
the
mig-integration-tests
branch
from
July 29, 2026 17:48
790301a to
b708025
Compare
efrec
approved these changes
Jul 29, 2026
| distortionType = "point", | ||
| distortionConfig = { posx = 0, posy = 8, posz = 0, radius = 20, onlyModelMap = 0, riseRate = 0.5, windAffected = -0.5, | ||
| noiseStrength = 0.4, noiseScaleSpace = 2.2, distanceFalloff = 1.2, lifeTime = 0, effectType = 0 }, | ||
| distortionConfig = { posx = 0, posy = 8, posz = 0, radius = 20, onlyModelMap = 0, riseRate = 0.5, windAffected = -0.5, noiseStrength = 0.4, noiseScaleSpace = 2.2, distanceFalloff = 1.2, lifeTime = 0, effectType = 0 }, |
Collaborator
There was a problem hiding this comment.
table formatting in the table-return pr, not a big deal though
keithharvey
force-pushed
the
mig-integration-tests
branch
2 times, most recently
from
July 29, 2026 19:07
5caf022 to
5fbd04d
Compare
keithharvey
force-pushed
the
mig-integration-tests
branch
from
July 29, 2026 19:56
5fbd04d to
f278377
Compare
keithharvey
force-pushed
the
mig-integration-tests
branch
from
July 29, 2026 21:09
f278377 to
62ff0de
Compare
keithharvey
force-pushed
the
mig-integration-tests
branch
from
July 29, 2026 22:17
62ff0de to
7a33493
Compare
efrec
approved these changes
Jul 30, 2026
Restructures the 20 files under luaui/Tests/, luaui/TestsExamples/,
plus the headless-only common/testing/infologtest.lua, from bare-
global hook declarations to a return-table shape. Updates the
dbg_test_runner widget to read test hooks from the returned table.
Motivation: the pre-existing shape required the test files to run
under setfenv(chunk, testEnvironment) and define `function test()`,
`function setup()`, etc. as bare module-level globals that setfenv
redirected into the environment. That works at runtime but emmylua
can't model the sandboxing — it sees 20+ files declaring project-
wide globals like `test`, `setup`, `skip`, `cleanup`. To keep
emmylua happy, .emmyrc.json had to blacklist both test directories
under workspace.ignoreDir — a kludge on clearly-ours code. Lives on
its own leaf so the convention change can be discussed in isolation.
Minimal shape change per file — just prepend `local` to each top-
level `function` declaration, and append a final `return { ... }`
block listing whichever lifecycle hooks (skip/setup/test/cleanup)
that file actually defines. Original indentation and formatting
preserved (no stylua reformatting noise — the fmt transform runs
after this one in the mig pipeline).
Runner patch — luaui/Widgets/dbg_test_runner.lua, loadTestFromFile:
- capture the return value of pcall(chunk)
- require it to be a table
- merge its keys into testEnvironment so runTestInternal still
reads bare `skip`/`setup`/`test`/`cleanup` under setfenv
keithharvey
force-pushed
the
mig-integration-tests
branch
from
July 30, 2026 01:10
7a33493 to
e3801d3
Compare
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.
Warning
Don't merge this PR by itself — it's one slice of a stacked review.
Merging an intermediate PR breaks the stack. The whole cleanup lands by
merging only the tip,
fmt-llm, which pulls in every branch below it.Part of BAR type-error cleanup. Rebuilds idempotently from
masterviajust bar::migrate::stylua-cleanup-generate.What it does: Hand-curated (not a codemod): restructures the tests under
luaui/Tests/andluaui/TestsExamples/(20 files) from bare-global hook declarations to areturn { ... }shape, and patchesdbg_test_runner.luato read hooks from the returned table.Isolated so the convention change can be discussed/reverted independently.
Branch Topology
All branches in the BAR type-error cleanup stack — see Bulk Migrations for the migration log and how to run
just bar::migrate::stylua-cleanup. Regenerated deterministically byjust bar::migrate::stylua-cleanup-generate. Generated 2026-07-30 01:10:21 UTC.Leaves — each isolates one transform's diff vs
fmt:styluabar-lua-codemod bracket-to-dotbar-lua-codemod rename-aliasesbar-lua-codemod detach-bar-modules<hand curated><hand curated>Rollups — composite branches stacking the leaves and (for
fmt-llm) the env + LLM layers:master