-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
test: add tests for time in wasm32-unknown-unknown #7510
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wasm target runs according to this configuration:
tokio/.github/workflows/ci.yml
Lines 1041 to 1057 in 0922aa2
wasm32-unknown-unknown: | |
name: test tokio for wasm32-unknown-unknown | |
needs: basics | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust ${{ env.rust_stable }} | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ env.rust_stable }} | |
- name: Install wasm-pack | |
uses: taiki-e/install-action@wasm-pack | |
- uses: Swatinem/rust-cache@v2 | |
- name: test tokio | |
run: wasm-pack test --node -- --features "macros sync" | |
working-directory: tokio |
Here, time is not enabled, so this means that we do not run these tests with time enabled at all! You'll have to modify the ci.yml
file to test the time case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, thank you for clarifying! Do we also need to add rt feature here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably need to run multiple combinations here to really test this.
.github/workflows/ci.yml
Outdated
@@ -1047,7 +1047,7 @@ jobs: | |||
|
|||
- uses: Swatinem/rust-cache@v2 | |||
- name: test tokio | |||
run: wasm-pack test --node -- --features "macros sync" | |||
run: wasm-pack test --node -- --features "macros sync time rt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance you could expand this job to run both with and without time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for late, I've updated how it tests
Motivation
Closes #7360
Solution
Add minimal tests on wasm32-unknown-unknown to check the intended behavior from #7360