Seperate common configs into BootTime common file am: d27ef10db5 am: 49fcf51ecf

Original change: https://googleplex-android-review.googlesource.com/c/platform/test/catbox/+/27630573

Change-Id: I2e7ce3d08dd5652539750062528f4157ad22db3d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/tools/catbox-tradefed/res/config/catbox-performance-boot-test-common.xml b/tools/catbox-tradefed/res/config/catbox-performance-boot-test-common.xml
new file mode 100644
index 0000000..8258cc4
--- /dev/null
+++ b/tools/catbox-tradefed/res/config/catbox-performance-boot-test-common.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2024 Google Inc.
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="CATBOX BootTime Target Preparer Configuration">
+  <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer" />
+    <!-- Needed to set perfetto trace property before fastboot commands -->
+    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer" />
+    <target_preparer class="com.android.tradefed.targetprep.FastbootCommandPreparer" />
+    <!-- Needed multiple run command target preparer for running commands before/after install. -->
+    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer" />
+    <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup" />
+    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer" />
+    <target_preparer class="com.android.tradefed.targetprep.InstrumentationPreparer" >
+    <option name="disable" value="true" />
+  </target_preparer>
+
+  <test class="com.android.tradefed.testtype.HostTest" >
+    <option name="class" value="android.boottime.BootTimeTest" />
+    <option name="set-option" value="boot-delay:20000" />
+    <option name="set-option"
+        value="successive-boot-prepare-cmd:am start -n com.google.android.car.setupwizard/.ExitActivity"/>
+    <option name="set-option"
+        value="successive-boot-prepare-cmd:setprop persist.aae.suw.disable_short_notice true"/>
+    <option name="set-option"
+        value="successive-boot-prepare-cmd:cmd car_service enable-feature car_evs_service"/>
+  </test>
+
+  <metrics_collector class="com.android.tradefed.device.metric.AtraceCollector"/>
+  <metrics_collector class="com.android.tradefed.device.metric.PerfettoPullerMetricCollector">
+    <option name="collect-on-run-ended-only" value="false" />
+  </metrics_collector>
+
+  <metric_post_processor class="com.android.tradefed.postprocessor.PerfettoGenericPostProcessor" />
+  <metric_post_processor class="com.android.tradefed.postprocessor.MetricFilePostProcessor">
+    <option name="aggregate-similar-tests" value="true" />
+  </metric_post_processor>
+  <metric_post_processor class="android.boottime.postprocessor.LogcatPostProcessor">
+    <option name="file-regex" value=".*Successive_reboots_logcat.*"/>
+    <!-- For custom boot time metrics -->
+    <option name="boot-time-pattern" key="boot_to_ble_on"
+        value="BluetoothAdapterService: updateAdapterState\(\) \- Broadcasting state BLE_ON"/>
+    <option name="boot-time-pattern" key="boot_to_carlauncher_fully_drawn"
+        value="Fully drawn com.android.car.carlauncher/.CarLauncher"/>
+    <option name="boot-time-pattern" key="boot_to_first_user_unlocked"
+        value="CarServiceHelper: Time to unlock 1st user"/>
+    <option name="boot-time-pattern" key="boot_to_maps_displayed"
+        value="Displayed com.google.android.apps.maps"/>
+    <option name="boot-time-pattern" key="boot_to_settings_fallbackhome_displayed"
+        value="Displayed com.android.car.settings/.FallbackHome"/>
+    <option name="boot-time-pattern" key="boot_to_user0_unlocked"
+        value="SystemServerTiming: SystemUserUnlock took to complete"/>
+    <option name="boot-time-pattern" key="boot_to_user10_unlocked"
+        value="SystemServerTiming: User10Unlock took to complete"/>
+    <option name="boot-time-pattern" key="boot_to_gmscore_started_experimental"
+        value="ActivityManager: Start proc \d+:com.google.android.gms/u0"/>
+    <option name="boot-time-pattern" key="boot_to_car_evs_service_started"
+        value="CAR.InitTiming: CarEvsService took to complete"/>
+  </metric_post_processor>
+  <metric_post_processor class="android.boottime.postprocessor.DmesgPostProcessor">
+    <option name="file-regex" value=".*Successive_reboots_dmesg.*"/>
+  </metric_post_processor>
+
+</configuration>
\ No newline at end of file
diff --git a/tools/catbox-tradefed/res/config/catbox-performance-successive-boottime.xml b/tools/catbox-tradefed/res/config/catbox-performance-successive-boottime.xml
index 24be4be..95422d7 100644
--- a/tools/catbox-tradefed/res/config/catbox-performance-successive-boottime.xml
+++ b/tools/catbox-tradefed/res/config/catbox-performance-successive-boottime.xml
@@ -16,64 +16,7 @@
 
 <configuration>
     <include name="catbox-performance-base" />
-
-    <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer" />
-    <!-- Needed to set perfetto trace property before fastboot commands -->
-    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer" />
-    <target_preparer class="com.android.tradefed.targetprep.FastbootCommandPreparer" />
-    <!-- Needed multiple run command target preparer for running commands before/after install. -->
-    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer" />
-    <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup" />
-    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer" />
-    <target_preparer class="com.android.tradefed.targetprep.InstrumentationPreparer" >
-        <option name="disable" value="true" />
-    </target_preparer>
-
-    <test class="com.android.tradefed.testtype.HostTest" >
-        <option name="class" value="android.boottime.BootTimeTest" />
-        <option name="set-option" value="boot-delay:20000" />
-        <option name="set-option"
-                value="successive-boot-prepare-cmd:am start -n com.google.android.car.setupwizard/.ExitActivity"/>
-        <option name="set-option"
-                value="successive-boot-prepare-cmd:setprop persist.aae.suw.disable_short_notice true"/>
-        <option name="set-option"
-                value="successive-boot-prepare-cmd:cmd car_service enable-feature car_evs_service"/>
-    </test>
-
-    <metrics_collector class="com.android.tradefed.device.metric.AtraceCollector"/>
-    <metrics_collector class="com.android.tradefed.device.metric.PerfettoPullerMetricCollector">
-        <option name="collect-on-run-ended-only" value="false" />
-    </metrics_collector>
-
-    <metric_post_processor class="com.android.tradefed.postprocessor.PerfettoGenericPostProcessor" />
-    <metric_post_processor class="com.android.tradefed.postprocessor.MetricFilePostProcessor">
-        <option name="aggregate-similar-tests" value="true" />
-    </metric_post_processor>
-    <metric_post_processor class="android.boottime.postprocessor.LogcatPostProcessor">
-        <option name="file-regex" value=".*Successive_reboots_logcat.*"/>
-        <!-- For custom boot time metrics -->
-        <option name="boot-time-pattern" key="boot_to_ble_on"
-                value="BluetoothAdapterService: updateAdapterState\(\) \- Broadcasting state BLE_ON"/>
-        <option name="boot-time-pattern" key="boot_to_carlauncher_fully_drawn"
-                value="Fully drawn com.android.car.carlauncher/.CarLauncher"/>
-        <option name="boot-time-pattern" key="boot_to_first_user_unlocked"
-                value="CarServiceHelper: Time to unlock 1st user"/>
-        <option name="boot-time-pattern" key="boot_to_maps_displayed"
-                value="Displayed com.google.android.apps.maps"/>
-        <option name="boot-time-pattern" key="boot_to_settings_fallbackhome_displayed"
-                value="Displayed com.android.car.settings/.FallbackHome"/>
-        <option name="boot-time-pattern" key="boot_to_user0_unlocked"
-                value="SystemServerTiming: SystemUserUnlock took to complete"/>
-        <option name="boot-time-pattern" key="boot_to_user10_unlocked"
-                value="SystemServerTiming: User10Unlock took to complete"/>
-        <option name="boot-time-pattern" key="boot_to_gmscore_started_experimental"
-                value="ActivityManager: Start proc \d+:com.google.android.gms/u0"/>
-        <option name="boot-time-pattern" key="boot_to_car_evs_service_started"
-                value="CAR.InitTiming: CarEvsService took to complete"/>s
-    </metric_post_processor>
-    <metric_post_processor class="android.boottime.postprocessor.DmesgPostProcessor">
-        <option name="file-regex" value=".*Successive_reboots_dmesg.*"/>
-    </metric_post_processor>
+    <include name="catbox-performance-boot-test-common" />
 
     <!-- Artificially disabling tests in CompatibilityTestSuite -->
     <!-- See com.android.tradefed.testtype.suite.CompatibilityTestSuite:loadTests() -->