diff --git a/src/api.rs b/src/api.rs index 819ee8e..f2e5aeb 100644 --- a/src/api.rs +++ b/src/api.rs @@ -46,6 +46,7 @@ pub trait RapiClient { retry_quota_test_preventive: Option, retry_quota_test_reactive: Option, analytics_read_only: Option, + profiling: bool, filtering_configuration: Option, no_progress_bar: bool, flavor: Option, @@ -142,6 +143,7 @@ impl RapiClient for RapiReqwestClient { retry_quota_test_preventive: Option, retry_quota_test_reactive: Option, analytics_read_only: Option, + profiling: bool, filtering_configuration: Option, no_progress_bar: bool, flavor: Option, @@ -251,6 +253,7 @@ impl RapiClient for RapiReqwestClient { platform: platform.clone(), s3_app_path: s3_app_path.clone(), analytics_read_only: analytics_read_only.clone(), + profiling: profiling, code_coverage: code_coverage.clone(), concurrency_limit: concurrency_limit.clone(), country: None, @@ -278,7 +281,7 @@ impl RapiClient for RapiReqwestClient { test_timeout_max: test_timeout_max.clone(), env_args: env_args_map, test_env_args: test_env_args_map, - bundles: bundles, + bundles, }; let response = self.client.post(url).json(&create_request).send().await?; @@ -559,6 +562,8 @@ struct CreateRunRequest { s3_app_path: Option, #[serde(rename = "analytics_read_only", default)] analytics_read_only: Option, + #[serde(rename = "profiling", default)] + profiling: bool, #[serde(rename = "code_coverage", default)] code_coverage: Option, #[serde(rename = "concurrency_limit", default)] diff --git a/src/cli/android/mod.rs b/src/cli/android/mod.rs index 2132014..f5a147d 100644 --- a/src/cli/android/mod.rs +++ b/src/cli/android/mod.rs @@ -11,6 +11,8 @@ use crate::{ pull::PullFileConfig, }; +use super::ProfilingArgs; + #[derive(Debug, clap::ValueEnum, Clone)] pub enum SystemImage { #[clap(name = "default")] @@ -89,6 +91,7 @@ pub(crate) async fn run( instrumentation_arg: Option>, retry_args: RetryArgs, analytics_args: AnalyticsArgs, + profiling_args: ProfilingArgs, pull_files: Option>, application_bundle: Option>, library_bundle: Option>, @@ -263,6 +266,7 @@ If you are interesting in library testing then please use advance mode with --li retry_args.retry_quota_test_preventive, retry_args.retry_quota_test_reactive, analytics_args.analytics_read_only, + profiling_args.profiling, filtering_configuration, &common.output, application, diff --git a/src/cli/ios/mod.rs b/src/cli/ios/mod.rs index 640aafa..59c74ff 100644 --- a/src/cli/ios/mod.rs +++ b/src/cli/ios/mod.rs @@ -299,6 +299,7 @@ Second example: If you choose --xcode-version 15.4 --os-version 17.5 then you wi retry_args.retry_quota_test_preventive, retry_args.retry_quota_test_reactive, analytics_args.analytics_read_only, + false, filtering_configuration, &common.output, Some(application), diff --git a/src/cli/mod.rs b/src/cli/mod.rs index 374a28f..3060862 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -56,6 +56,7 @@ impl Cli { pull_files, application_bundle, library_bundle, + profiling_args, } => { android::run( application, @@ -69,6 +70,7 @@ impl Cli { instrumentation_arg, retry_args, analytics_args, + profiling_args, pull_files, application_bundle, library_bundle, @@ -373,6 +375,13 @@ struct AnalyticsArgs { analytics_read_only: Option, } +#[derive(Debug, Args)] +#[command(args_conflicts_with_subcommands = true)] +struct ProfilingArgs { + #[arg(long, default_value_t = false, help = "Profile tests")] + profiling: bool, +} + #[derive(Debug, Args, Clone)] #[command(args_conflicts_with_subcommands = true)] struct ProgressArgs { @@ -436,6 +445,9 @@ enum RunCommands { #[command(flatten)] analytics_args: AnalyticsArgs, + #[command(flatten)] + profiling_args: ProfilingArgs, + #[arg(long, help = "Instrumentation arguments, example: FOO=BAR")] instrumentation_arg: Option>, diff --git a/src/interactor.rs b/src/interactor.rs index 4059285..29de38f 100644 --- a/src/interactor.rs +++ b/src/interactor.rs @@ -113,6 +113,7 @@ impl TriggerTestRunInteractor { retry_quota_test_preventive: Option, retry_quota_test_reactive: Option, analytics_read_only: Option, + profiling: bool, filtering_configuration: Option, output: &Option, application: Option, @@ -164,6 +165,7 @@ impl TriggerTestRunInteractor { retry_quota_test_preventive, retry_quota_test_reactive, analytics_read_only, + profiling, filtering_configuration, no_progress_bars, flavor,