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

#[drink::test] macro #70

Merged
merged 20 commits into from
Oct 23, 2023
Merged

#[drink::test] macro #70

merged 20 commits into from
Oct 23, 2023

Conversation

pmikolajczyk41
Copy link
Member

@pmikolajczyk41 pmikolajczyk41 commented Oct 19, 2023

Closes #62

In this PR we introduce #[drink::test] macro. It builds contract(s) for a testcase, similarly to the ink_e2e::test.

Follow-up: Provide bundles for all built contracts to a testcase.

@pmikolajczyk41 pmikolajczyk41 requested review from deuszx and removed request for piotrMocz October 20, 2023 07:00
@pmikolajczyk41 pmikolajczyk41 marked this pull request as draft October 20, 2023 08:15
Copy link
Collaborator

@piotrMocz piotrMocz left a comment

Choose a reason for hiding this comment

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

LGTM

@pmikolajczyk41 pmikolajczyk41 marked this pull request as ready for review October 20, 2023 10:11
@pmikolajczyk41 pmikolajczyk41 marked this pull request as draft October 20, 2023 10:57
@pmikolajczyk41 pmikolajczyk41 marked this pull request as ready for review October 23, 2023 07:39
Comment on lines +88 to +102
let args = ExecuteArgs {
manifest_path,
verbosity: Verbosity::Default,
build_mode: BuildMode::Release,
features: Features::default(),
network: Network::Online,
build_artifact: BuildArtifacts::All,
unstable_flags: UnstableFlags::default(),
optimization_passes: Some(OptimizationPasses::default()),
keep_debug_symbols: false,
lint: false,
output_type: OutputType::HumanReadable,
skip_wasm_validation: false,
target: Target::Wasm,
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm wondering - some of these params are definable in Cargo.toml - especially for the root package - and here we're "overwriting" them. That's probably fine since we are "optimising for drink!" but just something to be aware of.

Copy link
Member Author

Choose a reason for hiding this comment

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

#72

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.

Build contract automatically
3 participants