{"id":18016527,"url":"https://github.com/webassembly/wasi-testsuite","last_synced_at":"2025-04-07T13:09:58.325Z","repository":{"id":62880986,"uuid":"555474597","full_name":"WebAssembly/wasi-testsuite","owner":"WebAssembly","description":"WASI Testsuite","archived":false,"fork":false,"pushed_at":"2024-12-06T00:12:57.000Z","size":117425,"stargazers_count":53,"open_issues_count":19,"forks_count":23,"subscribers_count":18,"default_branch":"main","last_synced_at":"2024-12-06T20:31:08.268Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WebAssembly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-21T16:49:04.000Z","updated_at":"2024-11-04T23:27:05.000Z","dependencies_parsed_at":"2024-01-16T01:37:13.977Z","dependency_job_id":"8941adcd-e384-4036-a5d4-1a0af9c44028","html_url":"https://github.com/WebAssembly/wasi-testsuite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebAssembly%2Fwasi-testsuite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebAssembly%2Fwasi-testsuite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebAssembly%2Fwasi-testsuite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebAssembly%2Fwasi-testsuite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebAssembly","download_url":"https://codeload.github.com/WebAssembly/wasi-testsuite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657282,"owners_count":20974345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-30T04:18:22.201Z","updated_at":"2025-04-07T13:09:58.292Z","avatar_url":"https://github.com/WebAssembly.png","language":"Rust","readme":"# `wasi-testsuite`\n\nThis repository contains tests for WebAssembly System Interface (WASI) and a test executor for running WASI tests against a selected WebAssembly runtime.\n\nWASI is a modular collection of standardized APIs. Currently, WASI has not reached version 1.0\nstability but a snapshot of experimental APIs does exist ([`wasi_snapshot_preview1`]). This\nrepository only holds tests of APIs included in this snapshot. It does not include tests for other\nin-progress proposals or other experimental APIs, though the test executor can run tests from other repositories (e.g., see the [wasi-threads] tests).\n\n[`wasi_snapshot_preview1`]: https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md\n[wasi-threads]: https://github.com/WebAssembly/wasi-threads/tree/main/test\n\nThe test executor matches execution output against a JSON specification. Writing your own test\nexecutor is quite simple; see the [specification] document for the details and the reference Python\n[implementation].\n\n[specification]: doc/specification.md\n[implementation]: ./test-runner\n\n## Getting started\n\n1. Clone the repository; use the `prod/testsuite-base` branch as it already includes precompiled\n   test binaries (see [branch structure](#branch-structure)):\n\n   ```bash\n   git clone --branch prod/testsuite-base https://github.com/WebAssembly/wasi-testsuite\n   ```\n\n2. Make sure there is already an adapter for the runtime in the [`adapters`](adapters) directory; if\n   not, create one (see [the doc](doc/adapters.md) for details).\n\n3. Install `python3` (e.g., on Ubuntu):\n\n   ```bash\n   sudo apt install python3 python3-pip\n   ```\n\n4. Install the test runner dependencies:\n\n   ```bash\n   python3 -m pip install -r test-runner/requirements.txt\n   ```\n\n5. Execute the test suites from this repository:\n\n   ```bash\n   python3 test-runner/wasi_test_runner.py                                                  \\\n      -t ./tests/assemblyscript/testsuite/ `# path to folders containing .wasm test files` \\\n         ./tests/c/testsuite/                                                              \\\n         ./tests/rust/testsuite/                                                           \\\n      -r adapters/wasmtime.py # path to a runtime adapter\n   ```\n\nOptionally you can specify test cases to skip with the `--exclude-filter` option.\n\n```bash\npython3 test-runner/wasi_test_runner.py                                                  \\\n    -t ./tests/assemblyscript/testsuite/ `# path to folders containing .wasm test files` \\\n       ./tests/c/testsuite/                                                              \\\n       ./tests/rust/testsuite/                                                           \\\n    --exclude-filter examples/skip.json                                                  \\\n    -r adapters/wasmtime.py # path to a runtime adapter\n```\n\nThe default executable in the adapter used for test execution can be\noverridden using `TEST_RUNTIME_EXE` variable. This only works with adapters defined in\n[adapters/](adapters/), and might not work with 3rd party adapters.\n\n```bash\nTEST_RUNTIME_EXE=\"wasmtime --wasm-features all\" python3 test-runner/wasi_test_runner.py                                                  \\\n    -t ./tests/assemblyscript/testsuite/ \\\n    -r adapters/wasmtime.py\n```\n\n## Contributing\n\nAll contributions are very welcome. Contributors can help with:\n\n- adding or updating test cases,\n- improving test execution and reporting,\n- integrating with new WASM runtimes,\n\nand many others. We appreciate both code contributions as well as suggestions and bug reports.\n\n## Developer guide\n\nHere is some additional information for developers who are willing to contribute.\n\n### Directory structure\n\n- [`test-runner`](test-runner) - test executor scripts.\n- [`tests`](tests) - source code of WASI tests and build scripts. The folder contains subfolders for all supported languages.\n- [`.github`](.github) - CI workflow definitions.\n- [`doc`](doc) - additional documentation.\n\n### Cleaning up temporary resources\n\nSome of the tests (e.g. [pwrite-with-access](./tests/c/testsuite/pwrite-with-access.c)) generate\noutput artifacts and their existence can affect consecutive test executions. Tests should clean up\nthe artifacts they generate, but there might be cases where the test fails early. The test runner\nwill automatically delete all the files and directories in the test suite directory with the\n`.cleanup` suffix.\n\n### Programming languages for tests\n\nThe repository currently consists of tests implemented in the following languages:\n\n- `C` (with [`wasi-libc`](https://github.com/WebAssembly/wasi-libc))\n- `AssemblyScript`\n- `Rust`\n\nThe list of supported languages can be extended if needed.\n\n### Branch structure\n\nApart from development branches for various features, we identify the following branches as critical (i.e. they won't be removed or force-updated):\n\n- `main` - main branch of the repository. Use this branch for development (e.g. updating test cases, modifying test runner)\n- `prod/testsuite-base` - the branch is an up-to-date fork of the `main` branch but it also includes precompiled binaries. Use this branch for simply running tests and validating WASM runtimes (see [doc](doc/precompiled-binaries.md) for details).\n- `prod/daily-test-results` - the branch contains daily test results for supported WASM runtimes (at the moment, we only execute tests on wasmtime and WAMR). In the future we intend to publish those results to the website to provide users with additional input for selecting the runtime.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebassembly%2Fwasi-testsuite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebassembly%2Fwasi-testsuite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebassembly%2Fwasi-testsuite/lists"}