Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4470f27 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Use androidx.test instead of android.support.test

This CL mechanically changes package name of AndroidJUnitRunner, test
annotation classes, test filter classes, and etc. from android.support.test
to androidx.test.

This CL also copies WidgetTestUtils#runOnMainAndDrawSync() helper method
from CTS and eliminates compatibility-device-util from dependency.

Bug: None
Exempt-From-Owner-Approval: Large-scale refactor
Test: Run all non-flaky presubmit tests in FrameworksCoreTests
  $ tradefed.sh run commandAndExit FrameworksCoreTests \
        --include-annotation android.platform.test.annotations.Presubmit \
	--exclude-annotation androidx.test.filters.FlakyTest
  430 tests pass.
Change-Id: Ia65c4f643961afaa01c2c8d4b271712e574eb45c
parent 4180876b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -36,12 +36,12 @@ LOCAL_STATIC_JAVA_LIBRARIES := \
    frameworks-core-util-lib \
    mockwebserver \
    guava \
    android-support-test \
    androidx.test.runner \
    androidx.test.rules \
    mockito-target-minus-junit4 \
    espresso-core \
    ub-uiautomator \
    platform-test-annotations \
    compatibility-device-util \
    truth-prebuilt \
    print-test-util-lib \
    testng # TODO: remove once Android migrates to JUnit 4.12, which provide assertThrows
+1 −1
Original line number Diff line number Diff line
@@ -1425,7 +1425,7 @@

    </application>

    <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
    <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
            android:targetPackage="com.android.frameworks.coretests"
            android:label="Frameworks Core Tests" />
    <key-sets>
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
    <option name="test-tag" value="FrameworksCoreTests" />
    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
        <option name="package" value="com.android.frameworks.coretests" />
        <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
        <option name="hidden-api-checks" value="false"/>
    </test>
</configuration>
+5 −5
Original line number Diff line number Diff line
@@ -13,18 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package android.animation;

import android.support.test.filters.LargeTest;
import android.test.ActivityInstrumentationTestCase2;

import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import androidx.test.filters.LargeTest;

import com.android.frameworks.coretests.R;

import java.util.HashSet;
import java.util.Set;

@LargeTest
public class AnimatorInflaterTest extends ActivityInstrumentationTestCase2<BasicAnimatorActivity>  {
    Set<Integer> identityHashes = new HashSet<Integer>();
+18 −2
Original line number Diff line number Diff line
package android.animation;
/*
 * Copyright (C) 2015 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.
 */

import com.android.frameworks.coretests.R;
package android.animation;

import android.app.Activity;
import android.os.Bundle;

import com.android.frameworks.coretests.R;

public class AnimatorSetActivity extends Activity {
    @Override
    public void onCreate(Bundle savedBundleInstance) {
Loading