diff options
author | Brett Chabot <brettchabot@android.com> | 2012-05-09 18:05:58 -0700 |
---|---|---|
committer | Brett Chabot <brettchabot@android.com> | 2012-05-10 21:57:04 -0700 |
commit | 41b2b155ae49e696f71c65b8b30345663860127b (patch) | |
tree | c5053fda481894c1b4605baca4bc3651ab288f64 | |
parent | 131ae36bedb326432f4b830c12abfb1274cc391b (diff) | |
download | junit-41b2b155ae49e696f71c65b8b30345663860127b.tar.gz |
Build junit for android.test.runner.
Build the junit classes that go into android.test.runner from
external/junit, rather than having copies of the code in frameworks/base.
Bug 5826326
Change-Id: I363d0788d4ac1890aef0aa5a7e867175f667b8d5
-rw-r--r-- | Android.mk | 18 | ||||
-rw-r--r-- | Common.mk | 16 | ||||
-rw-r--r-- | src/junit/runner/TestSuiteLoader.java | 3 | ||||
-rw-r--r-- | src/junit/textui/package.html | 6 |
4 files changed, 30 insertions, 13 deletions
@@ -26,11 +26,8 @@ LOCAL_SRC_FILES := $(call all-java-files-under, src) # note: ideally this should be junit-host, but leave as is for now to avoid # changing all its dependencies LOCAL_MODULE := junit - LOCAL_MODULE_TAGS := optional - LOCAL_STATIC_JAVA_LIBRARIES := hamcrest-host - include $(BUILD_HOST_JAVA_LIBRARY) # ---------------------------------- @@ -71,6 +68,17 @@ include $(BUILD_HOST_JAVA_LIBRARY) endif #------------------------------------------------------- +# build a junit-runner jar representing the +# junit classes in the frameworks/base android.test.runner.jar + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(junit-runner-files) +LOCAL_MODULE := junit-runner +LOCAL_MODULE_TAGS := optional +include $(BUILD_STATIC_JAVA_LIBRARY) + +#------------------------------------------------------- # build a junit4-target jar representing the # classes in external/junit that are not in the core public API 4 # Note: 'core' here means excluding the classes that are contained @@ -95,7 +103,3 @@ LOCAL_SDK_VERSION := 4 LOCAL_STATIC_JAVA_LIBRARIES := hamcrest include $(BUILD_STATIC_JAVA_LIBRARY) - - - - @@ -6,8 +6,6 @@ # List of source to build into the core-junit library # -# The list also includes all junit files in public API. -# core-junit-files := \ src/junit/framework/Assert.java \ src/junit/framework/AssertionFailedError.java \ @@ -21,11 +19,21 @@ src/junit/framework/TestListener.java \ src/junit/framework/TestResult.java \ src/junit/framework/TestSuite.java -# TODO: add define for public API files in android.test.runner +# List of source to build into the android.test.runner library +# +junit-runner-files := \ +src/junit/runner/BaseTestRunner.java \ +src/junit/runner/TestRunListener.java \ +src/junit/runner/TestSuiteLoader.java \ +src/junit/runner/StandardTestSuiteLoader.java \ +src/junit/runner/Version.java \ +src/junit/textui/ResultPrinter.java \ +src/junit/textui/TestRunner.java # List of junit javadoc source files for Android public API # # $(1): directory for search (to support use from frameworks/base) define junit_to_document - $(core-junit-files) + $(core-junit-files) \ + $(junit-runner-files) endef diff --git a/src/junit/runner/TestSuiteLoader.java b/src/junit/runner/TestSuiteLoader.java index 75a96fe..9cc6d81 100644 --- a/src/junit/runner/TestSuiteLoader.java +++ b/src/junit/runner/TestSuiteLoader.java @@ -3,9 +3,8 @@ package junit.runner; /** * An interface to define how a test suite should be loaded. * - * // android-changed - * @deprecated unused and not present in current upstream JUnit */ +// TODO: deprecate public interface TestSuiteLoader { abstract public Class load(String suiteClassName) throws ClassNotFoundException; abstract public Class reload(Class aClass) throws ClassNotFoundException; diff --git a/src/junit/textui/package.html b/src/junit/textui/package.html new file mode 100644 index 0000000..723f2ae --- /dev/null +++ b/src/junit/textui/package.html @@ -0,0 +1,6 @@ +<HTML> +<BODY> +Utility classes supporting the junit test framework. +{@hide} - Not needed for 1.0 SDK +</BODY> +</HTML> |