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

Add a small harness that just loads all wasms from a workspace directory #1454

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

graydon
Copy link
Contributor

@graydon graydon commented Sep 5, 2024

This is just a small test harness to help people who want to run simple testcases they've generated outside soroban. Put your wasm file in soroban-env-host/src/test/hostile_inputs and run cargo test test_misc_hostile_wasms and it should just pick your wasm up and attempt to instantiate and run it.

Requirements:

  • The wasm has to have the normal contract metadata section on the front! Absent that it will be rejected immediately.
  • The wasm of course has to comply with the limited profile soroban uses (few-if-any post-MVP features, no floating point, etc.)
  • The wasm has to expose a 0-arg function called "test" which is the only thing the test tries to execute.

@graydon graydon requested a review from a team as a code owner September 5, 2024 23:46
@anupsdf anupsdf added this pull request to the merge queue Sep 6, 2024
Merged via the queue into stellar:main with commit a79b3cf Sep 6, 2024
12 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