/DADK/dadk-config/src/rootfs/utils/ |
H A D | size.rs | 60 /// - `Some(usize)` contains the parsed size in bytes if the input string is valid. in parse_size_from_string() 74 'K' => Some(number * 1024), in parse_size_from_string() 75 'M' => Some(number * 1024 * 1024), in parse_size_from_string() 76 'G' => Some(number * 1024 * 1024 * 1024), 88 assert_eq!(parse_size_from_string("1024"), Some(1024)); in test_parse_size_from_string() 91 assert_eq!(parse_size_from_string("1K"), Some(1024)); in test_parse_size_from_string() 92 assert_eq!(parse_size_from_string("2M"), Some(2 * 1024 * 1024)); in test_parse_size_from_string() 93 assert_eq!(parse_size_from_string("3G"), Some(3 * 1024 * 1024 * 1024)); in test_parse_size_from_string() 96 assert_eq!(parse_size_from_string("0K"), Some(0)); in test_parse_size_from_string() 97 assert_eq!(parse_size_from_string("0M"), Some( in test_parse_size_from_string() [all...] |
H A D | size.rs | 74 'K' => Some(number * 1024), in parse_size_from_string() 75 'M' => Some(number * 1024 * 1024), in parse_size_from_string() 76 'G' => Some(number * 1024 * 1024 * 1024), in parse_size_from_string() 88 assert_eq!(parse_size_from_string("1024"), Some(1024)); in test_parse_size_from_string() 91 assert_eq!(parse_size_from_string("1K"), Some(1024)); in test_parse_size_from_string() 92 assert_eq!(parse_size_from_string("2M"), Some(2 * 1024 * 1024)); in test_parse_size_from_string() 93 assert_eq!(parse_size_from_string("3G"), Some(3 * 1024 * 1024 * 1024)); in test_parse_size_from_string() 96 assert_eq!(parse_size_from_string("0K"), Some(0)); in test_parse_size_from_string() 97 assert_eq!(parse_size_from_string("0M"), Some(0)); in test_parse_size_from_string() 98 assert_eq!(parse_size_from_string("0G"), Some(0)); in test_parse_size_from_string() [all …]
|
/DADK/dadk-user/tests/ |
H A D | test_parse_dadk_user_config.rs |
|
H A D | test_parse_dadk_user_config.rs |
|
/DADK/dadk-config/tests/ |
H A D | test_user_config.rs | 42 revision: Some("01cdc56863".to_string()), in test_parse_dadk_user_config() 55 Some("make install".to_string()), in test_parse_dadk_user_config() 56 Some(PathBuf::from("config/pre_build.sh")), in test_parse_dadk_user_config() 57 Some(PathBuf::from("config/post_build.sh")), in test_parse_dadk_user_config() 59 install: InstallConfig::new(Some(PathBuf::from("/bin"))), in test_parse_dadk_user_config() 60 clean: CleanConfig::new(Some("make clean".to_string())), in test_parse_dadk_user_config()
|
H A D | test_user_config.rs | 42 revision: Some("01cdc56863".to_string()), in test_parse_dadk_user_config() 55 Some("make install".to_string()), in test_parse_dadk_user_config() 56 Some(PathBuf::from("config/pre_build.sh")), in test_parse_dadk_user_config() 57 Some(PathBuf::from("config/post_build.sh")), in test_parse_dadk_user_config() 59 install: InstallConfig::new(Some(PathBuf::from("/bin"))), in test_parse_dadk_user_config() 60 clean: CleanConfig::new(Some("make clean".to_string())), in test_parse_dadk_user_config()
|
H A D | test_user_config.rs | 42 revision: Some("01cdc56863".to_string()), in test_parse_dadk_user_config() 55 Some("make install".to_string()), in test_parse_dadk_user_config() 56 Some(PathBuf::from("config/pre_build.sh")), in test_parse_dadk_user_config() 57 Some(PathBuf::from("config/post_build.sh")), in test_parse_dadk_user_config() 59 install: InstallConfig::new(Some(PathBuf::from("/bin"))), in test_parse_dadk_user_config() 60 clean: CleanConfig::new(Some("make clean".to_string())), in test_parse_dadk_user_config()
|
/DADK/dadk-user/src/console/ |
H A D | new_config.rs |
|
H A D | elements.rs |
|
/DADK/dadk-user/src/parser/ |
H A D | task_log.rs | 47 self.build_timestamp = Some(time); in set_build_time() 55 self.build_timestamp = Some(Utc::now()); in set_build_time_now() 63 self.install_timestamp = Some(Utc::now()); in set_install_time_now() 67 self.build_status = Some(status); in set_build_status() 83 self.install_status = Some(status); in set_install_status()
|
H A D | mod.rs | 79 if let Some(config_file) = &self.config_file { in fmt() 91 if let Some(config_file) = &self.config_file { in fmt() 103 if let Some(config_file) = &self.config_file {
|
H A D | task.rs | 150 if let Some(envs) = &self.envs { in trim_depends() 166 if let Some(envs) = &mut self.envs { in validate_target_arch() 219 return Some(lc.path().clone()); 227 return Some(lc.path().clone()); in source_path() 250 envs: Some(user_config.envs), in eq() 330 CodeSource::Local(source) => source.validate(Some(false)),
|
H A D | task_log.rs | 47 self.build_timestamp = Some(time); 55 self.build_timestamp = Some(Utc::now()); in set_build_time_now() 63 self.install_timestamp = Some(Utc::now()); in clean_build_status() 67 self.build_status = Some(status); in build_status() 83 self.install_status = Some(status);
|
H A D | mod.rs | 79 if let Some(config_file) = &self.config_file { in fmt() 91 if let Some(config_file) = &self.config_file { in fmt() 103 if let Some(config_file) = &self.config_file { in fmt()
|
H A D | task.rs | 150 if let Some(envs) = &self.envs { in trim_depends() 166 if let Some(envs) = &mut self.envs { in validate_target_arch() 219 return Some(lc.path().clone()); in source_path() 227 return Some(lc.path().clone()); in source_path() 250 envs: Some(user_config.envs), in eq() 330 CodeSource::Local(source) => source.validate(Some(false)),
|
H A D | task.rs | 150 if let Some(envs) = &self.envs { in validate_envs() 166 if let Some(envs) = &mut self.envs { in trim_envs() 219 return Some(lc.path().clone()); in source_path() 227 return Some(lc.path().clone()); in source_path() 250 envs: Some(user_config.envs), in trim() 330 CodeSource::Local(source) => source.validate(Some(false)), in trim()
|
H A D | config.rs |
|
H A D | config.rs |
|
H A D | task.rs | 150 if let Some(envs) = &self.envs { in validate_envs() 166 if let Some(envs) = &mut self.envs { in trim_envs() 219 return Some(lc.path().clone()); in source_path() 227 return Some(lc.path().clone()); in source_path() 250 envs: Some(user_config.envs), in try_from() 330 CodeSource::Local(source) => source.validate(Some(false)), in validate()
|
/DADK/dadk-user/src/ |
H A D | context.rs | 52 if let Some(thread) = self.thread_num() { in init() 116 .sysroot_dir(Some(base_context.fake_dragonos_sysroot())) 119 .cache_dir(Some(base_context.fake_dadk_cache_root())) 120 .base_test_context(Some(base_context.clone())) in default_test_execute_context_builder() 147 .config_dir(Some(base_context.config_v1_dir())) in setup() 168 .config_dir(Some(base_context.config_v1_dir())) in setup()
|
H A D | context.rs | 52 if let Some(thread) = self.thread_num() { in init() 116 .sysroot_dir(Some(base_context.fake_dragonos_sysroot())) in default_test_execute_context_builder() 119 .cache_dir(Some(base_context.fake_dadk_cache_root())) in default_test_execute_context_builder() 120 .base_test_context(Some(base_context.clone())) in default_test_execute_context_builder() 147 .config_dir(Some(base_context.config_v1_dir())) 168 .config_dir(Some(base_context.config_v1_dir()))
|
H A D | context.rs | 52 if let Some(thread) = self.thread_num() { in init() 116 .sysroot_dir(Some(base_context.fake_dragonos_sysroot())) in default_test_execute_context_builder() 119 .cache_dir(Some(base_context.fake_dadk_cache_root())) in default_test_execute_context_builder() 120 .base_test_context(Some(base_context.clone())) in default_test_execute_context_builder() 147 .config_dir(Some(base_context.config_v1_dir())) 168 .config_dir(Some(base_context.config_v1_dir()))
|
H A D | context.rs | 52 if let Some(thread) = self.thread_num() { in init() 116 .sysroot_dir(Some(base_context.fake_dragonos_sysroot())) in default_test_execute_context_builder() 119 .cache_dir(Some(base_context.fake_dadk_cache_root())) in default_test_execute_context_builder() 120 .base_test_context(Some(base_context.clone())) in default_test_execute_context_builder() 147 .config_dir(Some(base_context.config_v1_dir())) in setup() 168 .config_dir(Some(base_context.config_v1_dir())) in setup()
|
/DADK/dadk-config/src/ |
H A D | utils.rs | 20 if let Some(last) = joined.last_mut() { in split_to_kv_array() 61 if let Some(key) = get_key(&item, separator) { in apply_kv_array() 63 if let Some(v) = multi_value_key_strings.get_mut(&key) { in apply_kv_array() 80 if let Some(key) = get_key(arg, separator) { in apply_kv_array() 82 if let Some(v) = multi_value_key_strings.get_mut(&key) { in apply_kv_array() 115 let Some(key) = get_key(item, separator) else { in infer_multi_value_keys() localVariable 143 Some(key.to_string()) in get_key()
|
/DADK/dadk-user/src/executor/ |
H A D | mod.rs | 77 Some(CacheDir::new(entity.clone(), CacheDirType::Source)?) in new() 181 if let Some(pre_build) = self.entity.task().build.pre_build { in pre_build() 200 if let Some(status) = self.task_log().build_status() { in build() 201 if let Some(build_time) = self.task_log().build_time() { in build() 224 if let Some(post_build) = self.entity.task().build.post_build { in post_build() 248 if let Some(cmd) = command { in do_build() 264 if let Some(status) = self.task_log().install_status() { in install() 265 if let Some(install_time) = self.task_log().install_time() { in install() 415 if let Some(local_path) = self.entity.task().source_path() { in src_work_dir() 475 return Ok(Some(command)); in create_command() [all …]
|