init_kill_services_test: reboot device first.
This test is killing critical device services, and if it runs repeatedly or some of the critical services have already died, it'll force the device to reboot again and potentially consider the test a failure. This forces the test to reboot first, so that it is in a fresh state and we can avoid this type of flake on the device. Bug: 153444614 Test: atest init_kill_services_test Change-Id: Ia81a319af1d209f58e70f824bb8eb7f11973637c
This commit is contained in:
parent
73d44bb6c2
commit
32876f356d
2 changed files with 39 additions and 1 deletions
|
@ -3,5 +3,9 @@ cc_test {
|
|||
srcs: ["init_kill_services_test.cpp"],
|
||||
shared_libs: ["libbase"],
|
||||
test_suites: ["general-tests"],
|
||||
require_root: true,
|
||||
|
||||
// TODO(b/153565474): switch back to auto-generation
|
||||
// and add back:
|
||||
// require_root: true,
|
||||
auto_gen_config: false,
|
||||
}
|
||||
|
|
34
init/test_kill_services/AndroidTest.xml
Normal file
34
init/test_kill_services/AndroidTest.xml
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2020 The Android Open Source Project
|
||||
|
||||
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="Runs init_kill_services_test.">
|
||||
<option name="test-suite-tag" value="apct" />
|
||||
<option name="test-suite-tag" value="apct-native" />
|
||||
|
||||
<!-- cannot be autogenerated: b/153565474 -->
|
||||
<target_preparer class="com.android.tradefed.targetprep.RebootTargetPreparer" />
|
||||
|
||||
<target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
|
||||
|
||||
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
|
||||
<option name="cleanup" value="true" />
|
||||
<option name="push" value="init_kill_services_test->/data/local/tmp/init_kill_services_test" />
|
||||
</target_preparer>
|
||||
|
||||
<test class="com.android.tradefed.testtype.GTest" >
|
||||
<option name="native-test-device-path" value="/data/local/tmp" />
|
||||
<option name="module-name" value="init_kill_services_test" />
|
||||
</test>
|
||||
</configuration>
|
Loading…
Reference in a new issue