From 7fa3cb176ce12acaf966780de1904d8b17c11e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Kongstad?= Date: Fri, 22 Sep 2023 13:52:40 +0200 Subject: [PATCH] aconfig: separate package name and flag name using dot Change the package name and flag name separator in the text dump output from a slash to a dot. This makes the output consistent with how the flags are encoded in the API tracking files. Bug: 283910447 Test: atest aconfig.test Change-Id: Ie3e109073e7f04cf01568e16c29bf2872d07ebad --- tools/aconfig/src/commands.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/aconfig/src/commands.rs b/tools/aconfig/src/commands.rs index e4baa82901..7b051471aa 100644 --- a/tools/aconfig/src/commands.rs +++ b/tools/aconfig/src/commands.rs @@ -260,7 +260,7 @@ pub fn dump_parsed_flags(mut input: Vec, format: DumpFormat) -> Result { for parsed_flag in parsed_flags.parsed_flag.into_iter() { let line = format!( - "{}/{}: {:?} + {:?}\n", + "{}.{}: {:?} + {:?}\n", parsed_flag.package(), parsed_flag.name(), parsed_flag.permission(), @@ -274,7 +274,7 @@ pub fn dump_parsed_flags(mut input: Vec, format: DumpFormat) -> Result = parsed_flag.trace.iter().map(|tracepoint| tracepoint.source()).collect(); let line = format!( - "{}/{}: {:?} + {:?} ({})\n", + "{}.{}: {:?} + {:?} ({})\n", parsed_flag.package(), parsed_flag.name(), parsed_flag.permission(), @@ -449,7 +449,7 @@ mod tests { let input = parse_test_flags_as_input(); let bytes = dump_parsed_flags(vec![input], DumpFormat::Text).unwrap(); let text = std::str::from_utf8(&bytes).unwrap(); - assert!(text.contains("com.android.aconfig.test/disabled_ro: READ_ONLY + DISABLED")); + assert!(text.contains("com.android.aconfig.test.disabled_ro: READ_ONLY + DISABLED")); } #[test]