Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update tests to be compatible w/ the SDK test runner #4404

Closed
4 tasks done
Tracked by #4411
pq opened this issue May 30, 2023 · 3 comments · Fixed by #4422
Closed
4 tasks done
Tracked by #4411

update tests to be compatible w/ the SDK test runner #4404

pq opened this issue May 30, 2023 · 3 comments · Fixed by #4422
Assignees
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures type-code-health Internal changes to our tools and workflows to make them cleaner, simpler, or more maintainable type-test

Comments

@pq
Copy link
Member

pq commented May 30, 2023

In anticipation of running tests as part of the SDK build, we need to update them to run using the test discovery mechanism of our test runner.

Today:

dart --enable-asserts \
    --disable-analytics \
    test/all.dart

(Note the all.dart vs. discovery of _test.dart files.)

As a baby-step, updating bot.sh to use dart test seems good.

As part of this, we'll also want to convert

dart tool/checks/driver.dart

To be run as a test.


SDK migration readiness steps

@pq pq added type-test type-code-health Internal changes to our tools and workflows to make them cleaner, simpler, or more maintainable P1 A high priority bug; for example, a single project is unusable or has many test failures labels May 30, 2023
@pq pq self-assigned this May 30, 2023
@srawlins
Copy link
Member

In anticipation of running tests as part of the SDK build, we need to update them to run using the test discovery mechanism of our test runner.

What does this mean, to update each test? My understanding is that they should be fine.

@pq
Copy link
Member Author

pq commented May 30, 2023

Tests currently depend on a mock IO sink being setup and rules registered. These things happen in all.dart typically. (This is a simplification and am happy to elaborate. Suffice it to say, many tests currently fail if some setup hasn't been done before they're invoked.)

@srawlins
Copy link
Member

Oh wow I did not realize. Good catch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures type-code-health Internal changes to our tools and workflows to make them cleaner, simpler, or more maintainable type-test
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants