1 /* 2 * Copyright (C) 2020 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.android.devicehealthchecks; 17 18 import android.platform.test.annotations.GlobalPresubmit; 19 20 import androidx.test.runner.AndroidJUnit4; 21 22 import org.junit.Test; 23 import org.junit.runner.RunWith; 24 25 /** 26 * Tests used for basic device system health validation after the device boot is completed. This 27 * test class can be used to add more tests in the future for additional basic device system health 28 * validation after the device boot is completed. This test is used for global presubmit, any 29 * dropbox label checked showing failures must be resolved immediately, or have corresponding tests 30 * filtered out. 31 */ 32 @GlobalPresubmit 33 @RunWith(AndroidJUnit4.class) 34 public class SystemCheck extends CrashCheckBase { 35 36 @Test system_server_crash()37 public void system_server_crash() { 38 checkCrash("system_server_crash"); 39 } 40 41 @Test system_server_native_crash()42 public void system_server_native_crash() { 43 checkCrash("system_server_native_crash"); 44 } 45 46 @Test system_server_anr()47 public void system_server_anr() { 48 checkCrash("system_server_anr"); 49 } 50 51 @Test system_tombstone()52 public void system_tombstone() { 53 checkCrash("SYSTEM_TOMBSTONE"); 54 } 55 56 @Test system_server_watchdog()57 public void system_server_watchdog() { 58 checkCrash("system_server_watchdog"); 59 } 60 } 61