Adding some unit tests to presubmit

Adding a test mapping file to run some unit tests when files are changed
under com/android/server. Starting off by putting
AlarmManagerServiceTest which has been stably passing for a while now.

Test: atest --test-mapping

Change-Id: I059ca4cba35202862137285352e03008d8321da8
This commit is contained in:
Suprabh Shukla
2019-01-10 18:12:11 -08:00
parent 97e54a0113
commit ab99fe1be5
2 changed files with 17 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
{
"presubmit": [
{
"name": "FrameworksMockingServicesTests",
"options": [
{
"include-annotation": "android.platform.test.annotations.Presubmit"
},
{
"exclude-annotation": "android.support.test.filters.FlakyTest"
}
]
}
]
}

View File

@@ -60,6 +60,7 @@ import android.os.Handler;
import android.os.Looper;
import android.os.PowerManager;
import android.os.UserHandle;
import android.platform.test.annotations.Presubmit;
import android.provider.Settings;
import android.util.Log;
import android.util.SparseArray;
@@ -81,6 +82,7 @@ import org.mockito.quality.Strictness;
import java.util.ArrayList;
@Presubmit
@SmallTest
@RunWith(AndroidJUnit4.class)
public class AlarmManagerServiceTest {