Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Conversation

febo
Copy link
Owner

@febo febo commented Jan 15, 2025

This PR adds the capability to run spl-token fixtures against the p-token (343 fixtures in total).

The main additions of this PR:

  • Simple CLI to run the fixtures using Mollusk
  • Script to clone spl-token repository and generate the fixtures from its tests
  • Fixtures can be run from the command-line and are also integrated on the CI workflow

@febo febo mentioned this pull request Jan 15, 2025
@febo febo marked this pull request as ready for review January 15, 2025 19:07
@febo febo requested review from buffalojoec and joncinque January 15, 2025 19:07
Comment on lines +29 to +35
if std::env::var("SBF_OUT_DIR").is_err() {
println!(
"{} SBF_OUT_DIR is not set. Please set it to the output directory of the BPF build.",
style("[ 🔴 ERROR ]").red(),
);
std::process::exit(1);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want, you can have the CLI take the program binary path as an argument, and just use load_program_elf as well as add_program_with_elf_and_loader.

Copy link
Collaborator

@buffalojoec buffalojoec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if something like this works. Otherwise might as well ship your version for p-token.

anza-xyz/mollusk#81

Copy link
Collaborator

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the slowness looking at this, but it looks good to me!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants