anza-xyz / move

Move compiler targeting llvm supported backends
https://discord.gg/wFgfjG9J
Apache License 2.0
108 stars 33 forks source link

Add Solana test runner #313

Closed dmakarov closed 1 year ago

dmakarov commented 1 year ago

This is initial incomplete implementation of move-cli solana test runner. This implementation compiles Move packages in test mode. The compilation of Move unit tests currently breaks the compiler on unit tests of the Move standard library. Even trivial unit tests depend on Move stdlib. It's difficult to implement the actual runner without a complete compilation of even a trivial unit test.

An example of a command to run unit tests


LLVM_SYS_150_PREFIX=/path/to/move-dev \
PLATFORM_TOOLS_ROOT=/path/to/platform-tools \
MOVE_NATIVE=/path/to/move/language/move-native \
cargo run -p move-cli --features solana-backend --bin move -- test --solana -p language/solana/examples/unit_test