Skip to content

feat: Add test dependencies via depends_on()#18

Merged
haugoug merged 1 commit intogvsoc:mainfrom
germainh512:test-dependencies
Mar 11, 2026
Merged

feat: Add test dependencies via depends_on()#18
haugoug merged 1 commit intogvsoc:mainfrom
germainh512:test-dependencies

Conversation

@germainh512
Copy link

Tests can now declare dependencies on other tests:

setup = testset.new_test("setup")
setup.add_command(Shell("run", "setup.sh"))

test = testset.new_test("run")
test.depends_on(setup)
test.add_command(Shell("run", "run.sh"))
  • depends_on() accepts one or more test references
  • Supports chains: a → b → c
  • Independent tests still run in parallel
  • Failed/skipped deps count as completed (unblock dependents)
  • 136 tests passing

Test dependencies:
  setup = testset.new_test("setup")
  test = testset.new_test("run")
  test.depends_on(setup)  # waits for setup to finish

Module caching:
  Testset files are now imported once and cached.
  testset_build() is called per target but module globals
  persist across calls. This allows shared state (e.g.
  build once, run per target).

136 tests passing.
@haugoug haugoug merged commit d9ddad8 into gvsoc:main Mar 11, 2026
3 checks passed
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.

2 participants