[Tests] Restructure integration tests to table-return shape - #7437
Closed
keithharvey wants to merge 1 commit into
Closed
[Tests] Restructure integration tests to table-return shape#7437keithharvey wants to merge 1 commit into
keithharvey wants to merge 1 commit into
Conversation
Contributor
Integration Test Results14 tests 6 ✅ 3s ⏱️ Results for commit 2198b31. ♻️ This comment has been updated with latest results. |
This was referenced Apr 14, 2026
Closed
Closed
Closed
Closed
keithharvey
force-pushed
the
mig-integration-tests
branch
from
April 15, 2026 04:36
1b891a9 to
e0b1f24
Compare
9 tasks
efrec
reviewed
Apr 15, 2026
keithharvey
force-pushed
the
mig-integration-tests
branch
3 times, most recently
from
April 16, 2026 22:06
41cf71d to
03f81d6
Compare
keithharvey
force-pushed
the
mig-integration-tests
branch
4 times, most recently
from
April 22, 2026 18:12
0149d82 to
41567d3
Compare
keithharvey
force-pushed
the
mig-integration-tests
branch
2 times, most recently
from
April 24, 2026 16:39
4d27c69 to
c0d833f
Compare
keithharvey
force-pushed
the
mig-integration-tests
branch
from
April 24, 2026 17:31
c0d833f to
c13a6ac
Compare
keithharvey
force-pushed
the
mig-integration-tests
branch
from
April 24, 2026 19:35
c13a6ac to
01cfccf
Compare
keithharvey
force-pushed
the
mig-integration-tests
branch
from
April 29, 2026 00:17
01cfccf to
79c8baf
Compare
keithharvey
force-pushed
the
mig-integration-tests
branch
from
June 11, 2026 10:25
7447704 to
3c90fd6
Compare
WatchTheFort
reviewed
Jul 1, 2026
keithharvey
force-pushed
the
mig-integration-tests
branch
from
July 7, 2026 07:52
3c90fd6 to
3acf0d1
Compare
keithharvey
force-pushed
the
mig-integration-tests
branch
from
July 7, 2026 21:26
3acf0d1 to
b96847d
Compare
keithharvey
force-pushed
the
mig-integration-tests
branch
from
July 7, 2026 21:45
b96847d to
3b9eafc
Compare
keithharvey
force-pushed
the
mig-integration-tests
branch
from
July 8, 2026 05:18
3b9eafc to
c27cdc3
Compare
keithharvey
force-pushed
the
mig-integration-tests
branch
from
July 8, 2026 09:06
c27cdc3 to
d886764
Compare
keithharvey
force-pushed
the
mig-integration-tests
branch
from
July 8, 2026 09:22
d886764 to
7297a0d
Compare
keithharvey
force-pushed
the
mig-integration-tests
branch
from
July 8, 2026 17:46
7297a0d to
1929c12
Compare
keithharvey
force-pushed
the
mig-integration-tests
branch
from
July 8, 2026 18:56
1929c12 to
c8fa8d7
Compare
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
This was referenced Jul 22, 2026
Collaborator
Author
|
Superseded by #8404 — recreated with its head on beyond-all-reason instead of the fork; the whole migration stack now lives same-repo. Branch content is identical; review history stays readable here. |
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
Superseded — this PR was an earlier mint of the stack. The type-error cleanup
now lands via the current stack tip
fmt-llm#8398.This slice's current counterpart is #8404.
Kept closed for review history; nothing here merges.
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-22 19:44:41 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