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
Scrypto compiler default options for tests #1807
Scrypto compiler default options for tests #1807
Conversation
Docker tags |
Benchmark for 3e28794Click to view benchmark
|
|
||
env_vars.iter().for_each(|(name, value)| { | ||
compiler_builder.env(name, EnvironmentVariableAction::Set(value.clone())); | ||
}); | ||
|
||
#[cfg(feature = "coverage")] | ||
{ | ||
if _use_coverage { |
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.
Do we still need to feature flag?
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.
Yes, because it changes some limits to larger values in transaction executor and wasm executor. Also there was missing coverage
feature in scrypto-test
project.
Additionally I've fixed scrypto coverage
command memory error which was caused by using coverage feature and Rustflags on 1st compilation stage (schema extract).
f97fe99
to
6457b8e
Compare
@@ -1218,4 +1262,36 @@ mod tests { | |||
assert_eq!(cmd_to_string(&cmd_phase_2), | |||
format!("cargo build --target wasm32-unknown-unknown --target-dir {} --manifest-path {} --features scrypto/log-error --features scrypto/log-warn --features scrypto/log-info --features scrypto/no-schema --profile release", default_target_path.display(), manifest_path.display())); | |||
} | |||
|
|||
#[test] | |||
fn test_command_coverage() { |
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.
Thanks for adding a coverage test as well!
Summary
Added
CompilerProfile
toLedgerSimulator
.Details
Adding new
scrypto-compiler
crate introduced divergence between defaultscrypto build
command compilation options and compilation options used byLedgerSimulator
andSDK
inscrypto-test
project. This PR provides option for the users ofLedgerSimulator
to choose if they want to use standardscrypto build
compilation options or faster compilation options (WASM optimizations are disabled in that case).Also refactored
PackageFactory
to use same compiler object asLedgerSimulator
.Testing
Added new tests which verifies if blueprint compiled using
scrypto build
andLedgerSimulator
with Standard compilation options are binary same. Also added other validation tests.