-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathcore.rs
More file actions
70 lines (66 loc) · 2.07 KB
/
Copy pathcore.rs
File metadata and controls
70 lines (66 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
use clap::{Args, Subcommand};
#[derive(Debug, Subcommand)]
pub enum Command {
/// Initializes Simplex project
Init {
/// Name of the new project
name: Option<String>,
},
/// Prints current Simplex config in use
Config,
/// Spins up local Electrs + Elements regtest
Regtest,
/// Runs Simplex tests
Test {
#[command(flatten)]
args: TestArguments,
#[command(flatten)]
flags: TestFlags,
},
/// Install a `SimplicityHL` dependency (requires the dep to be a simplex project)
/// If `deps` is empty, install everything from `Simplex.toml`.
Install {
/// Dependencies to install, as `<source>` or `<alias>=<source>`.
#[arg(value_name = "DEP")]
deps: Vec<String>,
},
/// Generates the simplicity contracts artifacts
Build,
/// Cleans Simplex artifacts in the current directory
Clean,
}
#[allow(clippy::struct_excessive_bools)]
#[derive(Debug, Args, Clone)]
pub struct TestArguments {
/// Space-separated test name filters
#[arg(value_name = "FILTER", num_args = 0..)]
pub filters: Vec<String>,
/// Integration test target to run
#[arg(long = "target")]
pub target: Option<String>,
/// Number of tests to run simultaneously
#[arg(long = "test-threads")]
pub test_threads: Option<std::num::NonZeroUsize>,
}
#[allow(clippy::struct_excessive_bools)]
#[derive(Debug, Args, Clone)]
pub struct TestFlags {
/// Show detailed output about running tests
#[arg(long = "show-output")]
pub show_output: bool,
/// Run ignored tests
#[arg(long)]
pub ignored: bool,
/// Run tests regardless of failure
#[arg(long = "no-fail-fast")]
pub no_fail_fast: bool,
/// Verbosity level for test output (-v for debug, -vv for trace)
#[arg(short = 'v', long, action = clap::ArgAction::Count)]
pub verbose: u8,
/// Do not print cargo log messages
#[arg(short = 'q', long)]
pub quiet: bool,
/// Run non-simplex tests (may be used for running unit tests)
#[arg(long = "no-simplex")]
pub no_simplex: bool,
}